Skip to content

Commit cb7934f

Browse files
authored
Merge pull request #306 from SableClient/fix/notification-dot-alignment
fix(sidebar): center notification dot on avatar corner
2 parents bfefbf3 + bbec983 commit cb7934f

6 files changed

Lines changed: 14 additions & 9 deletions

File tree

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
default: patch
3+
---
4+
5+
Fix notification dot badge appearing off-center on sidebar avatars

src/app/components/sidebar/Sidebar.css.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ export const SidebarItemBadge = recipe({
134134
left: toRem(-6),
135135
},
136136
false: {
137-
top: toRem(-2),
138-
left: toRem(-2),
137+
top: toRem(-4),
138+
left: toRem(-4),
139139
},
140140
},
141141
},
@@ -167,9 +167,9 @@ export const SidebarItemBadge = recipe({
167167
style: {
168168
selectors: {
169169
'div:has(> button[data-id]) &': {
170-
top: toRem(2),
170+
top: toRem(0),
171171
left: 'auto',
172-
right: toRem(2),
172+
right: toRem(0),
173173
},
174174
},
175175
},

src/app/pages/client/sidebar/DirectDMsList.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ function DMItem({ room, selected }: DMItemProps) {
141141
<SidebarItemBadge
142142
hasCount={unread.total > 0}
143143
style={{
144-
left: unread.total > 0 ? toRem(-6) : toRem(-2),
144+
left: unread.total > 0 ? toRem(-6) : toRem(-4),
145145
right: 'auto',
146146
}}
147147
>

src/app/pages/client/sidebar/DirectTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ export function DirectTab() {
118118
<SidebarItemBadge
119119
hasCount={directUnread.total > 0}
120120
style={{
121-
left: directUnread.total > 0 ? toRem(-6) : toRem(-2),
121+
left: directUnread.total > 0 ? toRem(-6) : toRem(-4),
122122
right: 'auto',
123123
}}
124124
>

src/app/pages/client/sidebar/HomeTab.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ export function HomeTab() {
112112
<SidebarItemBadge
113113
hasCount={homeUnread.total > 0}
114114
style={{
115-
left: homeUnread.total > 0 ? toRem(-6) : toRem(-2),
115+
left: homeUnread.total > 0 ? toRem(-6) : toRem(-4),
116116
right: 'auto',
117117
}}
118118
>

src/app/pages/client/sidebar/SpaceTabs.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -468,7 +468,7 @@ function SpaceTab({
468468
<SidebarItemBadge
469469
hasCount={unread.total > 0}
470470
style={{
471-
left: unread.total > 0 ? toRem(-6) : toRem(-2),
471+
left: unread.total > 0 ? toRem(-6) : toRem(-4),
472472
right: 'auto',
473473
}}
474474
>
@@ -609,7 +609,7 @@ function ClosedSpaceFolder({
609609
<SidebarItemBadge
610610
hasCount={unread.total > 0}
611611
style={{
612-
left: unread.total > 0 ? toRem(-6) : toRem(-2),
612+
left: unread.total > 0 ? toRem(-6) : toRem(-4),
613613
right: 'auto',
614614
}}
615615
>

0 commit comments

Comments
 (0)