Skip to content

refactor(inlinealert)!: migrate core tokens #1519

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

Merged
merged 17 commits into from
Oct 12, 2022

Conversation

yosevu
Copy link
Contributor

@yosevu yosevu commented Sep 13, 2022

Description

  • Removed Help variant since it wasn't in the design
  • Renamed success variant to positive to match design
  • Renamed error variant to notice to match design
  • Reordered variants
  • Added WHCM styles

Does not include

  • Typography components
  • Updated min-width token

How and where has this been tested?

  • Chrome and Safari
  • WHCM

Screenshots

Screen Shot 2022-09-13 at 2 50 12 PM

Screen Shot 2022-09-13 at 2 45 55 PM

Screen Shot 2022-09-13 at 2 45 48 PM

Screen Shot 2022-09-13 at 2 44 02 PM

Screen Shot 2022-09-13 at 2 43 47 PM

Screen Shot 2022-09-13 at 2 43 38 PM

To-do list

  • 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.
  • I have read the CONTRIBUTING document.
  • I have tested these changes in Windows High Contrast mode.
  • This pull request is ready to merge.

@yosevu yosevu force-pushed the yosevu/css-152-migrate-inline-alert-to-core-tokens branch from b6b7c94 to ddf3a82 Compare September 13, 2022 19:30
@github-actions
Copy link
Contributor

github-actions bot commented Sep 13, 2022

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

@yosevu yosevu force-pushed the yosevu/css-152-migrate-inline-alert-to-core-tokens branch from ddf3a82 to 1b7bd93 Compare September 13, 2022 19:33
@github-actions github-actions bot temporarily deployed to pull request September 13, 2022 19:37 Inactive
@yosevu yosevu force-pushed the yosevu/css-152-migrate-inline-alert-to-core-tokens branch from 1b7bd93 to 32b6658 Compare September 13, 2022 19:37
@github-actions github-actions bot temporarily deployed to pull request September 13, 2022 19:42 Inactive
@yosevu yosevu force-pushed the yosevu/css-152-migrate-inline-alert-to-core-tokens branch from 67b3c9e to faf7b76 Compare September 13, 2022 20:05
@github-actions github-actions bot temporarily deployed to pull request September 13, 2022 20:09 Inactive
Copy link
Contributor

@lunarfusion lunarfusion left a comment

Choose a reason for hiding this comment

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

I think the skin file needs to be deleted and the branch needs to be rebased to main.

Looks good!

align-items: center;
justify-content: space-between;
/* Minimum space between header and icon */
gap: var(--mod-inlinealert-spacing-header-to-icon, var(--spectrum-inlinealert-spacing-header-to-icon));
Copy link
Contributor

Choose a reason for hiding this comment

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

Excellent choice to use gap instead of inline margin.

}

.spectrum-InLineAlert-content {
display: block;
margin: var(--spectrum-inlinealert-neutral-content-margin-top) 0 0 0;
margin: var(--mod-inlinealert-spacing-header-content-button, var(--spectrum-inlinealert-spacing-header-content-button)) 0 0 0;
Copy link
Contributor

Choose a reason for hiding this comment

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

Should we change this to margin-block-start and get rid of the '0 0 0'?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with @lunarfusion on this. Logical properties (currently) don't have the ability to do short-hand value definitions, so you'll (probably) want to change this to margin-block-start, margin-block-end, margin-inline-start, and margin-inline-end.

Copy link
Collaborator

@pfulton pfulton 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 good, @yosevu - I left some comments here that we should address.

border-radius: var(--spectrum-inlinealert-neutral-corner-radius);
border-radius: var(--mod-inlinealert-border-radius, var(--spectrum-inlinealert-border-radius));

background-color: var(--mod-inlinealert-background-color, var(--spectrum-inlinealert-background-color));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add the var(--highcontrast-inlinealert-background-color) custom property here too, please?

}

