Skip to content

fix(sidebar): center notification dot on avatar corner#306

Merged
Just-Insane merged 2 commits intodevfrom
fix/notification-dot-alignment
Mar 16, 2026
Merged

fix(sidebar): center notification dot on avatar corner#306
Just-Insane merged 2 commits intodevfrom
fix/notification-dot-alignment

Conversation

@Just-Insane
Copy link
Collaborator

Summary

Fixes #293 — The notification dot badge appeared off-center relative to the avatar icon in the sidebar.

Root cause

The dot badge (Badge size="200", which is 8px × 8px) was positioned at top: -2px, left: -2px. This placed the dot's center at (2px, 2px) inside the avatar corner rather than at the corner itself.

By comparison, the count badge uses top: -6px, left: -6px which correctly centers a ~12px badge on the corner.

Fix

Changed the dot badge position from top: -2px, left: -2px to top: -4px, left: -4px (i.e. -(8/2) = -4px for an 8px dot). This centers the dot exactly on the top-left corner of the avatar, consistent with how the count badge is positioned.

Files changed:

  • Sidebar.css.ts — updated CSS recipe hasCount: false variant and folder compound variant
  • HomeTab.tsx, DirectTab.tsx, DirectDMsList.tsx, SpaceTabs.tsx — updated inline left style for the dot case

The dot badge (8px circle) was positioned at top:-2px, left:-2px
which placed its CENTER 2px inside the avatar corner rather than
on the corner itself. Changed to top:-4px, left:-4px so the dot
is centered exactly on the top-left corner of the avatar, matching
how the count badge (top:-6px for ~12px height) is positioned.

Also updated the folder compound variant dot position from +2px to 0px
for consistency.

Fixes #293
@Just-Insane Just-Insane requested a review from a team March 16, 2026 19:08
@github-actions
Copy link
Contributor

Deploying with  Cloudflare Workers  Cloudflare Workers

Status Preview URL Commit Alias Updated (UTC)
✅ Deployment successful! https://pr-306-sable.raspy-dream-bb1d.workers.dev bbec983 pr-306 Mon, 16 Mar 2026 19:30:35 GMT

@Just-Insane Just-Insane added this pull request to the merge queue Mar 16, 2026
Merged via the queue into dev with commit cb7934f Mar 16, 2026
8 checks passed
@Just-Insane Just-Insane deleted the fix/notification-dot-alignment branch March 16, 2026 19:46
@DidiDidi129
Copy link
Contributor

Screenshot 2026-03-17 at 5 10 49 PM Doesn't appear to be fixed for me Screenshot 2026-03-17 at 5 11 07 PM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Notification dot alignment off center

2 participants