desktop: keep sidebar unread pill below top chrome strip#1136
Merged
tlongwell-block merged 1 commit intoJun 19, 2026
Conversation
The "more unread above" pill in the sidebar (`MoreUnreadButton` `position="top"`) was anchored to `top-0` inside a column starting at window y=0. On macOS, the 40px top chrome strip with the traffic-light buttons lives at exactly that y range, so the centered pill overlapped the traffic lights when channels were unread above the viewport. Anchor the top variant to `topChromeInset.top` (`top-(--buzz-top-chrome-height,2.5rem)`) so it lines up with the existing `mt-(--buzz-top-chrome-height)` on `SidebarContent` and tracks any future chrome-height changes via the same CSS variable. Also adds a Playwright regression in the smoke project that injects two synthetic pill divs into the sidebar's relative wrapper — one with the legacy `top-0` and one with the fixed `topChromeInset.top` — and asserts the boundingBox y-coordinate sits below the 40px chrome strip in the fixed variant. A new `data-testid="app-sidebar-scroll-anchor"` on that wrapper gives the spec a stable selector without coupling to the shadcn Sidebar internals. Co-authored-by: Tyler Longwell <tlongwell@squareup.com> Signed-off-by: Tyler Longwell <tlongwell@squareup.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
The sidebar's "more unread above" pill (
MoreUnreadButtonwithposition="top") was anchored attop-0, placing it inside the 40 px top chrome strip. On macOS that strip holds the traffic-light buttons, so the pink "↑ N new" pill rendered right on top of them whenever channels were unread above the viewport.Reported in buzz-bugs with this screenshot:
Fix
Anchor the top variant to
topChromeInset.top(top-(--buzz-top-chrome-height,2.5rem)). This matches the existingmt-(--buzz-top-chrome-height)onSidebarContentand auto-tracks any future chrome-height change via the same CSS variable. Two-line source diff toMoreUnreadButton.tsx; no prop API change.Before / After
A new Playwright regression in the smoke project injects two synthetic pill divs into the sidebar — one with the legacy
top-0, one with the fixedtopChromeInset.top— and screenshots the top-left of the window. The pill's boundingBox y-coordinate is asserted to clear the 40 px chrome strip in the fixed variant.top-0)topChromeInset.top)(Screenshots posted in the bug thread.)
Notes
data-testid="app-sidebar-scroll-anchor"to the sidebar's relative wrapper so the spec has a stable selector without coupling to shadcnSidebarinternals.pnpm typecheck,pnpm check, and the new spec pass locally.