fix: prevent dropdown labels from requiring groups#122
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
This PR fixes a runtime crash when opening certain dropdown menus by removing the dependency on Base UI’s Menu.GroupLabel context, and restores lockfile correctness so installs can run with --frozen-lockfile.
Changes:
- Update
DropdownMenuLabelto render a plaindiv(instead ofMenu.GroupLabel) so labels don’t require being nested underMenu.Group. - Remove an accidentally duplicated YAML document from
pnpm-lock.yamlthat was breaking frozen installs.
Reviewed changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
components/ui/dropdown-menu.tsx |
Changes the shared dropdown label wrapper to a plain div to prevent Base UI context errors when used outside groups. |
pnpm-lock.yaml |
Removes a duplicated YAML document to restore valid lockfile structure for pnpm install --frozen-lockfile. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Pin pnpm/action-setup to pnpm 10.19.0 so the existing lockfile can be used with frozen installs in CI. pnpm 11 currently rewrites package-manager metadata from devEngines before install and then fails with ERR_PNPM_NO_LOCKFILE.
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.
Pull Request
Description
Fixes the site replication peer action menu crash reported in rustfs/rustfs#3066.
The dropdown label wrapper was rendering Base UI's
Menu.GroupLabeldirectly. In Base UI, group labels must be nested underMenu.Group; otherwise opening the dropdown throwsBase UI: MenuGroupRootContext is missing, causing the page-level error fallback. The shared dropdown label now renders a plaindiv, matching the expected shadcn-style label behavior for non-grouped menu sections.This also removes an accidentally duplicated YAML document from
pnpm-lock.yaml, which was breaking frozen installs, and updates GitHub Actions to usepnpm install --frozen-lockfileinstead of the unsupported/brokenpnpm cicommand for pnpm projects.Type of Change
Testing
No unit test script is defined in
package.json; this change is covered by type-check/lint/build validation.Checklist
Related Issues
Related to rustfs/rustfs#3066
Screenshots (if applicable)
N/A
Additional Notes
N/A