Skip to content

Commit 4fdaedf

Browse files
[verified] fix(desktop): remove Thread Rail parent paint
Signed-off-by: Empire Operating <[email protected]>
1 parent ed73bc0 commit 4fdaedf

4 files changed

Lines changed: 23 additions & 9 deletions

File tree

‎desktop/src/app/AppShell.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -762,7 +762,7 @@ export function AppShell() {
762762
/>
763763
) : null}
764764
<SidebarProvider
765-
className="relative z-10 min-h-0 min-w-0 flex-1 flex-col overflow-visible"
765+
className="relative z-10 min-h-0 min-w-0 flex-1 flex-col overflow-visible !bg-transparent"
766766
data-testid="app-sidebar-layer"
767767
>
768768
<AppProfilePanelProvider>

‎desktop/src/features/channels/threadRailLayout.test.mjs‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,14 @@ test("isThreadRailVisible hides the rail at and below the desktop breakpoint", (
1717
assert.equal(isThreadRailVisible(601, 0), false);
1818
});
1919

20-
test("Thread Rail column replaces exposed sidebar paint without adding corners", () => {
20+
test("Thread Rail column is layout-only and owns no paint", () => {
2121
const className = threadRailColumnClassName();
2222

23-
assert.match(className, /buzz-theme-gradient-underlay/);
2423
assert.match(className, /self-stretch/);
2524
assert.match(className, /shrink-0/);
25+
assert.doesNotMatch(className, /buzz-theme-gradient-underlay/);
2626
assert.doesNotMatch(className, /rounded/);
27-
assert.doesNotMatch(className, /bg-background/);
28-
assert.doesNotMatch(className, /bg-sidebar/);
27+
assert.doesNotMatch(className, /bg-/);
2928
assert.doesNotMatch(className, /shadow/);
3029
assert.doesNotMatch(className, /ring/);
3130
});

‎desktop/src/features/channels/threadRailLayout.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
export const THREAD_RAIL_DESKTOP_BREAKPOINT_PX = 600;
22

33
export function threadRailColumnClassName(): string {
4-
return "buzz-theme-gradient-underlay hidden min-h-0 shrink-0 self-stretch min-[601px]:flex min-[601px]:flex-col";
4+
return "hidden min-h-0 shrink-0 self-stretch min-[601px]:flex min-[601px]:flex-col";
55
}
66

77
export function threadRailShellClassName(_collapsed: boolean): string {

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

Lines changed: 18 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,27 @@ test("pins a canonical thread, switches it from the collapsible rail, and unpins
6262
const railColumnElement = document.querySelector<HTMLElement>(
6363
'[data-testid="thread-rail-column"]',
6464
);
65+
const appSidebarLayer = document.querySelector<HTMLElement>(
66+
'[data-testid="app-sidebar-layer"]',
67+
);
6568
const contentElement = document.querySelector<HTMLElement>(
6669
"[data-buzz-content-surface]:not([data-buzz-content-unframed])",
6770
);
68-
if (!railElement || !railColumnElement || !contentElement) {
71+
if (
72+
!railElement ||
73+
!railColumnElement ||
74+
!appSidebarLayer ||
75+
!contentElement
76+
) {
6977
throw new Error(
70-
"Thread Rail, rail column, or framed content surface unavailable",
78+
"Thread Rail, rail column, app layer, or framed content surface unavailable",
7179
);
7280
}
7381
const railRect = railElement.getBoundingClientRect();
7482
const contentRect = contentElement.getBoundingClientRect();
7583
const railStyle = getComputedStyle(railElement);
7684
const railColumnStyle = getComputedStyle(railColumnElement);
85+
const appSidebarLayerStyle = getComputedStyle(appSidebarLayer);
7786
const contentStyle = getComputedStyle(contentElement);
7887
return {
7988
railTop: Math.round(railRect.top),
@@ -83,8 +92,11 @@ test("pins a canonical thread, switches it from the collapsible rail, and unpins
8392
railRadius: railStyle.borderTopLeftRadius,
8493
contentRadius: contentStyle.borderTopLeftRadius,
8594
railBackground: railStyle.backgroundColor,
95+
railColumnBackground: railColumnStyle.backgroundColor,
8696
railColumnBackgroundImage: railColumnStyle.backgroundImage,
8797
railColumnRadius: railColumnStyle.borderTopLeftRadius,
98+
appSidebarLayerBackground: appSidebarLayerStyle.backgroundColor,
99+
appSidebarLayerBackgroundImage: appSidebarLayerStyle.backgroundImage,
88100
contentBackground: contentStyle.backgroundColor,
89101
railClipPath: railStyle.clipPath,
90102
};
@@ -96,7 +108,10 @@ test("pins a canonical thread, switches it from the collapsible rail, and unpins
96108
});
97109
expect(paneGeometry.railBottom).toBe(paneGeometry.contentBottom);
98110
expect(paneGeometry.railColumnRadius).toBe("0px");
99-
expect(paneGeometry.railColumnBackgroundImage).toContain("linear-gradient");
111+
expect(paneGeometry.railColumnBackground).toBe("rgba(0, 0, 0, 0)");
112+
expect(paneGeometry.railColumnBackgroundImage).toBe("none");
113+
expect(paneGeometry.appSidebarLayerBackground).toBe("rgba(0, 0, 0, 0)");
114+
expect(paneGeometry.appSidebarLayerBackgroundImage).toBe("none");
100115
expect(paneGeometry.railClipPath).toBe("none");
101116
const entry = rail.getByTestId(`thread-rail-entry-${root.id}`);
102117
await expect(entry).toHaveAttribute("aria-current", "page");

0 commit comments

Comments
 (0)