-
Notifications
You must be signed in to change notification settings - Fork 195
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
Includes new color values for Spectrum 2
BREAKING CHANGE: migrates `Action Group` to Spectrum 2, Removes some mod properties
BREAKING CHANGE: migrates Button Group to Spectrum 2 Also: * docs(buttongroup): expand chromatic coverage * refactor(buttongroup): remove extra css classes
BREAKING CHANGE: uses Spectrum 2 tokens
- @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected]
BREAKING CHANGE: migrates Close Button to Spectrum 2 Additionally: * test: increase chromatic coverage * fix(closebutton): pass staticColor as arg for SB display * chore(closebutton): remove themes dir * docs(closebutton): adds s2 migration notes * chore(closebutton): specify s2 tokens release for dependency --------- Co-authored-by: Patrick Fulton <[email protected]>
* chore: migrate gray-50 to gray-25 Migrates any instance of `--spectrum-gray-50` to use `--spectrum-gray-25` as per the S2 migration guide * chore: migrate gray-75 to gray-50 Migrates usages of `--spectrum-gray-75` to use `--spectrum-gray-50` as per the s2 migration guide. * chore: migrate gray-100 to gray-75 Migrates usages of `--spectrum-gray-100` to use `--spectrum-gray-75` as per the s2 migration guide * chore: migrate gray-200 to gray-100 Migrates usages of `--spectrum-gray-200` to use `--spectrum-gray-100` as per the s2 migration guide * chore: migrate gray-300 to gray-200 Migrates usages of `--spectrum-gray-300` to use `spectrum-gray-200` as per the s2 migration guide * chore(infieldbutton): gray-300 to gray-200
* fix(commons): remove renamed mods marked for deprecation Remove mods that were renamed and previously marked for deprecation, and regenerate mods lists. This will help in reviewing the accuracy of other components' mods lists as they are being migrated to s2. * docs: migration guide notes for mod property deprecations Add notes to components affected by mod property changes in the commons basebutton. * docs(closebutton): updated docs for migration guide and icon size - Removes the "Icon size" variant options, as noted in the closebutton PR. Per Figma changelog "removed icon size as a property". - Updates migration guide with a more organized history. * fix(commons): remove another mod referencing global token Deprecates an additional mod name that was referencing a global token, and updates migration notes for all affected components.
BREAKING CHANGE: uses Spectrum 2 tokens Also: * feat(fieldlabel): medium as default and 100 sizing tokens - Use the correct "100" sized tokens for medium. - Make medium styles the default, to conform with existing pattern. .spectrum-FieldLabel--sizeM class removed as it is no longer necessary. * feat(fieldlabel): use correct font size tokens The font-size tokens used for large and extra large needed to be shifted up to match the s2 spec. * refactor(fieldlabel): remove deprecated mods Remove renamed mods marked as deprecated for S2 release. * docs(fieldlabel): spectrum 2 noted in migration notes Updates some docs and adds migration notes. Clarifies some docs around "left" and "right", and fixes duplicate ID warnings from examples code. * docs(fieldlabel): form - docs update and regenerate mods Add migration guide section to "Form", that currently lives within the Field label component. Regenerates mods to include the removal of deprecated renamed mods. * fix(fieldlabel): rename mod property referencing global token A mod custom property was referencing a global token instead of the component itself. Renames this and adds a note to the migration guide. * feat(fieldlabel): use correct sizing tokens Use correct tokens for some large and extra large custom properties, to matching with design. * style(fieldlabel): applying linter formatting adjustments Run linter fix on the fieldlabel component, which rearranges a few declarations. * docs(fieldlabel): document asterisk icon size Add documentation about asterisk UI icon sizes specified on the design. These sizes are already handled in the Storybook template, but were not really explained to the user. * feat(fieldlabel): black and white static color variants Add classes for static colors, as defined on the designs. And adds examples of these variants to the documentation. * build(fieldlabel): specify s2 tokens release for dependency Use Spectrum 2 version of tokens package in dependencies list.
Takes in the latest beta release for S2 tokens
- @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected]
* feat(downstate): docs + implementation for example components * docs: update mdx * docs: reorg, stories live within foundations * docs: decorator for down state dimension tokens * docs: fix mdx hierarchy console error * fix: small iconOnly button gets min perspective * docs: use markdown, update language * fix: disabled, readonly checkbox doesnt have down state * chore(button,checkbox): update package versions
* feat(tokens): use spectrum tokens beta 21 * chore(tokens): add custom token for corner rounding
- @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected] - @spectrum-css/[email protected]
…2559) * feat(cornerrounding): documentation, custom tokens - feat(cornerrounding): add custom token - chore(cornerrounding): adds dist - docs(cornerrounding): add file strucutre for foundations - feat(cornerrounding): override token value - Sets custom var to override token spectrum-corner-radius-full - chore(cornerrounding): add override to dist - Adds custom var to override token value to dist - chore(cornerrounding): adjust file structure - Also renames file - feat(cornerrounding): add Foundations story for corner-rounding - feat(cornerrounding): add action buttons and checkboxes - Adds action buttons and checkboxes stories to demonstrate corner rounding - docs(cornerrounding): update corner-rounding docs - better utilize storybook features - clean up checkbox and action button stories - hide stories in corner-rounding directory - improve table styling and css token use - improve corner rounding documentation - add tables for component size tokens - fix(cornerrounding): remove mdx for tables - fix(cornerrounding): use sentence case - feat(cornerrounding): use custom token on close button - docs: add alias note - docs: remove reference to non-alias tokens - feat(actionbutton): partial migration for corner rounding only - feat(checkbox): partial migration for corner rounding only - chore(closebutton): update custom var post-refactor - fix: token rebase issue - chore(actionbutton,checkbox): update package version - chore: use corner-radius alias token - chore: update tokens version - chore: revert unneeded component version change - docs: design requested updates, show token with example - docs: move tables to stories, inline spacing for tables * fix: includes error --------- Co-authored-by: Melissa Thompson <[email protected]>
Remove dates from in front of version numbers on migration guides, as we're adjusting to this format going forward. Includes removal of the placeholder "x/x/2024" dates that were added. The button component was excluded from this update as they're already removed in the button s2 migration PR.
* feat(opacitycheckerboard): small t-shirt size squares * docs(opacitycheckerboard): chromatic coverage for t-shirt size
* feat: add example gradients for static black and white Add new gradient backgrounds, displayed for static black and static white variants. These are used for examples only. This adds CSS custom properties available globally within Storybook and sets them on the existing decorator. * docs(fieldlabel): support static colors decorator in storybook Change Field label stories that show static black and static white, so they work with the recently added decorator that changes the main Storybook background. * docs(button): adjust static colors template Adjust static colors template to better handle the static color decorator and gradients. * chore(fieldlabel): apply eslint indentation changes to stories
- `--bottom-start` was added to the popover within the picker markup
- removes the transform: unset and utilizes a display: block instead for the popover wrapper to override the animation distance properly
- removes `--spectrum-popover-nested-container-spacing` from CSS because it was defined but never used. also removes its reference in the stories file - corrects the margin on the NestedPopover story to use the animation- distance token as margin instead of spacing-100
- compensates for the additional 16px of padding on all sides of popover - adds the inset-inline-start: 0 args for positioning
f55a947
to
a0ff0b2
Compare
@@ -0,0 +1,8 @@ | |||
--- | |||
"@spectrum-css/coachmark": minor |
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.
Just making sure here: the changes in the coachmark CSS are actually a result of the breaking changes from popover. Would that still be considered a minor change in the coachmark CSS?
@jawinn I was going to leave this for the coachmark. I have a card that captures this right now: https://jira.corp.adobe.com/browse/CSS-1067 |
cdb180d
to
27d01df
Compare
fc916f1
to
9d7f088
Compare
Description
Welcome to the new and improved S2 popover! 🥳
This PR updates tokens used in the popover component. Additionally, it brings over all of the relevant stories, tests, and documentation from
main
(in the hopes of reducing the conflicts the merge may introduce). The copy/pastes frommain
are marked with[from main]
in the commit messages.- In .storybook/base.css: This update is from
main
and helps to stop cutting off the nested popover content.Most of the work in
popover.stories.js
andtemplate.js
is just copied over frommain
.- In template.js:
popoverAlignment["inset-inline-start"] = "0";
from 2 position cases (and left a comment explaining that decision).renderContent()
frommain
with thecontent.map()
that works onspectrum-two
.spectrum-two
merges, most of the comments in template.js can be uncommented and refactored to use the approaches we use inmain
.- In popover.stories.js`
spectrum-two
merges, most of the comments in popover.stories.js can be uncommented and refactored to use the approaches we use inmain
. There's a fewTODO
comments left to hopefully remind us about certain things during that merge.There are several components that have popover as a subcomponent. Those were updated with just enough additional code to make them work. Coachmark did have some additional CSS needs, particularly relating to the new popover corner rounding and the image/media.
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
Designs
S2 Popover Token specs
S2 / Desktop Popover
Jira
CSS-615
Pending Questions
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 immediate changes 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)popover.test.js
file) continues to maintains test templates, and does not have additional variations/test scenarios.Before:
After:
Regression testing
Validate:
Screenshots
To-do list