-
Notifications
You must be signed in to change notification settings - Fork 200
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(dialog): s2 takeover dialog migration #3347
feat(dialog): s2 takeover dialog migration #3347
Conversation
🦋 Changeset detectedLatest commit: 1c491ed The changes in this PR will be included in the next version bump. This PR includes changesets to release 2 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 |
🚀 Deployed on https://pr-3347--spectrum-css.netlify.app |
37d987f
to
b86d610
Compare
File metricsSummaryTotal size: 2.23 MB* Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
Detailsdialog
modal
tokens
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
5c3c954
to
179f3f8
Compare
b86d610
to
3b5b527
Compare
"@spectrum-css/dialog": major | ||
"@spectrum-css/modal": 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.
Do we agree with these version bumps? Is it a concern that the dialog component will have undergone 2 major version bumps for S2? I think the changes would be considered breaking changes. And really, the only reason for a second major version is because we split the standard dialog work from this takeover dialog work. Any thoughts there?
Same for modal- is it a minor version bump?
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.
@castastrophe any reservations with the version bumps here? I wasn't sure if 2 major bumps for dialog (we had a major version change for #2860, and I'm proposing a secondary major version bump) was an issue or weird or something.
3b5b527
to
4c4d044
Compare
88db1a4
to
4168200
Compare
8b79f9a
to
f63164c
Compare
f63164c
to
bff05df
Compare
f1e6597
to
70de6c8
Compare
bff05df
to
bec02e7
Compare
b71d0c6
to
acde6e5
Compare
bec02e7
to
bec4b1c
Compare
acde6e5
to
531a17b
Compare
a4619d1
to
65d15e2
Compare
2bcf5a9
to
e3f01b8
Compare
ccc13e7
to
90a7253
Compare
46ae687
to
8d65de0
Compare
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.
The only feature I was looking for has been added! Great work @marissahuysentruyt
90a7253
to
7d12a13
Compare
7e783b6
to
e3585cd
Compare
7bad7ad
to
e3e1efb
Compare
822a5ce
to
5ccfca9
Compare
- new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
5ccfca9
to
1c491ed
Compare
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.
🎉
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
* feat(dialog): adds new takeover dialog styles - new tokens and takeover dialog styles were implemented in index.css - rebuild tokens/metadata * docs(dialog): updates dialog template and stories - adds layout: "fullscreen" to render dialogs in their canvases, instead of off the canvas - uses getRandomId and renderContent functions to render header and footer contents - implements "slotted" components for the new takeover dialog feature - removes hasDivider since s2 dialogs don't support a divider - updates Figma links for fullscreen and fullscreenTakeover stories - updates some class names to better follow naming conventions * chore(dialog): clean up dialog tests - adds hasHeroImage arg - adds background and margin customStyles for fullscreen dialog in Chromatic only (so we can see the rounded corners better) fix(modal): update modal with takeover dialog styles - builds metadata - adds tokens for modal that complement new takeover dialog styles/tokens chore(dialog,modal): create changeset
Description
This implements the design updates and new tokens for the fullscreen and fullscreen takeover dialogs in S2. 🎉 The majority of the migration has been done in the default, standard dialog (from #2860). The effected stories are called Takeover Dialog in Figma. New tokens were utilized to match the design specs. Fullscreen and fullscreenTakeover dialogs do not support additional footer content, checkboxes, or hero images. They are also not dismissible.
Documentation has been updated with info on the takeover dialog variants and the divider story was removed since dividers are no longer supported in dialog components in S2.
Takeover dialogs in Figma support swapping out text for other components in the header content and body areas. The template for dialogs changed to reflect that, utilizing
renderContent
. Additionally, some class names were corrected to follow our typical naming convention (.spectrum-Dialog-header-content > .spectrum-Dialog-headerContent
and.spectrum-Dialog-footer-content > .spectrum-Dialog-footerContent
).New mod properties should reflect the "takeover dialog" language:
New Mods
--mod-takeover-dialog-grid-spacing
--mod-takeover-dialog-spacing-header-content-gap
--mod-takeover-dialog-title-font-size
New modal custom property
--spectrum-modal-takeover-window-to-edge
New aliased tokens were created for mobile value changes:
For
.spectrum--large
:--spectrum-takeover-dialog-spacing-grid-padding:var(--spectrum-spacing-400);
--spectrum-takeover-dialog-spacing-header-gap:var(--spectrum-spacing-300);
--spectrum-takeover-dialog-spacing-title-to-body:var(--spectrum-spacing-400);
For
.spectrum--medium
:--spectrum-takeover-dialog-spacing-grid-padding:var(--spectrum-spacing-500);
--spectrum-takeover-dialog-spacing-header-gap:var(--spectrum-spacing-400);
--spectrum-takeover-dialog-spacing-title-to-body:var(--spectrum-spacing-500);
Designs
S2 Takeover Dialog Token specs
S2 / Desktop Takeover dialog
Jira
This work was captured as "follow up" work in CSS-829
(The bulk of the dialog migration occurred in CSS-714)
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
Divider
component, so any JS or CSS referencing the dialog's divider has been removed from the stories andindex.css
files.isDismissible
control since they don't support the close button..spectrum-Modal--fullscreen
utilizes the updated window-to-edge value (spacing-600
40px), corresponding to the.spectrum-Dialog--fullscreen
story..spectrum-Modal--fullscreenTakeover
utilizes the updated window-to-edge value (0), corresponding to the.spectrum-Dialog--fullscreenTakeover
story.hasHeroImage
,isDismissible
,hasFooter
, are not supported in takeover dialogs, so their controls should only appear for the standard dialog.takeover-dialog-width
takeover-dialog-height
window-to-edge
corner-radius-extra-large-default
takeover-dialog-spacing-grid-padding
takeover-dialog-spacing-header-gap
takeover-dialog-spacing-title-to-body
background-layer-2-color
(in the designs, this is accidentally misnamed asbackground-color-layer2
)dialog.test.js
file) continues to maintain the fullscreen and fullscreenTakeover test templates, and do not have additional variations/test scenarios.Additional validation
renderContent
function for theheader
controls for the takeover dialogs. For instance, put a different component, like help text or breadcrumbs (don't be alarmed if breadcrumb icons do not render- this is a known bug)..spectrum-Dialog-headerContentWrapper
element.content
controls for the takeover dialogs. For instance, import a different component, like swatch group, or form (don't be alarmed if form styles do not render- this is a known bug)..spectrum-Dialog-content
element.Regression testing
Validate:
Screenshots
To-do list