Skip to content

Commit a11f86c

Browse files
authored
UX: Chat channel icons v2 (#36634)
Followup: * remove wrong size for emoji in chat sidebar * add background styling for emoji/icon in DMs (mobile) * fix avatar + thread icon positioning in threads index (mobile) Current states of all screens: #### Desktop Sidebar Largely unchanged <img width="530" height="1022" alt="CleanShot 2025-12-11 at 16 13 55@2x" src="https://github.com/user-attachments/assets/2e323e22-6d56-48c7-8efc-d7ec6f316883" /> #### Desktop Drawer <img width="3588" height="992" alt="image" src="https://github.com/user-attachments/assets/0a4ad902-a3c4-4ea9-86dc-56f34ec88bf5" /> #### Mobile <img width="3120" height="1508" alt="image" src="https://github.com/user-attachments/assets/f7046c84-0272-44e6-8d01-c656b77c23c3" />
1 parent da7bc59 commit a11f86c

File tree

4 files changed

+29
-37
lines changed

4 files changed

+29
-37
lines changed

app/assets/stylesheets/common/base/sidebar-section-link.scss

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -188,11 +188,6 @@
188188
.prefix-text {
189189
font-size: var(--font-0);
190190
}
191-
192-
&.emoji img {
193-
width: calc(var(--d-sidebar-section-link-prefix-width) - 2px);
194-
height: calc(var(--d-sidebar-section-link-prefix-width) - 2px);
195-
}
196191
}
197192
}
198193

plugins/chat/assets/stylesheets/common/chat-channel-icon.scss

Lines changed: 28 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,34 @@
11
@use "lib/viewport";
22

33
.chat-channel-icon {
4-
flex-shrink: 0;
5-
color: var(--primary-medium);
64
display: flex;
75
justify-content: center;
86
align-items: center;
7+
flex-shrink: 0;
98
font-size: var(--font-up-1);
9+
color: var(--primary-medium);
1010
position: relative;
1111

12-
.--starred-channels & {
12+
// separate otherwise it is used on the channel titles too
13+
.direct-message-channels &,
14+
.starred-channels & {
1315
width: var(--channel-list-avatar-size);
1416
height: var(--channel-list-avatar-size);
17+
18+
// emoji and icon styling on mobile = smaller + background circle for equalizing with avatars in mixed lists
19+
&.--emoji,
20+
&.--icon {
21+
@include viewport.until(sm) {
22+
background: var(--primary-low);
23+
border-radius: 100%;
24+
25+
.emoji,
26+
.d-icon:not(.chat-channel-icon__restricted-category-icon) {
27+
width: calc(var(--channel-list-avatar-size) * 0.5);
28+
height: calc(var(--channel-list-avatar-size) * 0.5);
29+
}
30+
}
31+
}
1532
}
1633

1734
.chat-message-creator & {
@@ -38,22 +55,6 @@
3855
}
3956
}
4057

41-
&.--emoji,
42-
&.--icon {
43-
.--starred-channels & {
44-
@include viewport.until(sm) {
45-
background: var(--primary-low);
46-
border-radius: 100%;
47-
}
48-
49-
.emoji,
50-
.d-icon:not(.chat-channel-icon__restricted-category-icon) {
51-
width: calc(var(--channel-list-avatar-size) * 0.5);
52-
height: calc(var(--channel-list-avatar-size) * 0.5);
53-
}
54-
}
55-
}
56-
5758
.chat-user-avatar {
5859
.avatar {
5960
.chat-channel-row & {
@@ -75,17 +76,16 @@
7576
border-radius: 50%;
7677
padding: 2px 2px 3px;
7778
color: var(--primary-high);
78-
height: 0.5rem;
79-
width: 0.5rem;
80-
right: -0.5rem;
79+
width: calc(var(--channel-list-avatar-size) * 0.35);
80+
height: calc(var(--channel-list-avatar-size) * 0.35);
81+
right: calc(var(--channel-list-avatar-size) * -0.15);
8182
top: -0.1rem;
8283

83-
@include viewport.until(sm) {
84-
.--starred-channels & {
85-
width: calc(var(--channel-list-avatar-size) * 0.25);
86-
height: calc(var(--channel-list-avatar-size) * 0.25);
87-
right: -0.25rem;
88-
}
84+
.chat-channel-title & {
85+
width: 50%;
86+
height: 50%;
87+
right: -20%;
88+
top: -20%;
8989
}
9090
}
9191
}

plugins/chat/assets/stylesheets/common/chat-channel-title.scss

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
overflow: hidden;
2222
}
2323

24-
.d-icon-lock {
25-
margin-right: 0.25em;
26-
}
27-
2824
.topic-chat-icon {
2925
color: var(--primary-medium);
3026
display: flex;

plugins/chat/assets/stylesheets/mobile/chat-user-threads.scss

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
.c-user-thread {
22
display: flex;
3+
align-items: center;
34
gap: 1rem;
45
margin-inline: 0;
56
padding: 0.5rem 1.5rem;

0 commit comments

Comments
 (0)