Skip to content

fix(email-blocks): keep the contact filter popovers on screen - #192

Merged
clbotdev merged 2 commits into
mainfrom
fix/email-blocks-popover-height
Nov 12, 2026
Merged

clbotdev merged 2 commits into
mainfrom
fix/email-blocks-popover-height

Conversation

@clbotdev

@clbotdev clbotdev commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Problem

The contact filter builder's popovers have no height limit. When one is taller than the space left in the viewport, part of it is pushed off screen. With eight filter types, the filter menu's "Add filter" heading and top items run past the top of the window when it opens upwards.

Fix

The segment and filter popovers in contact-filter-builder.tsx are capped to --radix-popover-content-available-height, the space Radix reports is left on screen, and scroll whatever doesn't fit.

The shadcn PopoverContent primitive stays stock. Like upstream shadcn, it leaves height to its content: shadcn caps menu components such as DropdownMenu and Select, not the general-purpose popover. Fixing it at the call site means a future shadcn add can't overwrite it. The class uses the bracket form max-h-[var(...)], which works with both the package's Tailwind 3 setup and consumers' Tailwind 4 scanning.

A patch changeset for @sendlit/email-blocks is included.

Checks

  • email-blocks: typecheck, Biome and tests (10/10) pass.
  • No test added: the change is a styling class with no logic to test.

Cap PopoverContent to the height Radix reports is left on screen and
scroll the overflow, so long lists such as the contact filter menu no
longer run off the edge.
…primitive

PopoverContent is stock shadcn and, like upstream, leaves height to the
content. Restore it and cap the contact filter builder's segment and
filter popovers at the call site instead, so a future shadcn add can't
overwrite the fix.
@clbotdev clbotdev changed the title fix(email-blocks): keep popovers within the viewport fix(email-blocks): keep the contact filter popovers on screen Nov 12, 2026
@clbotdev
clbotdev merged commit a954d21 into main Nov 12, 2026
6 checks passed
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.

2 participants