You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
This branch migrates the action menu component by introducing a new set of custom styles for it when previously none existed. The migration includes updates to its nested components to align with the latest design standards.
The action menu is a composite component that combines an action button with a popover and a menu.
This migration introduces several key improvements:
Action menu
Limited positioning: To align with design guidance, the action menu offers a subset of the popover positioning and so the available Storybook knobs were reduced and documentation added.
S2 token integration: Migrated to use the new S2 token --spectrum-actionmenu-button-to-menu-gap.
Component architecture: To align with standard class naming conventions, the following new classes were added: .spectrum-ActionMenu, .spectrum-ActionMenu-trigger, .spectrum-ActionMenu-popover, .spectrum-ActionMenu-menu.
Documentation: Added detailed stories showcasing positioning variants, icon customization, and menu state management per design guidelines.
Action button
Improved accessibility: Added hasLongPress parameter for better control over icon display and to ensure correct aria attributes were in place.
Icon system
Enhanced styling support: Improved icon template with better styling support, custom style handling, and proper color inheritance. Added customStyles parameter and better integration between fill property and custom styles.
Menu component
Better sizing: Updated inline-size from auto to max-content for improved layout consistency when menus are rendered inside popover (or other containers).
Popover component
Modernized positioning: Replaced deprecated TipPlacementVariants with new ArgGrid system for better positioning options and cleaned up/simplified some of the popover positioning logic to ensure more accurate results.
Storybook infrastructure
Enhanced argument handling: Added resetArgs functionality for better story state management.
Minor linting fixes: Applied a few linting fixes to the stylesheets used by Storybook.
The component now follows modern S2 patterns while maintaining backward compatibility and significantly improving the overall user experience and developer experience.
Motivation and context
The action menu component now has its own stylesheet with S2 design tokens and component architecture. This migration ensures consistency with other migrated components and provides improved accessibility, better positioning options, and enhanced visual design.
Related issue(s)
fixes CSS-1160
Screenshots (coming soon)
Author's checklist
I have read the CONTRIBUTING and PULL_REQUESTS documents.
I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
I have added automated tests to cover my changes.
I have included a well-written changeset if my change needs to be published.
I have included updated documentation if my change required it.
Reviewer's checklist
Includes a Github Issue with appropriate flag or Jira ticket number without a link
Includes thoughtfully written changeset if changes suggested include patch, minor, or major features
Automated tests cover all use cases and follow best practices for writing
Validated on all supported browsers
All VRTs are approved before the author can update Golden Hash
Manual review test cases
Action menu positioning and alignment
Go to the action menu component stories
Test different position options (bottom-start, bottom-end, start-top, end-top)
Expect proper alignment and no visual regressions
Icon and label customization
Go to the action menu component stories
Test different icon names and labels
Expect proper icon rendering and label display
Menu state management
Go to the action menu component stories
Toggle between open and closed states
Expect proper visual feedback and accessibility attributes
S2 token integration
Inspect the component's CSS custom properties
Verify proper usage of --spectrum-actionmenu-button-to-menu-gap and spacing tokens
Expect consistent spacing and alignment with S2 design system
Component structure validation
Check the generated HTML structure
Verify proper class naming (ActionMenu, ActionMenu-trigger, ActionMenu-popover, ActionMenu-menu)
Expect clean, semantic markup structure
Device review
Did it pass in Desktop?
Did it pass in (emulated) Mobile?
Did it pass in (emulated) iPad?**
castastrophe
changed the title
feat(action-menu): S2 migration
feat(action-menu): S2 migration [CSS-1160]
Jul 29, 2025
Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.
This PR includes no changesets
When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types
castastrophe
added
size-2 S
~6-18hrs; not hard or time consuming, one or two work days to complete.
wip
This is a work in progress, don't judge.
run_vrt
For use on PRs looking to kick off VRT
S2
Spectrum 2
labels
Aug 4, 2025
run_vrtFor use on PRs looking to kick off VRTS2Spectrum 2size-2 S~6-18hrs; not hard or time consuming, one or two work days to complete.wipThis is a work in progress, don't judge.
2 participants
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.
Description
This branch migrates the action menu component by introducing a new set of custom styles for it when previously none existed. The migration includes updates to its nested components to align with the latest design standards.
The action menu is a composite component that combines an action button with a popover and a menu.
This migration introduces several key improvements:
Action menu
--spectrum-actionmenu-button-to-menu-gap
..spectrum-ActionMenu
,.spectrum-ActionMenu-trigger
,.spectrum-ActionMenu-popover
,.spectrum-ActionMenu-menu
.Action button
hasLongPress
parameter for better control over icon display and to ensure correct aria attributes were in place.Icon system
customStyles
parameter and better integration betweenfill
property and custom styles.Menu component
auto
tomax-content
for improved layout consistency when menus are rendered inside popover (or other containers).Popover component
TipPlacementVariants
with newArgGrid
system for better positioning options and cleaned up/simplified some of the popover positioning logic to ensure more accurate results.Storybook infrastructure
resetArgs
functionality for better story state management.The component now follows modern S2 patterns while maintaining backward compatibility and significantly improving the overall user experience and developer experience.
Motivation and context
The action menu component now has its own stylesheet with S2 design tokens and component architecture. This migration ensures consistency with other migrated components and provides improved accessibility, better positioning options, and enhanced visual design.
Related issue(s)
Screenshots (coming soon)
Author's checklist
Reviewer's checklist
patch
,minor
, ormajor
featuresManual review test cases
Action menu positioning and alignment
Icon and label customization
Menu state management
S2 token integration
--spectrum-actionmenu-button-to-menu-gap
and spacing tokensComponent structure validation
Device review