-
Notifications
You must be signed in to change notification settings - Fork 201
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
base: spectrum-two
Are you sure you want to change the base?
Conversation
…ctrum-css into seckles/css-614-s2-menu
…ctrum-css into seckles/css-614-s2-menu
🦋 Changeset detectedLatest commit: 417a518 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*
File change detailsmenu
stepper
tag
* An ASCII character in UTF-8 is 8 bits or 1 byte. |
7e8269c
to
4ce8d19
Compare
…ctrum-css into seckles/css-614-s2-menu
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!!
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.
value: undefined, | ||
iconName: undefined, | ||
include: ["No selection", "No selection, with description", "Truncation", "Text wrapping"] | ||
} | ||
// { |
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.
Do you know what this does? It looks like it adds the .is-highlighted
class, does that correspond to ::highlight()
(which I totally just looked up and didn't know existed until today)? 🤔
Just curious! Seems like I've overlooked this many times before since it's nothing new to menu.
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 it's being added to the li
if it's active, but I don't see the corresponding class in the current CSS, so perhaps a leftover? Maybe to check contrast or check if pointer events for highlighting was disabled?
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-areas
forspectrum-Menu-item
were updated to accomodate the positioning of elements relative to the thumbnail.Tokens update
Since
@adobe/spectrum-tokens
has 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-tokens
have been removed.One special case is
--spectrum-menu-item-background-color-default
which was spec'd to have "0% opacity" which for a CSS background color translates totransparent
so that token is redefined as such. So,menu-item-background-opacity
was not used.Additionally, due to the margin required for the focus indicator previously implemented, the "new" token
menu-item-to-item
was 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-description
How 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-opacity
andmenu-item-to-item
as explained abovemenu-item-label-to-description
size tokenssection-header-to-description
size tokensmenu-top-to-thumbnail
size tokenstext-to-visual-400
(used for thumbnail to label inline spacing)link-out-icon
size 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