Skip to content

Scroll the notifications inbox instead of overflowing the popover - #109

Merged
dadadave80 merged 1 commit into
mainfrom
fix/notif-popover-scroll
Jun 21, 2026
Merged

dadadave80 merged 1 commit into
mainfrom
fix/notif-popover-scroll

Conversation

@dadadave80

Copy link
Copy Markdown
Member

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 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 past the 320px card.

Fix (NotificationsBell.tsx)

  • Replace the ScrollArea with a native max-h-80 overflow-y-auto overscroll-contain scroller — a native scroll container clamps to its max-height and scrolls correctly (no percentage-height pitfall).
  • Add overflow-hidden to the PopoverContent so the rounded card clips its contents cleanly.
  • Drop the now-unused ScrollArea import.

Verification

bunx tsc --noEmit clean · bun run lint 0 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

… 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>
@vercel

vercel Bot commented Jun 21, 2026 •

Copy link
Copy Markdown
Contributor

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
hostit-sui Ready Ready Preview, Comment Jun 21, 2026 9:16pm

@dadadave80
dadadave80 merged commit 6e30b69 into main Jun 21, 2026
7 checks passed
@dadadave80
dadadave80 deleted the fix/notif-popover-scroll branch June 21, 2026 21:23

This branch was successfully deployed

1 active deployment
Preview — 791b4cae Deployed Jun 21, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant