-
Notifications
You must be signed in to change notification settings - Fork 204
feat(action-menu): S2 migration [CSS-1160] #4085
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: spectrum-two
Are you sure you want to change the base?
feat(action-menu): S2 migration [CSS-1160] #4085
Conversation
📚 Branch previewPR #4085 has been deployed to Azure Blob Storage: https://spectrumcss.z13.web.core.windows.net/pr-4085/index.html. |
File metricsSummaryTotal size: 1.43 MB* Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
File change detailsactionbutton
actiongroup
actionmenu
menu
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
2729f84
to
779e411
Compare
|
635f709
to
242929c
Compare
4baa099
to
eb8cde2
Compare
components/menu/index.css
Outdated
@@ -267,7 +267,7 @@ | |||
|
|||
.spectrum-Menu { | |||
display: inline-block; | |||
inline-size: var(--mod-menu-inline-size, auto); | |||
inline-size: var(--mod-menu-inline-size, max-content); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@5t3ph I know you just worked on the S2 menu and I wanted to get your thoughts on this change. At auto, the popover containing the menu is really tight but the max-content option seems to provide a much roomier result that looks closer to the design docs. Are there issues with this change that you forsee?
313ee43
to
3babcfa
Compare
4d618da
to
f3fa4d4
Compare
f2ef53c
to
409436c
Compare
dbd613f
to
00038a9
Compare
531135f
to
4eec952
Compare
ace18a1
to
51da988
Compare
51da988
to
1dc8ac5
Compare
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