Consolidate menu components - #8462
Merged
Merged
Conversation
Collaborator
Contributor
|
🐋 This PR was built and pushed to the following Docker images: Targets: Platforms: Image Tags: |
jonathanawesome
marked this pull request as ready for review
September 10, 2026 02:51
…y props from layout components
commit 4417211 Merge: b6fca46 fa60ae9 Author: Jonathan Brennan <jonathanawesome@users.noreply.github.com> Date: Thu Sep 10 07:46:01 2026 -0500 Merge branch 'main' into card-component-consolidation commit b6fca46 Author: Jonathan Brennan <jonathanawesome@users.noreply.github.com> Date: Thu Sep 10 06:40:55 2026 -0500 strip unnecessary size prop commit 9be9423 Author: Jonathan Brennan <jonathanawesome@users.noreply.github.com> Date: Thu Sep 10 06:39:05 2026 -0500 remove stray console.log commit 158aa44 Author: Jonathan Brennan <jonathanawesome@users.noreply.github.com> Date: Thu Sep 10 06:29:49 2026 -0500 update type color for DocsNote, SubPageLayoutHeader; strip unnecessary props from layout components commit fa60ae9 Author: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu Sep 10 12:54:26 2026 +0200 chore(deps-dev): bump nodemailer from 9.1.0 to 9.1.1 (#8458) Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> commit 117b767 Author: Jonathan Brennan <jonathanawesome@users.noreply.github.com> Date: Wed Sep 9 17:02:47 2026 -0500 revert env.template change
jonathanawesome
changed the base branch from
main
to
card-component-consolidation
September 10, 2026 13:56
jdolle
reviewed
Sep 10, 2026
jdolle
reviewed
Sep 10, 2026
Co-authored-by: jdolle <1841898+jdolle@users.noreply.github.com>
jdolle
approved these changes
Sep 10, 2026
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.
This PR replaces
@/components/ui/dropdown-menuwithbase/floating/menu, reworking that component to a data-driven API in the process, and adds abase/floating/tooltipbuilt on Base UI. It removes the last menu implementation from the app along with the@radix-ui/react-dropdown-menudependency: 36 files, +1745/-1293.Stacked on #8345 (card consolidation).
Menus are now described, not composed
ui/dropdown-menuwas a Radix wrapper used by 12 files (12 menus, 95 elements).base/menualready existed and wrapped@base-ui/react, but composed its rows from JSX in asectionsarray. Both are gone in favour of one component whosesectionsprop takes data:There is no
MenuItemto assemble by hand and no key to thread through. Each array in sections is a group and the component rules between them, soDropdownMenuSeparatorbecomes structure rather than an element. Falsy entries are dropped and an emptied section takes its separator with it, so a conditional row is justcond && { label: … }.Seven entry kinds, each with its own preview so they are discoverable: action (the default, no kind), link, submenu, checkbox, toggle, radio and header.
New: base/tooltip
Built on Base UI, taking trigger and content with delay, disabled, arrow and the usual side/align props. Deliberately smaller than the other floating panels at
text-xsandmax-w-64, since a tooltip explains the surface it sits over and previously rendered larger than the menu it was attached to. Adopted inbase/menuandbase/stat-card; the 105ui/tooltipcall sites elsewhere are untouched and will be migrated in their own PR.Fixes found along the way
Smaller changes worth knowing
addOperationin the laboratory collections plugin takes acollectionId: stringinstead of readinge.currentTarget.dataset.collectionIdoff the event. Both call sites already had theidin scope; the DOM round-trip existed only because the old API had nowhere else to put it.FloatingProps.triggeralso accepts a render function, for the one case where another wrapper needs to own the same element.GraphiQLTooltipdestructures only{ children, align, side, sideOffset, label }and forwards nothing, so passing it as the trigger would swallow the menu's props.