-
Notifications
You must be signed in to change notification settings - Fork 201
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
refactor(inlinealert)!: migrate core tokens #1519
Conversation
b6b7c94
to
ddf3a82
Compare
🚀 Deployed on https://pr-1519--spectrum-css.netlify.app |
ddf3a82
to
1b7bd93
Compare
1b7bd93
to
32b6658
Compare
67b3c9e
to
faf7b76
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.
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)); |
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.
Excellent choice to use gap instead of inline margin.
components/inlinealert/index.css
Outdated
} | ||
|
||
.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; |
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.
Should we change this to margin-block-start and get rid of the '0 0 0'?
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.
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
.
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.
This is looking good, @yosevu - I left some comments here that we should address.
components/inlinealert/index.css
Outdated
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)); |
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.
Can you add the var(--highcontrast-inlinealert-background-color)
custom property here too, please?
components/inlinealert/index.css
Outdated
} | ||
|
||
.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; |
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.
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
.
components/inlinealert/index.css
Outdated
word-wrap: break-word; | ||
|
||
color: var(--mod-inlinealert-header-and-content-color, var(--spectrum-inlinealert-header-and-content-color)); |
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.
Can you add the --highcontrast
custom property here?
@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. |
591db8b
to
e977c6a
Compare
e977c6a
to
75c15a0
Compare
Yeah, I think that makes sense to me. |
components/inlinealert/index.css
Outdated
.spectrum-InLineAlert { | ||
--highcontrast-inlinealert-background-color: Background; | ||
--highcontrast-inlinealert-header-and-content-color: CanvasText; | ||
--highcontrast-inlinealert-border-and-icon-color: ButtonBorder; | ||
} |
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.
@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.
All right, this is rebased against the latest stuff in
|
75c15a0
to
bf5e131
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.
BEAKING CHANGE
Contain icon within header and use flexbox.
Font styles will be handled in Typography Heading
74afa27
to
3893238
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.
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
* 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) ...
Description
Does not include
How and where has this been tested?
Screenshots
To-do list