Skip to content
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 standard dialog migration #2860

Merged

Conversation

marissahuysentruyt
Copy link
Collaborator

@marissahuysentruyt marissahuysentruyt commented Jun 24, 2024

Description

This migrates the Standard Dialog to S2. 🎉 The default dialog story is called "Standard Dialog." New tokens were utilized to match the design specs. The template underwent significant changes (first uncovered in #2833) to accommodate missing elements such as optional header content, optional footer content, hero/cover images, and the button group. There is also a new option for the footer content, where a checkbox and text can be present, or just the text itself.

Documentation has been updated and the divider story was removed since dividers are no longer supported in dialog components in S2.

This PR pulls in certain features from main in preparation for when spectrum-two merges. That includes some import statements that are commented out and the dialog.test.js file. While the test file doesn't do anything on this branch at this time, it has been updated. Dialogs with dividers are no longer supported, so that test case has been removed.

Because the dialog was renamed to "standard dialog" and the divider component was removed, mod properties are either "new," have been renamed to reflect the "standard dialog" language, or removed:

New Mods
--mod-standard-dialog-spacing-title-to-header-content
--mod-standard-dialog-spacing-title-to-description
--mod-standard-dialog-header-content-font-size

Renamed Mods
--mod-dialog-confirm-small-width > --mod-standard-dialog-max-width-small
--mod-dialog-confirm-medium-width > --mod-standard-dialog-max-width
--mod-dialog-confirm-large-width > --mod-standard-dialog-max-width-large
--mod-dialog-confirm-border-radius > --mod-standard-dialog-border-radius
--mod-dialog-confirm-description-text-size > --mod-standard-dialog-description-font-size
--mod-dialog-confirm-description-text-line-height > --mod-standard-dialog-description-line-height
--mod-dialog-confirm-description-text-color > --mod-standard-dialog-description-text-color
--mod-dialog-confirm-description-font-weight > --mod-standard-dialog-description-font-weight
--mod-dialog-heading-font-weight > --mod-standard-dialog-heading-font-weight
--mod-dialog-confirm-title-text-line-height > --mod-standard-dialog-heading-line-height
--mod-dialog-confirm-title-text-color > --mod-standard-dialog-heading-text-color
--mod-dialog-confirm-title-text-size > --mod-standard-dialog-heading-font-size
--mod-dialog-confirm-hero-height > --mod-standard-dialog-hero-block-size
--mod-dialog-min-inline-size > --mod-standard-dialog-min-inline-size
--mod-dialog-confirm-padding-grid > --mod-standard-dialog-spacing-grid-padding
--mod-dialog-confirm-footer-padding-top > --mod-standard-dialog-spacing-description-to-footer
--mod-dialog-confirm-close-button-padding > --mod-standard-dialog-spacing-edge-to-close-button
--mod-dialog-confirm-gap-size > --mod-standard-dialog-spacing-footer-to-button-group

Removed Mods
--mod-dialog-confirm-buttongroup-padding-top
--mod-dialog-confirm-close-button-size
--mod-dialog-confirm-description-margin
--mod-dialog-confirm-description-padding
--mod-dialog-confirm-divider-block-spacing-end
--mod-dialog-confirm-divider-block-spacing-start
--mod-dialog-confirm-divider-height

New mod for button group:
--mod-buttongroup-flex-wrap

Designs

S2 Standard Dialog Tokens specs
S2 / Desktop Standard Dialog

There will be subsequent work for the fullscreen and fullscreenTakeover dialogs, (draft PR: #3347).

Jira

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

  • Standard dialog design review and approval @marissahuysentruyt CSS-803
  • Pull down the branch
  • Visit the dialog storybook
  • The standard dialog matches the S2 standard dialog specs (@rise-erpelding)
  • The dialog no longer supports the Divider component, so any JS or CSS referencing the dialog's divider has been removed from the stories and index.css files
  • Verify the .spectrum-Dialog and .spectrum-Modal utilize the updated border-radius value (corner-radius-extra-large-default 16px)
  • Verify the button group or close button is keyboard accessible and the focus rings do not get cut off in any variant
  • In your editor, verify that the class modifiers --small, --medium and --large have been removed from the JS and CSS. Any sizing modifiers should now reflect T-shirt sizing (--sizeS, size--L), without a --sizeM as that is the default dialog size.
  • Create various combinations of the dialog to verify combos are considered in the CSS:
    • mobile vs desktop
    • light vs dark mode
    • "small", "medium", "large" dialogs to test the max widths
    • dismissible vs. non-dismissible
    • hero vs non-hero
    • changing the hero image
    • change the optional header content to verify that element wraps
    • change the optional footer content to verify that element wraps
  • You may run into the error "Rendered fewer hooks than expected." when using certain controls. Refreshing the window will remove the error.
  • Verify new tokens are used:
    • standard-dialog-maximum-width-small
    • standard-dialog-maximum-width-medium
    • standard-dialog-maximum-width-large
    • standard-dialog-minimum-width
    • standard-dialog-title-font-size
    • standard-dialog-body-font-size
  • Verify updated tokens are used:
    • corner-radius-extra-large-default
    • spacing-500
    • spacing-400
    • spacing-300
    • background-layer-2-color (in the designs, this is accidentally misnamed as background-color-layer2
    • line-height-200
  • Verify the fullscreen and fullscreenTakeover stories look acceptable and not broken visually (these will be updated to match the takeover dialog design specs in feat(dialog): s2 takeover dialog migration #3347).
  • Chromatic coverage (using dialog.test.js file) will include the default, with a hero image, both as non-dismissible (the default) and dismissible (isDismissible: true). The fullscreen and fullscreenTakeover are separate test templates, and do not have additional variations/test scenarios.
  • Tray, which uses a dialog component, doesn't looks broken. It should no longer have a divider.

Regression testing

Validate:

  1. The documentation pages for at least two other components are still loading, including:
  • The pages render correctly, are accessible, and are responsive.
  1. If components have been modified, VRTs have been run on this branch:
  • VRTs have been run and looked at.
  • Any VRT changes have been accepted (by reviewer and/or PR author), or there are no changes.

Screenshots

To-do list

  • I have read the contribution guidelines.
  • I have updated relevant storybook stories and templates.
  • I have tested these changes in Windows High Contrast mode.
  • If my change impacts other components, I have tested to make sure they don't break.
  • If my change impacts documentation, I have updated the documentation accordingly.
  • ✨ This pull request is ready to merge. ✨

Copy link

changeset-bot bot commented Jun 24, 2024

🦋 Changeset detected

Latest commit: 6505da4

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 19 packages
Name Type
@spectrum-css/buttongroup Patch
@spectrum-css/tokens Patch
@spectrum-css/dialog Major
@spectrum-css/modal Patch
@spectrum-css/underlay Patch
@spectrum-css/preview Patch
@spectrum-css/popover Major
@spectrum-css/tray Major
@spectrum-css/alertdialog Patch
@spectrum-css/actionbar Major
@spectrum-css/actionmenu Major
@spectrum-css/coachmark Major
@spectrum-css/combobox Major
@spectrum-css/contextualhelp Major
@spectrum-css/datepicker Major
@spectrum-css/picker Major
@spectrum-css/pickerbutton Major
@spectrum-css/menu Major
@spectrum-css/tabs Major

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

Copy link
Contributor

github-actions bot commented Jun 24, 2024

File metrics

Summary

Total size: 2.74 MB*
Total change (Δ): ⬆ 1.20 KB (0.04%)

Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.

Package Size Δ
buttongroup 1.49 KB ⬆ 0.05 KB
dialog 15.09 KB ⬆ 0.40 KB
modal 5.49 KB ⬆ 0.02 KB
underlay 3.18 KB ⬇ 0.10 KB
tokens 472.69 KB ⬆ 0.33 KB

Details

buttongroup

File Head Base Δ
index-base.css 1.49 KB 1.44 KB ⬆ 0.05 KB (3.53%)
index.css 1.49 KB 1.44 KB ⬆ 0.05 KB (3.53%)

dialog

File Head Base Δ
index-base.css 15.09 KB 14.71 KB ⬆ 0.40 KB (2.62%)
index.css 15.09 KB 14.71 KB ⬆ 0.40 KB (2.62%)

modal

File Head Base Δ
index-base.css 5.49 KB 5.48 KB ⬆ 0.02 KB (0.29%)
index.css 5.49 KB 5.48 KB ⬆ 0.02 KB (0.29%)

underlay

File Head Base Δ
index-base.css 3.18 KB 3.28 KB ⬇ 0.10 KB (-2.89%)
index.css 3.18 KB 3.28 KB ⬇ 0.10 KB (-2.89%)

tokens

File Head Base Δ
css/dark-vars.css 46.29 KB 46.29 KB -
css/global-vars.css 68.71 KB 68.71 KB -
css/index.css 234.33 KB 234.17 KB ⬆ 0.16 KB (0.07%)
css/large-vars.css 39.58 KB 39.50 KB ⬆ 0.08 KB (0.21%)
css/light-vars.css 46.25 KB 46.25 KB -
css/medium-vars.css 39.70 KB 39.62 KB ⬆ 0.08 KB (0.20%)
index.css 238.36 KB 238.19 KB ⬆ 0.17 KB (0.07%)
* Size determined by adding together the size of the main file for all packages in the library.
* Results are not gzipped or minified.
* An ASCII character in UTF-8 is 8 bits or 1 byte.

Copy link
Contributor

github-actions bot commented Jun 24, 2024

🚀 Deployed on https://pr-2860--spectrum-css.netlify.app

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-714-s2-dialog branch from 6f90f2f to 1e8b017 Compare June 24, 2024 16:18
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-714-s2-dialog branch from 1e8b017 to 596d2f6 Compare June 24, 2024 18:42
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-714-s2-dialog branch 3 times, most recently from abaf623 to 4f08fa7 Compare June 25, 2024 17:09
@castastrophe castastrophe added the S2 Spectrum 2 label Jun 27, 2024
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-714-s2-dialog branch from 49d137e to a57836c Compare July 1, 2024 15:35
@marissahuysentruyt marissahuysentruyt marked this pull request as ready for review July 1, 2024 15:40
components/dialog/index.css Outdated Show resolved Hide resolved
components/dialog/stories/dialog.stories.js Outdated Show resolved Hide resolved
components/dialog/stories/dialog.stories.js Outdated Show resolved Hide resolved
components/dialog/index.css Outdated Show resolved Hide resolved
components/dialog/index.css Outdated Show resolved Hide resolved
components/dialog/index.css Show resolved Hide resolved
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey, this component is a beast and you did a nice job! There are so many changes for S2 and it matches the spec nicely for most typical cases! I'm going to go ahead and submit these initial thoughts so I'm not sitting on this for too long but I may come back and add more comments later!

Wrapping

I didn't dig into the minmax function that you added that you commented on, but I did note that there were some funky formatting/wrapping issues that may or may not be fixed by adjusting that grid-template-columns:
Screenshot 2024-07-03 at 10 04 29 AM

  • Adding more "Additional header content" will stretch this container and push the heading text so that it wraps and eventually gets pushed out of the dialog on the left, that's probably not expected behavior. That's probably not expected behavior. On the plus side, I can see that the heading text is wrapping nicely!
  • In the footer, adding too much footer content also does a weird thing where it doesn't wrap and pushes the action buttons out of the dialog on the right side (although the footer text does eventually wrap, which is good!), that's probably not ideal either. It might help to have some max-width values/tokens for these two content areas.

Fullscreen/Fullscreen Takeover Mode

Screenshot 2024-07-02 at 9 41 46 PM

  • I called out the close button positioning in a comment, I think. It ends up being really funky if the close button is added, is the close button allowed to be used for fullscreen mode? Also, the close button is appearing in addition to the action buttons, and I had thought this should be an either/or situation (so correct me if I'm wrong!).
  • The footer content disappears in fullscreen, is that expected?
  • I made this callout in a comment but I'm going to leave it here too so it doesn't get forgotten: do we definitely want border-radius on the dialog for the fullscreen takeover mode?
  • I cannot remove fullscreen/fullscreen takeover as an option once I select it, so I can't go back to the modal that it starts on without removing the parameter from the url. It would be nice to have this be an option so that I could go back to it after looking at fullscreen.
  • The hero image control doesn't work in Storybook if I'm on fullscreen mode. I'm not sure whether or not this is intentional, but if fullscreen dialogs are not meant to have a hero image, we should remove controls for those if possible

Tray

I captured it with two dialogs but I just looked again and didn't see the issue 🤷‍♀️ But I also just saw it when I checked main so I don't think this is something you caused with this work.
Screenshot 2024-07-03 at 11 13 52 AM

@marissahuysentruyt
Copy link
Collaborator Author

marissahuysentruyt commented Jul 5, 2024

@rise-erpelding thanks for all of this feedback!

The footer content disappears in fullscreen, is that expected?
is the close button allowed to be used for fullscreen mode
The hero image control doesn't work in Storybook if I'm on fullscreen mode.

I left a comment about all of these! They're things I've asked about, but I don't think have been decided on yet for S2. I have a Jira ticket to follow up on the 3 questions that still remain for the fullscreen layouts. (this is the hero & dismissible control removals: 0bfa1a8) for fullscreen layouts)

I cannot remove fullscreen/fullscreen takeover as an option once I select it

I agree. I ended up having to alter the template a little more and sort of rework some arguments, so I'd love for you to try to break things!! I think I got that figured out: 0bfa1a8

The hero image control doesn't work in Storybook if I'm on fullscreen mode.

That was intentional on my part. Unfortunately, it seems like you found half of the work and I didn't fix the controls 😬 They should be removed now: 94220e6

I captured it with two dialogs but I just looked again and didn't see the issue.

Was there something going on with Tray? I know it uses a dialog, but that wasn't one of the components I intentionally touched.

As for the header and footer overflow and grid placement- still working on it. 👍

EDIT:
I reworked the header and footer grid placements: d8cd82f
I also had to rework some of the template to hopefully 🤞 handle some of the edge cases that I was missing: eff80b9

I moved the Chromatic testing templates to template.js too, to match some other requests I've seen on other pull requests.

Copy link
Collaborator

@jawinn jawinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I took an initial look over this and the comments so far, and have a couple questions/comments.

It looks like something may have changed recently with the required text wrapping?
Screenshot 2024-07-08 at 2 10 14 PM

components/dialog/index.css Outdated Show resolved Hide resolved
components/modal/index.css Outdated Show resolved Hide resolved
components/underlay/index.css Outdated Show resolved Hide resolved
components/dialog/index.css Show resolved Hide resolved
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is looking great with shorter or longer header/footer text, with or without the hero image, and looks good in rtl and forced colors! Really nice work!

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-714-s2-dialog branch from 88db1a4 to 4168200 Compare November 4, 2024 14:26
border-radius: var(--mod-standard-dialog-border-radius, var(--spectrum-standard-dialog-border-radius));
overflow: hidden;

.spectrum--large & {
Copy link
Collaborator

@jawinn jawinn Nov 7, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can .spectrum--large be converted by SWC? I could be wrong, but I thought that part of the reason we have custom-vars in the tokens package was because they had trouble with us using large platform scale and light/dark classes like this.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for calling this out. Glad we got confirmation from Cassondra that we cannot do this and I can correct it before it goes out to SWC.

For posterity, we cannot nest platform styles like this:

because the individual web components are not aware of the context they exist inside. Namely, we can't rely on the element having a ".spectrum--large" class to look up to. We can add...the default value to the custom medium styles (custom-medium-vars) and the alt to custom large (custom-large-vars)and it should toggle accurately

Doing so ☝️ allows us to access it like a global variable.

components/dialog/stories/template.js Outdated Show resolved Hide resolved
components/dialog/stories/dialog.stories.js Show resolved Hide resolved
components/dialog/stories/dialog.stories.js Show resolved Hide resolved
.changeset/metal-fireants-switch.md Outdated Show resolved Hide resolved
components/dialog/index.css Outdated Show resolved Hide resolved
Copy link
Collaborator

@jawinn jawinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One other thing I saw on the Docs page that looks a little off is this in the fullscreen and fullscreen takeover stories:
Screenshot 2024-11-07 at 10 45 38 AM

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-714-s2-dialog branch from f1e6597 to 70de6c8 Compare November 21, 2024 21:38
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lots of improvements here! What you've added is really nice, and I love that I don't have to upload a photo for the hero image.

I noted a few other small things this time around that might need some polishing:

  • Small dialog breaks the layout in the footer
  • Tokens package changeset?
  • Footer controls logic or footer controls descriptions

@@ -74,6 +74,8 @@
--spectrum-dialog-confirm-description-text-size:15px;
--spectrum-dialog-confirm-padding-grid:24px;

--spectrum-standard-dialog-spacing-edge-to-content:var(--spectrum-spacing-400);
Copy link
Collaborator

@rise-erpelding rise-erpelding Dec 3, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does tokens need a changeset?

I'm realizing that I forgot to add one myself when I merged Melissa's Tooltip S2 migration. 🙈

category: "Content",
},
control: { type: "text" },
if: { arg: "layout", eq: "default" },
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm wondering if this needs to be revisited or if I'm just misunderstanding the logic for hasFooter:

image

In Storybook I'm seeing that if hasFooter is false, I can still see Has checkbox and Footer text. That makes sense looking at the code, because the footer, hasFooter, and hasCheckbox controls only appear for the default layout, but is that what we want? This seems different from what you stated above:

If hasFooter is false, I've hidden the hasCheckbox and footer text controls

Given we'd want be able to apply multiple conditionals to get the controls appearing just right in certain situations but we can't, I'm fine if hasCheckbox and footer controls are visible all the time and not just when hasFooter is true. But maybe some clarity in the descriptions instead would help?

For instance, explaining that the footer contains the button group, checkbox, and footer text in the description might be nice. (Like, "Adds a footer to the dialog, containing the button group, checkbox, and footer text.") Another thing I noted that could be clarified in descriptions is that it looks like footer text is either the checkbox label if there's a checkbox, or it's just text that appears in the footer if not, that could be an updated description to something like "Text content of the dialog footer, represents the checkbox label if a checkbox is present, or stands alone if there is no checkbox".

Does that seem feasible? Or is there another reason why it's this way that I'm missing?

font-size: var(--mod-dialog-confirm-title-text-size, var(--spectrum-dialog-confirm-title-text-size));
}
}
.spectrum-Dialog-grid {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Revisiting this again, I shrunk my viewport down to make the dialog size a little closer to the min of 288px, but even at 327px, the layout in the footer starts to break (I am using platform scale large because that platform is maybe more likely to be used when the dialog is smaller in width, but even with medium it doesn't look great):
Screenshot 2024-12-03 at 10 20 39 AM

Since we're already here adjusting the grid for smaller screen sizes, maybe we could make a small fix to the grid-template-areas here to keep the footer and buttonGroup areas from looking funny?

Copy link
Collaborator

@jawinn jawinn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work on this. I think this is good to move forward with the followup issues you created and addressing Rise's comments.

I don't know if this was brought up before, but should we rename the component title in Storybook to "Standard Dialog"?

"@spectrum-css/buttongroup": patch
---

Adds a new `--mod-buttongroup-flex-wrap` custom property to leverage if user wish to customize the flex-wrap property.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A small typo there

@castastrophe castastrophe force-pushed the spectrum-two branch 3 times, most recently from cdb180d to 27d01df Compare December 4, 2024 14:54
Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A couple of small, non-blocking items:

  1. You might add, optionally, to the description for the "Additional header content" control, something about this block not rendering if there's no text. Something similar to how it is in Alert Banner, maybe? It feels less necessary here, though, so I'll leave it to your discretion.
  2. At dialog's min-width of 288px, the layout isn't broken, but we're not technically giving it the right amount of padding. I think this is really an edge case though, and would propose we leave it as is for now and follow up when we address the responsive layout issues.
    Screenshot 2024-12-05 at 4 14 22 PM

Otherwise, the responsive layout looks good, tokens changeset is added, footer controls are handled, and typos are fixed. Nice work and thanks for taking on such a massive migration here!

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-714-s2-dialog branch from d99b529 to b71d0c6 Compare December 6, 2024 02:46
border: solid;
}
.spectrum-Dialog {
border: 1px solid var(--highcontrast-standard-dialog-border-color, rgba(var(--spectrum-black-rgb), var(--spectrum-overlay-opacity)));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [stylelint] <spectrum-tools/no-unknown-custom-properties> reported by reviewdog 🐶
Custom property --highcontrast-standard-dialog-border-color not defined

* docs(dialog): dialog controls/coverage
- adds new features/behaviors such as the checkbox in the footer,
wrapping for footer/header content, being able to have close button and
button group, hasHeroImage
- removes Divider support in dialog
- adds is-hidden-story to replicate what is on main and remove most
stories from the sidebar
- adds some comments and TODOs giving context to this choice
- removes layout from control table from default argTypes
- removes hasFooter from control table for fullscreen/fullscreenTakeover
argTypes
- adds a comment to explain the custom argTypes changes for those stories
- also adds a comment about multiple conditionals for argTypes

* refactor(modal): use corner-radius-extra-large-default to match design
specs

* fix(underlay): update comment notes for spectrum-overlay-color
- also comments out a duplicated custom property and adds a TODO comment

* refactor(dialog): new css for S2 dialog
- adds some opportunities for mod properties
- fixes dismissible grid spacing between additional header content and
close button
- scope passthrough mods to spectrum-Dialog class
- add flex-direction: column to footer (this should allow the footer
content and button group to stack at small screens at smallest dialog
sizes on the mobile scale.)

* feat(dialog): rebuild mods
- lots of mods are renamed to use "standard dialog" language

* chore(dialog): create changeset

* chore(dialog): update peer deps data
- remove divider from peerDependencies and peerDependenciesMeta
- adds closebutton, checkbox and typography to peerDependenciesMeta

* chore: remove divider tests

* chore(buttongroup): add flex-wrap mod property

* chore(buttongroup): creates buttongroup changeset

* chore(buttongroup,dialog): rebuild mods

* fix(dialog): platform custom variables
- calls for --spectrum-standard-dialog-spacing-edge-to-content

* chore(tokens): create changeset for custom standard dialog token

* chore(tray): fix spelling of isDismissible arg

* fix(dialog,modal): custom styles for modal background color
- because modal was originally setting the background color of dialogs,
there was some 'antialiasing bleed through' behind the dialog. By adding
customStyles to Modal, we can set --mod-modal-background-color to
transparent and get rid of the hairline color (especially noticeable
behind a hero image in a dialog)

* docs(dialog): adds modal background color documentation

* fix(dialog): use font-stack instead of font-family
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-714-s2-dialog branch from acde6e5 to 531a17b Compare December 6, 2024 15:04
- override layout:centered parameter with layout:padded instead so the
dialogs are visible on their canvases on the docs page.
- correct the t-shirt sizes for small and large dialogs on the docs page
@marissahuysentruyt marissahuysentruyt merged commit bd934cc into spectrum-two Dec 9, 2024
12 checks passed
@marissahuysentruyt marissahuysentruyt deleted the marissahuysentruyt/css-714-s2-dialog branch December 9, 2024 22:36
@github-actions github-actions bot mentioned this pull request Dec 6, 2024
@marissahuysentruyt
Copy link
Collaborator Author

A few additional cards came out of this work. We'll need to follow up with design a some questions when design reviews happen once again.

  • CSS-1057 to address the modal background color
  • CSS-1044 to get clarity on mobile behavior and layout

castastrophe pushed a commit that referenced this pull request Dec 27, 2024
* feat(dialog)!: s2 standard dialog migration

* docs(dialog): dialog controls/coverage
- adds new features/behaviors such as the checkbox in the footer,
wrapping for footer/header content, being able to have close button and
button group, hasHeroImage
- removes Divider support in dialog
- adds is-hidden-story to replicate what is on main and remove most
stories from the sidebar
- adds some comments and TODOs giving context to this choice
- removes layout from control table from default argTypes
- removes hasFooter from control table for fullscreen/fullscreenTakeover
argTypes
- adds a comment to explain the custom argTypes changes for those stories
- also adds a comment about multiple conditionals for argTypes

* refactor(modal): use corner-radius-extra-large-default to match design
specs

* fix(underlay): update comment notes for spectrum-overlay-color
- also comments out a duplicated custom property and adds a TODO comment

* refactor(dialog): new css for S2 dialog
- adds some opportunities for mod properties
- fixes dismissible grid spacing between additional header content and
close button
- scope passthrough mods to spectrum-Dialog class
- add flex-direction: column to footer (this should allow the footer
content and button group to stack at small screens at smallest dialog
sizes on the mobile scale.)

* feat(dialog): rebuild mods
- lots of mods are renamed to use "standard dialog" language

* chore(dialog): create changeset

* chore(dialog): update peer deps data
- remove divider from peerDependencies and peerDependenciesMeta
- adds closebutton, checkbox and typography to peerDependenciesMeta

* chore: remove divider tests

* chore(buttongroup): add flex-wrap mod property

* chore(buttongroup): creates buttongroup changeset

* chore(buttongroup,dialog): rebuild mods

* fix(dialog): platform custom variables
- calls for --spectrum-standard-dialog-spacing-edge-to-content

* chore(tokens): create changeset for custom standard dialog token

* chore(tray): fix spelling of isDismissible arg

* fix(dialog,modal): custom styles for modal background color
- because modal was originally setting the background color of dialogs,
there was some 'antialiasing bleed through' behind the dialog. By adding
customStyles to Modal, we can set --mod-modal-background-color to
transparent and get rid of the hairline color (especially noticeable
behind a hero image in a dialog)

* docs(dialog): adds modal background color documentation

* fix(dialog): use font-stack instead of font-family

* docs(dialog): rebase fixes
- override layout:centered parameter with layout:padded instead so the
dialogs are visible on their canvases on the docs page.
castastrophe pushed a commit that referenced this pull request Dec 29, 2024
* feat(dialog)!: s2 standard dialog migration

* docs(dialog): dialog controls/coverage
- adds new features/behaviors such as the checkbox in the footer,
wrapping for footer/header content, being able to have close button and
button group, hasHeroImage
- removes Divider support in dialog
- adds is-hidden-story to replicate what is on main and remove most
stories from the sidebar
- adds some comments and TODOs giving context to this choice
- removes layout from control table from default argTypes
- removes hasFooter from control table for fullscreen/fullscreenTakeover
argTypes
- adds a comment to explain the custom argTypes changes for those stories
- also adds a comment about multiple conditionals for argTypes

* refactor(modal): use corner-radius-extra-large-default to match design
specs

* fix(underlay): update comment notes for spectrum-overlay-color
- also comments out a duplicated custom property and adds a TODO comment

* refactor(dialog): new css for S2 dialog
- adds some opportunities for mod properties
- fixes dismissible grid spacing between additional header content and
close button
- scope passthrough mods to spectrum-Dialog class
- add flex-direction: column to footer (this should allow the footer
content and button group to stack at small screens at smallest dialog
sizes on the mobile scale.)

* feat(dialog): rebuild mods
- lots of mods are renamed to use "standard dialog" language

* chore(dialog): create changeset

* chore(dialog): update peer deps data
- remove divider from peerDependencies and peerDependenciesMeta
- adds closebutton, checkbox and typography to peerDependenciesMeta

* chore: remove divider tests

* chore(buttongroup): add flex-wrap mod property

* chore(buttongroup): creates buttongroup changeset

* chore(buttongroup,dialog): rebuild mods

* fix(dialog): platform custom variables
- calls for --spectrum-standard-dialog-spacing-edge-to-content

* chore(tokens): create changeset for custom standard dialog token

* chore(tray): fix spelling of isDismissible arg

* fix(dialog,modal): custom styles for modal background color
- because modal was originally setting the background color of dialogs,
there was some 'antialiasing bleed through' behind the dialog. By adding
customStyles to Modal, we can set --mod-modal-background-color to
transparent and get rid of the hairline color (especially noticeable
behind a hero image in a dialog)

* docs(dialog): adds modal background color documentation

* fix(dialog): use font-stack instead of font-family

* docs(dialog): rebase fixes
- override layout:centered parameter with layout:padded instead so the
dialogs are visible on their canvases on the docs page.
castastrophe pushed a commit that referenced this pull request Dec 29, 2024
* feat(dialog)!: s2 standard dialog migration

* docs(dialog): dialog controls/coverage
- adds new features/behaviors such as the checkbox in the footer,
wrapping for footer/header content, being able to have close button and
button group, hasHeroImage
- removes Divider support in dialog
- adds is-hidden-story to replicate what is on main and remove most
stories from the sidebar
- adds some comments and TODOs giving context to this choice
- removes layout from control table from default argTypes
- removes hasFooter from control table for fullscreen/fullscreenTakeover
argTypes
- adds a comment to explain the custom argTypes changes for those stories
- also adds a comment about multiple conditionals for argTypes

* refactor(modal): use corner-radius-extra-large-default to match design
specs

* fix(underlay): update comment notes for spectrum-overlay-color
- also comments out a duplicated custom property and adds a TODO comment

* refactor(dialog): new css for S2 dialog
- adds some opportunities for mod properties
- fixes dismissible grid spacing between additional header content and
close button
- scope passthrough mods to spectrum-Dialog class
- add flex-direction: column to footer (this should allow the footer
content and button group to stack at small screens at smallest dialog
sizes on the mobile scale.)

* feat(dialog): rebuild mods
- lots of mods are renamed to use "standard dialog" language

* chore(dialog): create changeset

* chore(dialog): update peer deps data
- remove divider from peerDependencies and peerDependenciesMeta
- adds closebutton, checkbox and typography to peerDependenciesMeta

* chore: remove divider tests

* chore(buttongroup): add flex-wrap mod property

* chore(buttongroup): creates buttongroup changeset

* chore(buttongroup,dialog): rebuild mods

* fix(dialog): platform custom variables
- calls for --spectrum-standard-dialog-spacing-edge-to-content

* chore(tokens): create changeset for custom standard dialog token

* chore(tray): fix spelling of isDismissible arg

* fix(dialog,modal): custom styles for modal background color
- because modal was originally setting the background color of dialogs,
there was some 'antialiasing bleed through' behind the dialog. By adding
customStyles to Modal, we can set --mod-modal-background-color to
transparent and get rid of the hairline color (especially noticeable
behind a hero image in a dialog)

* docs(dialog): adds modal background color documentation

* fix(dialog): use font-stack instead of font-family

* docs(dialog): rebase fixes
- override layout:centered parameter with layout:padded instead so the
dialogs are visible on their canvases on the docs page.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-to-merge S2 Spectrum 2 skip_vrt Add to a PR to skip running VRT (but still pass the action)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants