Repository navigation
Scroll the notifications inbox instead of overflowing the popover - #109
Merged
Merged
Conversation
… the popover Follow-up to #102/#105 (which fixed horizontal text wrap) — the list still overflowed VERTICALLY: items 5+ spilled below the 320px popover card onto the page. Cause: the list was wrapped in a shadcn <ScrollArea className="max-h-80">. Radix's Viewport is size-full (height:100%), but height:100% doesn't resolve against a parent that only has max-height (no definite height), so the viewport grew to the full content height and — since the root doesn't clip — the extra items rendered below the card. Fix: use a native `max-h-80 overflow-y-auto overscroll-contain` scroller (which clamps + scrolls correctly) and add `overflow-hidden` to the PopoverContent so the rounded card clips cleanly. Drops the now-unused ScrollArea import. Verified visually with a mock 8-item inbox: the list scrolls within the card, the rounded corners stay clean, and long unbroken names still wrap. tsc clean, lint 0 errors (36 baseline warnings), 197 tests. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #102 / #105. That PR fixed horizontal text wrap; the bell inbox still overflowed vertically — with 8 notifications, items 5+ spilled below the popover card onto the page (no card background behind them).
Cause
The list was wrapped in a shadcn
<ScrollArea className="max-h-80">. Radix's Viewport issize-full(height: 100%), butheight: 100%doesn't resolve against a parent that only hasmax-height(no definite height). So the viewport grew to the full content height and — since the root doesn't clip — the extra items rendered past the 320px card.Fix (
NotificationsBell.tsx)ScrollAreawith a nativemax-h-80 overflow-y-auto overscroll-containscroller — a native scroll container clamps to its max-height and scrolls correctly (no percentage-height pitfall).overflow-hiddento thePopoverContentso the rounded card clips its contents cleanly.ScrollAreaimport.Verification
bunx tsc --noEmitclean ·bun run lint0 errors · 197 tests.Visual (chrome-devtools, mock 8-item inbox): the list now scrolls within the card with a scrollbar, nothing spills below, the rounded corners stay clean — and a long unbroken event name still wraps (the #102 behavior holds). Verified on a throwaway page (deleted before commit) since the real bell needs a connected wallet + on-chain events.
🤖 Generated with Claude Code