-
Notifications
You must be signed in to change notification settings - Fork 196
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
feat(popover): migrate s2 popover #3365
base: spectrum-two
Are you sure you want to change the base?
feat(popover): migrate s2 popover #3365
Conversation
🦋 Changeset detectedLatest commit: ec1c97f The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
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 |
File metricsSummaryTotal size: 1.74 MB* Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
Detailscoachmark
picker
popover
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
🚀 Deployed on https://pr-3365--spectrum-css.netlify.app |
c982e9c
to
d9214ec
Compare
9eacd5d
to
b2e341b
Compare
e6d16bd
to
fc916f1
Compare
fc916f1
to
9d7f088
Compare
Storybook foundations pages now display as a single page instead of in folders with their example stories appearing. These now use the newer !dev tag to hide them. The old custom "foundation" tag was previously used to hide them, but this tag is no longer used. Also fixes some linter errors encountered during commit; a couple unused variables and incorrect typeof comparisons.
* fix(search): restore missing custom properties * fix(colorwheel): restore missing custom properties * fix(assetcard): restore missing custom properties * fix(treeview): restore missing custom properties Restore missing properties from foundations that were flagged by the linter. * fix(combobox): restore missing custom properties Restore missing properties from foundations that were flagged by the linter. Also removes a group of duplicate custom property definitions that were flagged.
…3471) * fix(popover): define --spectrum-popover-border-width in index.css * fix(well): define --spectrum-well-border-color in index.css * fix(tabs): define --spectrum-tabs-font-weight * fix(toast): define default background color and divider color * fix(tag): define undefined custom properties * fix(menu): define menu item background colors * fix(textfield): define undefined custom properties
3c6ebd8
to
cc7713e
Compare
…tom properties (#3487) * fix(pickerbutton): add missing custom properties * fix(radio): add missing custom props * fix(calendar): add missing custom properties * fix(stepper): define unused custom props * fix(progressbar): remove unused custom properties; change background-color to background see #2929; fix static color * fix(dial): remove unused custom properties; add undefined custom properties
isOpen: isOpen && !isDisabled && !isLoading, | ||
withTip: false, | ||
position: "bottom", | ||
position: "bottom-start", |
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.
bottom-start
is from main
& s2-foundations-redux
. There's not explicit direction on the popover's positioning within picker that I found, but I don't think I see an issue with this change. Combobox, action menu, contextual help, date picker all use bottom-start
.
The change here I thought then required the CSS selector changes, so if we're not cool with that right now, I'm happy to revert if there are any concerns.
--mod-popover-corner-radius: var(--spectrum-corner-radius-100); | ||
--mod-popover-content-area-spacing-vertical: 0; | ||
--mod-popover-corner-radius: var(--spectrum-corner-radius-large-default) | ||
--mod-popover-content-area-spacing: 0; |
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 updated this mod name because I changed popover-content-area-spacing in the popover CSS- there's now padding on all sides of popover instead of just on the top & bottom. However, I am unsure if this is actually the correct styling for the popovers in coachmark. Is this something to address in the coachmark PR #3412? Regardless, we do have this captured in CSS-1067
With the new padding in Popover (especially noticeable in the action menu popover), which means removing --mod-popover-content-area-spacing
completely.
Keeping --mod-popover-content-area-spacing: 0
, which results in no padding
We might need something like this:
padding: var(--mod-popover-content-area-spacing, var(--spectrum-popover-content-area-spacing)) 0;
to mimic the old popover vertical padding. What do y'all think?
7d6ce16
to
1c99e9c
Compare
- update the border radius of the popover nested in coachmark to match S2 popover specs - update popover `--mod-popover-content-area-spacing` variable name (previously --mod-popover-content-area-spacing-vertical) - rebuild metadata.json
- new tokens and token values used for popover - create changeset - rebuild metadata.json - adjust popoverWidth and popoverHeight args to accommodate new padding - update test file with new popoverWidth and popoverHeight
- with the new default position for popover, the selector class for the popover in picker also needed to be updated. (--bottom-start) - create changeset - update content arg to be popoverContent (just for clarification) - rebuild metadata.json
1c99e9c
to
ec1c97f
Compare
b438a55
to
46ae687
Compare
Description
Welcome to the new and improved S2 popover! 🥳
This PR updates tokens used in the popover component. The work includes new S2 tokens specifically for colors, padding and the border radius for popover. There is also a transparent border in light mode and a visible border in dark mode.
There are several components that have popover as a subcomponent. Those were updated with just enough additional code to make them "work." Coachmark and picker did have some additional CSS needs, particularly relating to the new popover corner rounding, and the new
bottom-start
positioning.Popover Mods
Some mods have been renamed to match their new token names, or better reflect their purposes:
--mod-popover-content-area-spacing-vertical
--mod-popover-content-area-spacing
--mod-popover-shadow-blur
--mod-popover-drop-shadow-blur
--mod-popover-shadow-color
--mod-popover-drop-shadow-color
--mod-popover-shadow-horizontal
--mod-popover-drop-shadow-x
--mod-popover-shadow-vertical
--mod-popover-drop-shadow-y
Notes
but the cascade doesn't quite work because of the markup differences. CSS-1065 captures some of the thoughts and issues, and Josh brought up some good questions/context in his comment below in regards to nesting elements and SWC.
Designs
S2 Popover Token specs
S2 / Desktop Popover
Jira
CSS-615
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
main
appear on the docs page. No changes should have been made to popover positions or tip placements.popover-border-color
(see the comment in index.css)popover-border-opacity
drop-shadow-elevated-color
drop-shadow-elevated-x
drop-shadow-elevated-y
drop-shadow-elevated-blur
corner-radius-large-default
popover-edge-to-content-area
(popover-top-to-content-area
was removed from tokens)border-width-100
background-layer-2-color
(it may not be pointing togray-25
as intended, but should once we make the full change to S2 tokens)Regression testing
Validate:
Screenshots
Before:
After:
To-do list