Skip to content

Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.

Go

MUL-8779 feat(rail): narrow the app rail from 64px to 56px (#10130)

Jiayuan Zhangd1f32dad63bb
diff --git a/apps/desktop/src/renderer/src/components/desktop-layout.test.tsx b/apps/desktop/src/renderer/src/components/desktop-layout.test.tsx
index b90e778f9c..6acd8642e8 100644
--- a/apps/desktop/src/renderer/src/components/desktop-layout.test.tsx
+++ b/apps/desktop/src/renderer/src/components/desktop-layout.test.tsx
@@ -159,10 +159,10 @@ describe("DesktopShell sidebar trigger", () => {
"data-external-trigger",
"true",
);
- // The toolbar floats over the 64px rail; the tabs start past the rest
+ // The toolbar floats over the 56px rail; the tabs start past the rest
// of it whether or not the panel inside the card is open.
const mainTopBar = container.querySelector('[data-slot="main-top-bar"]');
- expect(mainTopBar).toHaveStyle({ paddingLeft: "136px" });
+ expect(mainTopBar).toHaveStyle({ paddingLeft: "144px" });
fireEvent.click(
container.querySelector('[data-slot="sidebar-trigger"]')!,
@@ -171,7 +171,7 @@ describe("DesktopShell sidebar trigger", () => {
"data-sidebar-state",
"collapsed",
);
- expect(mainTopBar).toHaveStyle({ paddingLeft: "136px" });
+ expect(mainTopBar).toHaveStyle({ paddingLeft: "144px" });
expect(queryByRole("status", { name: /loading workspace/i })).toBeNull();
});
diff --git a/apps/desktop/src/renderer/src/components/desktop-layout.tsx b/apps/desktop/src/renderer/src/components/desktop-layout.tsx
index 14326e19e9..64b123fafe 100644
--- a/apps/desktop/src/renderer/src/components/desktop-layout.tsx
+++ b/apps/desktop/src/renderer/src/components/desktop-layout.tsx
@@ -44,7 +44,7 @@ import { WindowOverlay } from "./window-overlay";
import { WindowToolbar, WINDOW_TOOLBAR_CLEARANCE } from "./window-toolbar";
const TOP_BAR_HEIGHT_CLASS = "h-10";
-const RAIL_WIDTH = 64;
+const RAIL_WIDTH = 56;
const TITLE_BAR_ACTION_CLASS =
"flex size-7 items-center justify-center rounded-md text-faint-foreground transition-colors duration-150 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground focus-visible:outline-2 focus-visible:outline-offset-2 [&_svg]:size-4";
diff --git a/packages/views/layout/app-rail.tsx b/packages/views/layout/app-rail.tsx
index c81f87a2f4..adf1d0250d 100644
--- a/packages/views/layout/app-rail.tsx
+++ b/packages/views/layout/app-rail.tsx
@@ -95,7 +95,7 @@ function RailBadgeMark({ badge }: { badge: RailBadge }) {
<span
aria-hidden
className={cn(
- "absolute top-1.5 right-3.5 size-2 rounded-full bg-warning",
+ "absolute top-1 right-3 size-2 rounded-full bg-warning",
ring,
)}
/>
@@ -106,7 +106,7 @@ function RailBadgeMark({ badge }: { badge: RailBadge }) {
value={badge.value}
animated={false}
className={cn(
- "absolute top-0.5 right-1.5 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] leading-none font-medium tabular-nums",
+ "absolute top-0 right-1 flex h-4 min-w-4 items-center justify-center rounded-full px-1 text-[10px] leading-none font-medium tabular-nums",
ring,
badge.tone === "brand" ? "bg-brand text-brand-foreground" : "bg-foreground text-background",
)}
@@ -156,10 +156,10 @@ function RailSpaceLink({
draggable={false}
aria-current={active ? "page" : undefined}
{...peekHandlers}
- className="group relative flex h-[52px] w-[52px] flex-col items-center justify-center gap-1 rounded-xl text-muted-foreground transition-colors outline-none hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground focus-visible:outline-2 focus-visible:outline-ring aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-sidebar-accent-foreground"
+ className="group relative flex size-12 flex-col items-center justify-center gap-1 rounded-xl text-muted-foreground transition-colors outline-none hover:bg-sidebar-accent/60 hover:text-sidebar-accent-foreground focus-visible:outline-2 focus-visible:outline-ring aria-[current=page]:bg-sidebar-accent aria-[current=page]:font-medium aria-[current=page]:text-sidebar-accent-foreground"
>
<Icon className="size-5" />
- <span className="max-w-full truncate px-1 text-micro leading-[14px]">{label}</span>
+ <span className="max-w-full truncate px-0.5 text-micro leading-[14px]">{label}</span>
{badge && <RailBadgeMark badge={badge} />}
</AppLink>
</TooltipHint>
@@ -292,7 +292,7 @@ export function AppRail({
aria-label={t(($) => $.rail.label)}
data-slot="app-rail"
className={cn(
- "flex h-full w-16 shrink-0 flex-col items-center overflow-y-auto overflow-x-hidden pt-3 pb-2.5 [scrollbar-width:none]",
+ "flex h-full w-14 shrink-0 flex-col items-center overflow-y-auto overflow-x-hidden pt-3 pb-2.5 [scrollbar-width:none]",
className,
)}
>