Skip to content

Commit 1d3b810

Browse files
wesbillmanCarl
andauthored
fix(desktop): paint community rail full height (#3382)
## Summary - paint the community rail across the full app height instead of exposing the parent background through external margins - preserve the existing community-button alignment and balanced horizontal gutters by moving vertical spacing inside the rail - update the rail geometry coverage to require full-height paint ownership ## Root cause PR #2972 aligned the rail box with the inset content by adding top and bottom margins to the `bg-sidebar` element. Margins are outside the painted box, so flat light and dark themes exposed a differently colored app background above and below the rail. ## Validation - pre-push `desktop-check` - pre-push desktop unit suite: 3,751 passed - `git diff --check` Local Playwright/E2E was not run; CI owns the full browser matrix. Signed-off-by: Wes <[email protected]> Co-authored-by: Carl <c7ebe626f000404285d3686e1dc74cc07cc60a9754a150041ba132e14bd3e2ec@buzz.block.builderlab.xyz>
1 parent 1d4f97b commit 1d3b810

2 files changed

Lines changed: 16 additions & 2 deletions

File tree

‎desktop/src/features/sidebar/ui/CommunityRail.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -370,7 +370,7 @@ export function CommunityRail({
370370
return (
371371
<nav
372372
aria-label="Communities"
373-
className="relative z-20 mb-2 mt-[calc(var(--buzz-top-chrome-height,40px)+1px)] flex w-14 shrink-0 flex-col items-center gap-2 overflow-y-auto bg-sidebar px-2.5 pb-3 pt-1.5"
373+
className="relative z-20 flex w-14 shrink-0 flex-col items-center gap-2 overflow-y-auto bg-sidebar px-2.5 pb-5 pt-[calc(var(--buzz-top-chrome-height,40px)+7px)]"
374374
data-testid="community-rail"
375375
>
376376
<DndContext

‎desktop/tests/e2e/community-rail.spec.ts‎

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -662,18 +662,32 @@ test.describe("community rail", () => {
662662
const buttonBox = await firstButton.boundingBox();
663663
const railBox = await page.getByTestId("community-rail").boundingBox();
664664
const searchBox = await page.getByTestId("open-search").boundingBox();
665+
const appSurfaceBox = await page
666+
.locator(".buzz-huddle-app-surface")
667+
.boundingBox();
665668
const contentBox = await page
666669
.locator("[data-buzz-content-surface]")
667670
.first()
668671
.boundingBox();
669672
expect(buttonBox).not.toBeNull();
670673
expect(railBox).not.toBeNull();
671674
expect(searchBox).not.toBeNull();
675+
expect(appSurfaceBox).not.toBeNull();
672676
expect(contentBox).not.toBeNull();
673677
expect(buttonBox?.y ?? 0).toBeGreaterThanOrEqual(32);
674-
expect(Math.abs((railBox?.y ?? 0) - (contentBox?.y ?? 0))).toBeLessThan(
678+
expect(
679+
Math.abs((buttonBox?.y ?? 0) - (contentBox?.y ?? 0) - 6),
680+
).toBeLessThan(0.5);
681+
expect(Math.abs((railBox?.y ?? 0) - (appSurfaceBox?.y ?? 0))).toBeLessThan(
675682
0.5,
676683
);
684+
expect(
685+
Math.abs(
686+
(railBox?.y ?? 0) +
687+
(railBox?.height ?? 0) -
688+
((appSurfaceBox?.y ?? 0) + (appSurfaceBox?.height ?? 0)),
689+
),
690+
).toBeLessThan(0.5);
677691

678692
const leftInset = (buttonBox?.x ?? 0) - (railBox?.x ?? 0);
679693
const rightInset =

0 commit comments

Comments
 (0)