Skip to content

Commit d471299

Browse files
fix(web): preserve dropdown elevation overrides
Co-authored-by: Julius Marminge <[email protected]>
1 parent 8925f19 commit d471299

11 files changed

Lines changed: 60 additions & 11 deletions

‎apps/web/src/components/chat/ComposerCommandMenu.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -141,7 +141,7 @@ export const ComposerCommandMenu = memo(function ComposerCommandMenu(props: {
141141
>
142142
<div
143143
ref={listRef}
144-
className="dropdown-glass relative w-full overflow-hidden rounded-[20px] **:data-[slot=scroll-area-scrollbar]:data-[orientation=vertical]:my-4"
144+
className="dropdown-glass relative w-full overflow-hidden rounded-[20px] shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] **:data-[slot=scroll-area-scrollbar]:data-[orientation=vertical]:my-4 dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]"
145145
>
146146
{props.items.length > 0 ? (
147147
<CommandList className="max-h-72">

‎apps/web/src/components/chat/ComposerStashMenu.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export const ComposerStashMenu = memo(function ComposerStashMenu(props: {
9191

9292
return (
9393
<Command autoHighlight={false} mode="none">
94-
<div className="dropdown-glass relative w-full overflow-hidden rounded-[20px]">
94+
<div className="dropdown-glass relative w-full overflow-hidden rounded-[20px] shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]">
9595
<CommandList className="max-h-72">
9696
<CommandGroup>
9797
<CommandGroupLabel className="flex items-center gap-1.5 px-3 pt-2 pb-1 text-[10px] font-semibold uppercase tracking-[0.08em] text-secondary-label">

‎apps/web/src/components/chat/MessagesTimeline.test.tsx‎

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -226,6 +226,22 @@ function buildUserTimelineEntry(text: string) {
226226
}
227227

228228
describe("MessagesTimeline", () => {
229+
it("uses the larger leading inset only when the top fade is enabled", () => {
230+
const timelineEntries = [buildUserTimelineEntry("Hello")];
231+
232+
const compactMarkup = renderToStaticMarkup(
233+
<MessagesTimeline {...buildProps()} timelineEntries={timelineEntries} />,
234+
);
235+
const fadedMarkup = renderToStaticMarkup(
236+
<MessagesTimeline {...buildProps()} timelineEntries={timelineEntries} topFadeEnabled />,
237+
);
238+
239+
expect(compactMarkup).toContain('class="h-3 sm:h-4"');
240+
expect(compactMarkup).not.toContain("topbar-scroll-fade");
241+
expect(fadedMarkup).toContain('class="h-10 sm:h-12"');
242+
expect(fadedMarkup).toContain("topbar-scroll-fade");
243+
});
244+
229245
it("keeps assistant changed-files headers sticky below the thread header", () => {
230246
const assistantMessageId = MessageId.make("message-assistant-with-files");
231247
const turnId = TurnId.make("turn-with-files");

‎apps/web/src/components/chat/ModelPickerContent.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -598,7 +598,7 @@ export const ModelPickerContent = memo(function ModelPickerContent(props: {
598598
return (
599599
<TooltipProvider delay={0}>
600600
<div
601-
className="dropdown-glass relative flex h-screen max-h-86.5 w-screen max-w-90 flex-row overflow-hidden rounded-lg text-popover-foreground [clip-path:inset(0_round_var(--radius-lg))]"
601+
className="dropdown-glass relative flex h-screen max-h-86.5 w-screen max-w-90 flex-row overflow-hidden rounded-lg text-popover-foreground shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] [clip-path:inset(0_round_var(--radius-lg))] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]"
602602
data-model-picker-content="true"
603603
>
604604
{/* Sidebar */}

‎apps/web/src/components/threadSidebarWidth.test.ts‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
// @effect-diagnostics nodeBuiltinImport:off - Regression coverage compares the sidebar component with its width contract.
2+
import * as NodeFS from "node:fs";
3+
14
import { describe, expect, it } from "vite-plus/test";
25

36
import {
@@ -31,4 +34,15 @@ describe("thread sidebar width", () => {
3134
it("keeps the sidebar minimum when the whole layout is narrower than its minimums", () => {
3235
expect(resolveInitialThreadSidebarWidth(900, 700)).toBe(THREAD_SIDEBAR_MIN_WIDTH);
3336
});
37+
38+
it("shows the desktop wordmark across the sidebar's full legal width range", () => {
39+
const sidebarSource = NodeFS.readFileSync(
40+
new URL("./sidebar/SidebarChrome.tsx", import.meta.url),
41+
"utf8",
42+
);
43+
44+
expect(sidebarSource).toContain("hidden h-7 w-fit min-w-0 shrink-0 items-center gap-1");
45+
expect(sidebarSource).toContain("md:flex");
46+
expect(THREAD_SIDEBAR_MIN_WIDTH).toBe(13 * 16);
47+
});
3448
});

‎apps/web/src/components/ui/combobox.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ function ComboboxPopup({
170170
>
171171
<span
172172
className={cn(
173-
"dropdown-glass relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-lg transition-[scale,opacity]",
173+
"dropdown-glass relative flex max-h-full min-w-(--anchor-width) max-w-(--available-width) origin-(--transform-origin) rounded-lg shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] transition-[scale,opacity] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]",
174174
className,
175175
)}
176176
>

‎apps/web/src/components/ui/menu.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ function MenuPopup({
4949
>
5050
<MenuPrimitive.Popup
5151
className={cn(
52-
"dropdown-glass relative flex not-[class*='w-']:min-w-32 origin-(--transform-origin) rounded-lg outline-none focus:outline-none",
52+
"dropdown-glass relative flex not-[class*='w-']:min-w-32 origin-(--transform-origin) rounded-lg shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] outline-none focus:outline-none dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]",
5353
className,
5454
)}
5555
data-slot="menu-popup"

‎apps/web/src/components/ui/popover.tsx‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,8 @@ function PopoverPopup({
5252
"dropdown-glass relative flex h-(--popup-height,auto) w-(--popup-width,auto) origin-(--transform-origin) rounded-lg text-popover-foreground outline-none transition-[width,height,scale,opacity] before:pointer-events-none before:absolute before:inset-0 before:rounded-[calc(var(--radius-lg)-1px)] before:shadow-[0_1px_--theme(--color-black/4%)] has-data-[slot=calendar]:rounded-xl has-data-[slot=calendar]:before:rounded-[calc(var(--radius-xl)-1px)] data-starting-style:scale-98 data-starting-style:opacity-0 dark:before:shadow-[0_-1px_--theme(--color-white/6%)]",
5353
tooltipStyle &&
5454
"w-fit text-balance rounded-md text-xs shadow-md/5 before:rounded-[calc(var(--radius-md)-1px)]",
55+
!tooltipStyle &&
56+
"shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]",
5557
className,
5658
)}
5759
data-slot="popover-popup"

‎apps/web/src/components/ui/select.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ function SelectPopup({
150150
</SelectPrimitive.ScrollUpArrow>
151151
<div
152152
className={cn(
153-
"dropdown-glass relative h-full rounded-lg",
153+
"dropdown-glass relative h-full rounded-lg shadow-[0_16px_40px_-18px_rgb(0_0_0/55%)] dark:shadow-[0_18px_44px_-18px_rgb(0_0_0/80%)]",
154154
matchTriggerWidth && "min-w-(--anchor-width)",
155155
popupClassName,
156156
)}

‎apps/web/src/index.css‎

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -344,11 +344,6 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil
344344
-webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
345345
backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-saturation));
346346
border: 1px solid color-mix(in srgb, var(--foreground) 10%, transparent);
347-
box-shadow: 0 16px 40px -18px rgb(0 0 0 / 55%);
348-
349-
@variant dark {
350-
box-shadow: 0 18px 44px -18px rgb(0 0 0 / 80%);
351-
}
352347

353348
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
354349
background: var(--popover) !important;

0 commit comments

Comments
 (0)