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

chore: dialog t-shirt sizing #3322

Merged

Conversation

marissahuysentruyt
Copy link
Collaborator

Description

This PR aligns the sizing classes for the dialog component to t-shirt sizing, as most of our other components have done in recent years. The old size modifier classes will be deprecated and removed in S2, so deprecation comments were left in the CSS, along with the addition of the t-shirt classes.

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

  • Pull down the branch to run locally, or use the deploy preview.
  • Verify that the old classes are being applied to dialogs, as before. This change introduces NO markup/template/class name changes.
  • Pick a dialog to inspect in the browser. Remove the old class name and add the new class. Ensure that the styles do not change between these classes:
old class name new class name
spectrum-Dialog--small spectrum-Dialog--sizeS
spectrum-Dialog--medium spectrum-Dialog (the default, so no size is necessary)
spectrum-Dialog--large spectrum-Dialog--sizeL

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. ✨

@marissahuysentruyt marissahuysentruyt added size-1 XS ~1-6hrs; nearly trivial, a few hours, could do more than one in a single day. s1 labels Oct 24, 2024
@marissahuysentruyt marissahuysentruyt self-assigned this Oct 24, 2024
Copy link

changeset-bot bot commented Oct 24, 2024

🦋 Changeset detected

Latest commit: 93f309f

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

This PR includes changesets to release 1 package
Name Type
@spectrum-css/dialog Patch

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 Oct 24, 2024

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

Copy link
Contributor

github-actions bot commented Oct 24, 2024

File metrics

Summary

Total size: 4.30 MB*
Total change (Δ): 🔴 ⬆ 0.12 KB (0.00%)

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

Package Size Δ
dialog 14.68 KB 🔴 ⬆ 0.04 KB

Details

dialog

Filename Head Compared to base
index-base.css 14.68 KB 🔴 ⬆ 0.04 KB (0.27%)
index-vars.css 14.68 KB 🔴 ⬆ 0.04 KB (0.27%)
index.css 14.68 KB 🔴 ⬆ 0.04 KB (0.27%)
* 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.

/* Be no bigger than max-width, but also be 90% if the viewport is smaller than max-width */
inline-size: fit-content;
/* Be no bigger than max-width, but also be 90% if the viewport is smaller than max-width */
inline-size: var(--mod-dialog-confirm-medium-width, var(--spectrum-dialog-confirm-medium-width));
Copy link
Collaborator Author

@marissahuysentruyt marissahuysentruyt Oct 24, 2024

Choose a reason for hiding this comment

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

I updated this property to match the .spectrum-Dialog--medium definition. There are no --sizeM specific styles in S2- medium is the default so all of the "medium" styles are just under .spectrum-Dialog.

Does that change make sense to do here?

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine since .spectrum-Dialog--medium is getting deprecated anyway, but since .spectrum-Dialog and .spectrum--medium would, in theory, have all the same styles, is there a good reason to keep the .spectrum--medium selector in a section by itself? What are your thoughts on moving it up and combining it with the .spectrum-Dialog selector? So until it's deprecated, the selector would be

.spectrum-Dialog,
.spectrum-Dialog--medium {

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yes, I like that much better.

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-813-dialog-t-shirt-classes branch from fff09f9 to bce15e6 Compare October 24, 2024 16:35
@marissahuysentruyt marissahuysentruyt added deprecation Flag PRs or issues with this to indicate a component is being deprecated. and removed s1 deprecation Flag PRs or issues with this to indicate a component is being deprecated. labels Oct 24, 2024
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-813-dialog-t-shirt-classes branch from bce15e6 to de8de1e Compare October 24, 2024 17:05
@marissahuysentruyt marissahuysentruyt marked this pull request as ready for review October 24, 2024 17:45
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 fine as is! I left my thoughts on .spectrum-Dialog--medium but will leave the final decision to you!

/* Be no bigger than max-width, but also be 90% if the viewport is smaller than max-width */
inline-size: fit-content;
/* Be no bigger than max-width, but also be 90% if the viewport is smaller than max-width */
inline-size: var(--mod-dialog-confirm-medium-width, var(--spectrum-dialog-confirm-medium-width));
Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fine since .spectrum-Dialog--medium is getting deprecated anyway, but since .spectrum-Dialog and .spectrum--medium would, in theory, have all the same styles, is there a good reason to keep the .spectrum--medium selector in a section by itself? What are your thoughts on moving it up and combining it with the .spectrum-Dialog selector? So until it's deprecated, the selector would be

.spectrum-Dialog,
.spectrum-Dialog--medium {

@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-813-dialog-t-shirt-classes branch from de8de1e to a549d02 Compare October 29, 2024 15:31
Copy link
Member

@cdransf cdransf left a comment

Choose a reason for hiding this comment

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

Looks good to me!

- adds deprecation notice for --small/--medium/--large class names,
in favor of the t-shirt sizing class names.
- create changeset
- updates metadata.json
@marissahuysentruyt marissahuysentruyt force-pushed the marissahuysentruyt/css-813-dialog-t-shirt-classes branch from a549d02 to 93f309f Compare October 31, 2024 18:16
@marissahuysentruyt marissahuysentruyt merged commit ffc6895 into main Oct 31, 2024
12 checks passed
@marissahuysentruyt marissahuysentruyt deleted the marissahuysentruyt/css-813-dialog-t-shirt-classes branch October 31, 2024 18:25
@github-actions github-actions bot mentioned this pull request Oct 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ready-for-review size-1 XS ~1-6hrs; nearly trivial, a few hours, could do more than one in a single day.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants