Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -74,15 +74,15 @@ describe("ApplicationTitleBar", () => {
).toBeNull();
});

it("keeps title bar free of chrome inset when sidebar is expanded", () => {
it("aligns expanded title-bar breadcrumbs with page content", () => {
renderTitleBar("tauri", <button type="button">Route action</button>);
const banner = screen.getByRole("banner");
const leading = banner.querySelector<HTMLElement>('[data-slot="title-bar-leading"]');
const dragRegion = banner.querySelector<HTMLElement>('[data-slot="title-bar-drag-region"]');
const routeAction = screen.getByRole("button", { name: "Route action" });

// Expanded desktop: fixed toggle sits over the sidebar, not the content title bar.
expect(leading?.style.paddingLeft).toBe("0.5rem");
expect(leading?.style.paddingLeft).toBe("1rem");
expect(banner.querySelector("[data-tauri-drag-region]")).toBeNull();
expect(dragRegion).not.toBeNull();
if (!dragRegion) {
Expand Down
4 changes: 2 additions & 2 deletions apps/frontend/src/components/application-title-bar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ export function ApplicationTitleBar({ buildTarget }: ApplicationTitleBarProps) {
? hasNativeMacWindowChrome
? NATIVE_CHROME_LEADING_INSET
: WEB_CHROME_LEADING_INSET
: "0.5rem",
: "1rem",
};

return (
Expand Down Expand Up @@ -145,7 +145,7 @@ export function ApplicationTitleBar({ buildTarget }: ApplicationTitleBarProps) {
</div>
<div
data-slot="title-bar-actions"
className="flex shrink-0 flex-wrap items-center justify-end gap-2 px-6"
className="flex shrink-0 flex-wrap items-center justify-end gap-2 px-4"
>
<div
ref={titleBarContextValue?.setActionsTarget}
Expand Down
2 changes: 1 addition & 1 deletion apps/frontend/src/components/screen-base.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export function ScreenBase({ actions, children, className }: ScreenBaseProps) {
<div className={cn("flex min-h-0 flex-1 flex-col overflow-hidden", className)}>
<ApplicationTitleBarActions>{actions}</ApplicationTitleBarActions>
<ScrollArea className="min-h-0 flex-1">
<div className="flex min-h-full flex-col gap-4 p-6">{children}</div>
<div className="flex min-h-full flex-col gap-4 px-4 py-6">{children}</div>
</ScrollArea>
</div>
);
Expand Down
4 changes: 1 addition & 3 deletions apps/frontend/src/routes/__root.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ import {
SidebarMenuSubButton,
SidebarMenuSubItem,
SidebarProvider,
SidebarRail,
SidebarTrigger,
useSidebar,
} from "@/components/ui/sidebar";
Expand Down Expand Up @@ -133,7 +132,7 @@ function SidebarBrandMark({ className }: { className?: string }) {
)}
>
{/* Optical nudge: text-lg metrics sit slightly high in the 48px strip. */}
<span className="flex translate-y-[0.5px] items-center gap-1.5 leading-none">
<span className="flex translate-y-[0.5px] items-center gap-0 leading-none">
{/* size-8 matches icon menu buttons in the rail. */}
<span className="flex size-8 shrink-0 items-center justify-center text-lg leading-none font-semibold text-primary">
Expand Down Expand Up @@ -281,7 +280,6 @@ function AppSidebar({ buildTarget: sidebarBuildTarget }: AppSidebarProps) {
</SidebarMenuItem>
</SidebarMenu>
</SidebarFooter>
<SidebarRail />
</Sidebar>
);
}
16 changes: 15 additions & 1 deletion apps/frontend/src/styles.css
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
border-radius: var(--radius-xl);
}

[data-slot="scroll-area-scrollbar"][data-orientation="vertical"] {
width: 0.375rem;
}

[data-slot="scroll-area-scrollbar"][data-orientation="horizontal"] {
height: 0.375rem;
}

@custom-variant dark (&:is(.dark *));

@theme inline {
Expand Down Expand Up @@ -167,7 +175,13 @@
@apply border-border outline-ring/50;
}
body {
@apply bg-background text-foreground;
@apply select-none bg-background text-foreground;
}
input,
textarea,
[contenteditable="true"],
[contenteditable="plaintext-only"] {
user-select: text;
}
[data-sonner-toaster] {
--width: 356px;
Expand Down