Skip to content

Commit fbb3401

Browse files
PollyGlotclaude
andcommitted
fix(web): keep highlighted command menu items clear of the scroll fade
Keyboard navigation in composer menus scrolled the active item flush against the viewport edge, where the 24px scroll fade and the 20px container radius clipped it. Scroll padding on faded scroll areas now matches the fade size, and the composer command list gets enough vertical padding to clear the rounded corner at the extremes. Co-Authored-By: Claude Fable 5 <[email protected]>
1 parent 2f486ab commit fbb3401

2 files changed

Lines changed: 2 additions & 2 deletions

File tree

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -144,7 +144,7 @@ export const ComposerCommandMenu = memo(function ComposerCommandMenu(props: {
144144
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 ? (
147-
<CommandList className="max-h-72">
147+
<CommandList className="max-h-72 not-empty:py-3">
148148
{groups.map((group, groupIndex) => (
149149
<div key={group.id}>
150150
{groupIndex > 0 ? <CommandSeparator className="my-0.5" /> : null}

‎apps/web/src/components/ui/scroll-area.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ function ScrollArea({
4545
"h-full max-h-[inherit] overflow-auto overscroll-contain rounded-[inherit] outline-none transition-shadows focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-1 focus-visible:ring-offset-background data-has-overflow-x:overscroll-x-contain",
4646
chainVerticalScroll && "overscroll-y-auto",
4747
scrollFade &&
48-
"mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",
48+
"scroll-p-[var(--fade-size)] mask-t-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-start)))] mask-b-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-y-end)))] mask-l-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-start)))] mask-r-from-[calc(100%-min(var(--fade-size),var(--scroll-area-overflow-x-end)))] [--fade-size:1.5rem]",
4949
scrollbarGutter && "scrollbar-gutter-stable",
5050
hideScrollbars &&
5151
"[-ms-overflow-style:none] [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",

0 commit comments

Comments
 (0)