feat(avatar): migrate s2 avatar#3355
Conversation
🦋 Changeset detectedLatest commit: ac9fd79 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 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-3355--spectrum-css.netlify.app |
File metricsSummaryTotal size: 4.29 MB* Table reports on changes to a package's main file. Other changes can be found in the collapsed Details section below.
Detailsavatar
* Results are not gzipped or minified. * An ASCII character in UTF-8 is 8 bits or 1 byte. |
82c08b5 to
f322aaa
Compare
f322aaa to
3d6fcf2
Compare
5t3ph
left a comment
There was a problem hiding this comment.
All sizes match the Figma ✨
| --spectrum-avatar-border-radius: var(--spectrum-avatar-block-size); | ||
| --spectrum-avatar-border-radius: var(--spectrum-avatar-block-size); | ||
| --spectrum-avatar-border-thickness: var(--spectrum-avatar-border-width); | ||
| --spectrum-avatar-border-color: rgb(var(--spectrum-gray-25-rgb)); |
There was a problem hiding this comment.
I actually went back and tried this with the token from the design, but changed the custom property name a touch, and I think everything is working ok now.
--spectrum-avatar-border-color-default: var(--spectrum-avatar-border-color);
I wonder if we had some caching issues? Because, it was definitely coming up undefined right? Maybe tweaking the custom property and adding that -default helped?
There was a problem hiding this comment.
So strange! I see it working now too. Just updated the PR. ✨
3d6fcf2 to
bfdab94
Compare
marissahuysentruyt
left a comment
There was a problem hiding this comment.
This is looking really good to me. Now that we added the -default to the avatar border property, I think we just need to update the name in .spectrum-Avatar too.
I also had one thought about adding the new sizes to the docs page (eventually).
| border-style: solid; | ||
| border-radius: var(--mod-avatar-border-radius, var(--spectrum-avatar-border-radius)); | ||
| border-width: var(--spectrum-avatar-border-thickness); | ||
| border-color: var(--spectrum-avatar-border-color); |
There was a problem hiding this comment.
We should change this to the --spectrum-avatar-border-color-default!
| category: "Component", | ||
| }, | ||
| options: ["50", "75", "100", "200", "300", "400", "500", "600", "700"], | ||
| options: ["50", "75", "100", "200", "300", "400", "500", "600", "700", "800", "900", "1000", "1100", "1200", "1300", "1400", "1500"], |
There was a problem hiding this comment.
ooo! Would you please make a card to add these new sizes to the table we have on the docs page on main? I was going to ask you to add them, and then realized the docs page on this branch is totally different than what's on main! We should make sure we reference the new sizes on that page eventually, once the big merge happens.
bfdab94 to
ac9fd79
Compare
marissahuysentruyt
left a comment
There was a problem hiding this comment.
Looks great! All of the sizes are working, I see all of the new size tokens, border width and border color tokens! Glad we got the border color thing figured out!
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
* chore(s2-avatar): initial commit * chore(s2-avatar): add sizing and border tokens
Description
For
CSS-1031.Adds support for new avatar-size tokens (avatar-size-800 to avatar-size-1500). Updates avatar component story to support new sizes. Adds support for avatar-border-color and avatar-border-thickness.
Validation steps
How and where has this been tested?
Locally in Storybook.
Regression testing
Validate:
Screenshots
To-do list