From 791b4caebda8e531514eb0af3e8b834972447177 Mon Sep 17 00:00:00 2001 From: David Dada Date: Sun, 21 Jun 2026 22:14:52 +0100 Subject: [PATCH] fix(notifications): scroll the bell inbox instead of overflowing past the popover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 . 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) --- web/components/NotificationsBell.tsx | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/web/components/NotificationsBell.tsx b/web/components/NotificationsBell.tsx index 901f38f..c59bfee 100644 --- a/web/components/NotificationsBell.tsx +++ b/web/components/NotificationsBell.tsx @@ -10,7 +10,6 @@ import { PopoverContent, PopoverTrigger, } from "@/components/ui/popover"; -import { ScrollArea } from "@/components/ui/scroll-area"; import { cn } from "@/lib/utils"; import { Icon } from "@/components/Icon"; import { @@ -62,7 +61,7 @@ export interface NotificationsBellProps { /** * Pure UI: the bell trigger + popover inbox. Ported from the prototype's - * notifications-bell.tsx (shadcn Popover/Button/Badge/ScrollArea + motion), + * notifications-bell.tsx (shadcn Popover/Button/Badge + motion), * decoupled from any data source — it only takes an AppNotification[] + handlers. * The data is supplied by {@link NotificationsBellContainer} via useNotifications. */ @@ -98,7 +97,7 @@ export function NotificationsBell({
@@ -136,7 +135,7 @@ export function NotificationsBell({
- +
{notifications.length === 0 ? (
@@ -202,7 +201,7 @@ export function NotificationsBell({ )} - +
);