Skip to content
Merged
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
16 changes: 9 additions & 7 deletions webapp/src/components/AppShell.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ export function AppShell({ brand, toolbar, filters, rail, children }: AppShellPr
const [railOpen, setRailOpen] = useState(true);

return (
<div className="flex h-screen flex-col bg-bg text-ink">
<header className="flex items-center justify-between gap-3 border-b border-line bg-surface px-3 py-2">
<div className="flex h-screen min-w-0 flex-col overflow-hidden bg-bg text-ink">
<header className="flex shrink-0 flex-col gap-2 border-b border-line bg-surface px-3 py-2 md:flex-row md:items-center md:justify-between md:gap-3">
<div className="flex min-w-0 items-center gap-2">
<button
type="button"
Expand All @@ -27,21 +27,23 @@ export function AppShell({ brand, toolbar, filters, rail, children }: AppShellPr
</button>
{brand}
</div>
<div className="flex shrink-0 items-center gap-2">{toolbar}</div>
<div className="flex w-full min-w-0 flex-wrap items-center gap-2 overflow-x-auto md:w-auto md:shrink-0 md:flex-nowrap">

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Avoid clipping the toolbar date picker

When the toolbar contains the current DateRangeControl, its menu is an absolutely positioned child of this container, and the newly added overflow-x-auto makes the toolbar a clipping/scroll container. Opening the range picker will therefore constrain the dropdown to the toolbar's height instead of letting it overlay the page, which makes the presets/custom-date controls inaccessible in both desktop and narrow layouts.

Useful? React with 👍 / 👎.

{toolbar}
</div>
</header>

{filters ? (
// Fixed height so the bar doesn't jump when pills replace the "No filters" text.
<div className="flex h-9 shrink-0 items-center gap-2 overflow-x-auto border-b border-line bg-surface px-3">
<div className="flex min-h-9 shrink-0 flex-wrap items-center gap-2 overflow-x-auto border-b border-line bg-surface px-3 py-2 md:h-9 md:flex-nowrap md:py-0">
{filters}
</div>
) : null}

<div className={`grid min-h-0 flex-1 ${railOpen ? "grid-cols-[260px_1fr]" : "grid-cols-[0_1fr]"}`}>
<aside className={`min-h-0 overflow-y-auto border-r border-line bg-surface ${railOpen ? "" : "hidden"}`}>
<div className={`grid min-h-0 min-w-0 flex-1 grid-cols-1 ${railOpen ? "md:grid-cols-[260px_minmax(0,1fr)]" : "md:grid-cols-[0_minmax(0,1fr)]"}`}>
<aside className={`max-h-64 min-h-0 overflow-y-auto border-b border-line bg-surface md:max-h-none md:border-b-0 md:border-r ${railOpen ? "" : "hidden"}`}>
{rail}
</aside>
<main className="min-h-0 overflow-y-auto">{children}</main>
<main className="min-h-0 min-w-0 overflow-y-auto">{children}</main>
</div>
</div>
);
Expand Down
Loading