-
Notifications
You must be signed in to change notification settings - Fork 206
feat(menu): spectrum 2 migration #3686
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
Conversation
…ctrum-css into seckles/css-614-s2-menu
…ctrum-css into seckles/css-614-s2-menu
🦋 Changeset detectedLatest commit: 9ede99a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
|
🚀 Deployed on https://pr-3686--spectrum-css.netlify.app |
File metricsSummaryTotal size: 1.39 MB*
menu
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
…ctrum-css into seckles/css-614-s2-menu
aramos-adobe
left a comment
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.
I see you have some css changes in the color slider and another component that may not be related to your PR. Maybe you want to uncommit those but overall this is amazing work from what I've seen and I learned a ton from it!!
rise-erpelding
left a comment
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.
This is looking really fantastic! I made a lot of comments but not all of them reflect changes that need to be addressed. Here's a small rundown of the changes I think this may still need:
- The spec calls for the downstate minimum perspective but it isn't used here. Unless we're not doing that for a reason, it probably needs to be added. We're using a decorator to do this. We've implemented it with button and action button just to name a couple of examples, and I think that the documentation we have on this is pretty decent as a reference. Let me know if you need help on this! It is a little flaky and sometimes doesn't work, just to warn you.
- A couple of little nits on the Storybook controls to make them a little cleaner (and a question about which checkbox variant we want in the template).
- Another look at the top spacing for the menu item.
- Another look at the menu item key focus background and content colors, as well as the section heading color.
- The missing checkmark for the XL menu item needs to be addressed.
- When I looked at the spec, there were a couple of additions I've never seen before for the highlight badge and unavailable item, I'd recommend writing a follow-up ticket to address those.
rise-erpelding
left a comment
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.
This looks great! Thanks for picking this one up!
Left one tiny note about the focused menu item also being active and whether or not we want to display it like that, but I think this is good to go!
…ctrum-css into seckles/css-614-s2-menu
Description
First of all, big s/o to @rise-erpelding for the original work in #2802 🙌
S2 Menu references:
New features
Also of note is that the
grid-template-areasforspectrum-Menu-itemwere updated to accomodate the positioning of elements relative to the thumbnail.Tokens update
Since
@adobe/spectrum-tokenshas been updated to include many tokens relating to the menu component, including some that replace custom tokens that had previously been added. As such, these custom menu item color tokens that are now available from@adobe/spectrum-tokenshave been removed.One special case is
--spectrum-menu-item-background-color-defaultwhich was spec'd to have "0% opacity" which for a CSS background color translates totransparentso that token is redefined as such. So,menu-item-background-opacitywas not used.Additionally, due to the margin required for the focus indicator previously implemented, the "new" token
menu-item-to-itemwas not implemented as it compounded that margin.New mods
--mod-menu-item-linkout-icon-height--mod-menu-item-linkout-icon-width--mod-menu-item-thumbnail-height--mod-menu-item-thumbnail-opacity-disabled--mod-menu-item-thumbnail-to-label--mod-menu-item-thumbnail-width--mod-menu-item-top-to-thumbnail--mod-menu-section-description-color--mod-menu-section-description-font-size--mod-menu-section-description-font-weight--mod-menu-section-description-line-height--mod-menu-section-description-line-height-cjk--mod-menu-section-header-to-descriptionHow and where has this been tested?
Please tag yourself on the tests you've marked complete to confirm the tests have been run by someone other than the author.
Validation steps
menu-item-background-opacityandmenu-item-to-itemas explained abovemenu-item-label-to-descriptionsize tokenssection-header-to-descriptionsize tokensmenu-top-to-thumbnailsize tokenstext-to-visual-400(used for thumbnail to label inline spacing)link-out-iconsize tokensRegression testing
Validate:
Screenshots
Note: The desktop guide shows that when thumbnail is active, the selected state check or checkbox should be center aligned
To-do list