Conversation
Actions can now be marked `disabled` or carry a `disabledReason`, which
renders the item as `aria-disabled` (still focusable for keyboard menu
navigation, per WAI-ARIA) with a tooltip explaining why the action is
unavailable. This replaces the local DisabledDeleteAction (vpc),
VolumeActions.disabledReason (volumes) and ActionsCell tooltip wrappers
(settings) in the microfrontends.
`openOnHover={false}` switches both the inline and the portal variant to a
click-only trigger, which compute and volumes implemented locally because
the menu previously only opened on hover.
After selecting an action, hover no longer re-reveals the menu until the
pointer leaves the trigger. In the inline variant the panel stayed visible
after a click because the pointer was still inside the `group`; the
objectstore microfrontend worked around it with a pointer-events latch.
The suppression reset lives on the trigger button rather than the wrapper
because React emulates pointerleave from the component tree, so the portal
menu counts as inside the wrapper.
The portal test suite no longer calls `vi.unstubAllGlobals()`, which was
removing the ResizeObserver stub from tests/setup.ts and broke Radix
Tooltip inside the menu.
`disabledReasonSide` can be set per action or once on `Actions` as the default for every item. A `disabled` action without `disabledReason` renders no tooltip at all; the tooltip is opt-in through `disabledReason`.
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.
Summary
Upstreams behaviour the microfrontends had to reimplement on top of
VirtualizedTable.Actions:disabled/disabledReasonper action: the item rendersaria-disabled(still focusable for keyboard navigation) and, when a reason is given, shows it in aTooltip. ReplacesDisabledDeleteAction(vpc),VolumeActions.disabledReason(volumes) and the tooltip-wrapped disabled buttons in settings.openOnHover={false}: click-only trigger for both the inline and the portal variant. Compute (InstanceActions) and volumes (VolumeActions) rewrote the whole menu just to get this.group(objectstoreFileActionsCellhad a pointer-events latch for this).Notes
vi.unstubAllGlobals()in the portal test suite was removing theResizeObserverstub fromtests/setup.ts, which broke Radix Tooltip inside the menu. It now restores onlyinnerHeight.Test plan
npx vitest run lib/components/VirtualizedTable(74 tests)npm run lint,npm run check:types, prettieropenOnHoverin a story