improvement(menus): tighten dropdown spacing and cap the @ mention list - #6972
Conversation
Menu rows composed their own gap (8px) instead of the platform's chipContentGap (6px), so a menu row and the chip it opens over spaced their icon/label pairs differently. Surface padding was 6px against an 8px row radius and a 12px surface radius, so a first or last row's rounding cut across the corner it sat in; 4px makes them concentric. Separators carried a 13px gutter against a 0px gap between rows in the same group, which read as the groups floating apart. DropdownMenuLabel padded to an uncontrolled, font-dependent height and sat two type steps below its rows in a colour heavier than them; it now composes the shared row height at one step down in --text-muted. The @ mention list showed every integration. The per-family preview cap defaulted to uncapped, and integrations are 300+ near-identical rows sorted first, so the unfiltered list was the whole catalogue and no other family was reachable without scrolling past all of it. Capping is now the default, families are labelled, the menu is capped shorter than the action-menu default since it floats over the chat input, and the integrations shown are curated popular ones rather than whatever sorts first alphabetically. Both hand-rolled menus that render plain buttons for Radix focus reasons now compose the exported dropdownMenuRowClass instead of re-deriving row chrome.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
PR SummaryLow Risk Overview The empty Reviewed by Cursor Bugbot for commit 9910ead. Configure here. |
Greptile SummaryThis PR standardizes dropdown spacing and row chrome while making the
Confidence Score: 5/5The PR appears safe to merge, with no concrete blocking or independently actionable non-blocking issues identified. The changed ordering is confined to the intended mention surface, typed searches remain complete, and inserted section labels do not interfere with the menu’s item indexing or scroll targeting.
|
| Filename | Overview |
|---|---|
| packages/emcn/src/components/dropdown-menu/dropdown-menu.tsx | Consolidates reusable menu-row chrome and tightens shared content, label, group, search, and separator spacing without exposing a correctness issue. |
| apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/plus-menu-dropdown.tsx | Applies per-family preview limits, section labels, a lower height cap, and shared row styling while preserving flat keyboard indexing and uncapped typed search. |
| apps/sim/app/workspace/[workspaceId]/home/components/user-input/components/plus-menu-dropdown/resource-mention-items.ts | Adds a small deterministic helper that caps each empty-query resource-family preview while retaining family order. |
| apps/sim/blocks/integration-matcher.ts | Adds cached popular-first integration ordering while preserving the existing alphabetical listing API for full-catalog consumers. |
| apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/add-resource-dropdown/add-resource-dropdown.tsx | Supplies popular-first integrations to the shared resource data consumed by the mention menu; other current hook consumers exclude integrations. |
| apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-registry/resource-registry.tsx | Changes mention previews from selectively capped to a documented five-item default for every resource family. |
Reviews (1): Last reviewed commit: "improvement(menus): tighten dropdown spa..." | Re-trigger Greptile
Summary
Dropdown spacing — the menu was spaced wider than the surfaces it opens over:
gap-2(8px); now composeschipContentGap(6px), the token the chips and resource rows already use. The menu's icons are 14px vs the chip's 16px, so the extra 2px read wider still.p-1.5→p-1. An 8px row radius + 4px padding is exactly the 12px surface radius, so a first/last row's rounding now tracks its corner instead of cutting across it. Two consumers had already overridden this top-1by hand — both overrides removed.DropdownMenuLabelpadded to an uncontrolled, font-dependent height (nothing sets aline-height), sat two type steps below its rows, and used a colour heavier than the rows it introduces. Now composes the shared row height attext-caption/--text-muted, matching how the command palette and sidebar set their own section headings.gap-0.5fromDropdownMenuGroup(zero consumers) and the now-inertgap-0override it existed for.@mention list — it rendered the entire integration catalogue:integrationis 300+ near-identical rows sorted first, so nothing else was reachable without scrolling past all of them. Capping is now the default (MENTION_PREVIEW_DEFAULT_LIMIT); a family opts out by raising its own limit. Typing a query still searches every family in full.Shared chrome —
dropdownMenuRowClassis now exported. Both menus that render plain<button role="menuitem">(required: mounting/unmountingDropdownMenuItemmakes Radix's FocusScope steal focus mid-keystroke) compose it instead of re-deriving row chrome. The/skills menu carried a byte-identical copy of the literal and was migrated too, so it doesn't diverge from the@menu beside it.Type of Change
Testing
Verified against the running app in both light and dark themes, measuring the rendered geometry off the live DOM rather than by eye.
bun run check:audits— 32/32 passbun run lint— 26/26 passbun run type-check— clean inapps/simandpackages/emcnapps/sim, 92 inpackages/emcn. 8 new cases covering the preview cap and the popularity comparator — each verified to fail when its fix is reverted.Note:
check-block-registry.tsreports a pre-existingtable_v2/outputColumnssubblock failure that reproduces on a cleanstagingcheckout. Unrelated to this PR, which touches no block definitions.Checklist