.spectrum-InLineAlert-content {
display: block;
margin: var(--spectrum-inlinealert-neutral-content-margin-top) 0 0 0;
margin: var(--mod-inlinealert-spacing-header-content-button, var(--spectrum-inlinealert-spacing-header-content-button)) 0 0 0;
Copy link
Collaborator

Choose a reason for hiding this comment

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

I agree with @lunarfusion on this. Logical properties (currently) don't have the ability to do short-hand value definitions, so you'll (probably) want to change this to margin-block-start, margin-block-end, margin-inline-start, and margin-inline-end.

word-wrap: break-word;

color: var(--mod-inlinealert-header-and-content-color, var(--spectrum-inlinealert-header-and-content-color));
Copy link
Collaborator

Choose a reason for hiding this comment

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

Can you add the --highcontrast custom property here?

@yosevu
Copy link
Contributor Author

yosevu commented Oct 4, 2022

@pfulton I had paused work on this while waiting for typography so I didn't finish adding all the token fallbacks. I have added them all now though and I'm thinking it might make sense to do the Typography component integrations a separate issue if possible.

@yosevu yosevu force-pushed the yosevu/css-152-migrate-inline-alert-to-core-tokens branch from 591db8b to e977c6a Compare October 4, 2022 07:20
@yosevu yosevu requested a review from pfulton October 4, 2022 07:22
@github-actions github-actions bot temporarily deployed to pull request October 4, 2022 07:24 Inactive
@pfulton pfulton force-pushed the yosevu/css-152-migrate-inline-alert-to-core-tokens branch from e977c6a to 75c15a0 Compare October 4, 2022 14:40
@pfulton
Copy link
Collaborator

pfulton commented Oct 4, 2022

@pfulton I had paused work on this while waiting for typography so I didn't finish adding all the token fallbacks. I have added them all now though and I'm thinking it might make sense to do the Typography component integrations a separate issue if possible.

Yeah, I think that makes sense to me.

Comment on lines 41 to 45
.spectrum-InLineAlert {
--highcontrast-inlinealert-background-color: Background;
--highcontrast-inlinealert-header-and-content-color: CanvasText;
--highcontrast-inlinealert-border-and-icon-color: ButtonBorder;
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

@yosevu I missed this in my previous review, so I made the change myself. I think we should try to stick with scoping the highcontrast custom properties to the component's selector. Previously, (without the selector) these custom properties were just being defined without any selector scope.

@github-actions github-actions bot temporarily deployed to pull request October 4, 2022 14:44 Inactive
@pfulton
Copy link
Collaborator

pfulton commented Oct 4, 2022

All right, this is rebased against the latest stuff in main and the beta has been published @yosevu:

@spectrum-css/inlinealert@5.0.0-beta.0

@yosevu yosevu requested a review from pfulton October 5, 2022 11:18
@yosevu yosevu force-pushed the yosevu/css-152-migrate-inline-alert-to-core-tokens branch from 75c15a0 to bf5e131 Compare October 5, 2022 11:26
@github-actions github-actions bot temporarily deployed to pull request October 5, 2022 11:30 Inactive
@github-actions github-actions bot temporarily deployed to pull request October 5, 2022 11:36 Inactive
Copy link
Collaborator

@pfulton pfulton left a comment

Choose a reason for hiding this comment

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

Would you mind taking a look at this in Firefox? The borders are looking a little funky:

Screen Shot 2022-10-05 at 10 27 06 AM

I think you might need to also define border-inline-width in addition to your existing border-block-width (at least, that's what I tried in my browser inspector and it seemed to work ok?)

@yosevu yosevu requested a review from pfulton October 6, 2022 20:27
@yosevu
Copy link
Contributor Author

yosevu commented Oct 6, 2022

Would you mind taking a look at this in Firefox? The borders are looking a little funky:

Screen Shot 2022-10-05 at 10 27 06 AM

I think you might need to also define border-inline-width in addition to your existing border-block-width (at least, that's what I tried in my browser inspector and it seemed to work ok?)

Updated. I wonder why we didn't see the issue in Chrome.

@github-actions github-actions bot temporarily deployed to pull request October 6, 2022 20:30 Inactive
@pfulton pfulton force-pushed the yosevu/css-152-migrate-inline-alert-to-core-tokens branch from 74afa27 to 3893238 Compare October 12, 2022 14:30
@github-actions github-actions bot temporarily deployed to pull request October 12, 2022 14:34 Inactive
Copy link
Collaborator

@pfulton pfulton left a comment

Choose a reason for hiding this comment

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

This looks good now, @yosevu! I also rebased this against main and bumped the beta version number. It's been released at: @spectrum-css/inlinealert@5.0.0-beta.1

@pfulton pfulton merged commit a4d72ad into main Oct 12, 2022
@pfulton pfulton deleted the yosevu/css-152-migrate-inline-alert-to-core-tokens branch October 12, 2022 21:04
bernhard-adobe added a commit that referenced this pull request Oct 14, 2022
* main: (65 commits)
  chore(release): release
  chore!: use latest CSS tokens dependency
  refactor(swatch)!: remap core token aliases & rename aliases
  refactor(helptext)!: remap core token aliases & rename aliases
  refactor(radio)!: remap core token aliases & rename aliases
  refactor(checkbox)!: remap core token aliases & rename aliases
  refactor(switch)!: remap core token aliases & rename aliases
  refactor(actionbutton)!: remap core token aliases & rename aliases
  refactor(closebutton)!: remap core token aliases & rename aliases
  feat(tokens)!: use latest beta release
  chore(release): release
  refactor(inlinealert)!: migrate to core tokens (#1519)
  chore(release): release
  fix(checkbox): whcm focus states (#1527)
  chore(release): release
  feat(fieldlabel)!: migrate to core tokens (CSS-102) (#1476)
  chore(release): release
  feat(swatchgroup)!: migrate swatchgroup to core tokens (#1505)
  chore(release): release
  feat(swatch)!: migrate swatch to core tokens (#1501)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants