-
Notifications
You must be signed in to change notification settings - Fork 195
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(avatar): migrate s2 avatar #3355
base: spectrum-two
Are you sure you want to change the base?
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
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.
All sizes match the Figma ✨
components/avatar/index.css
Outdated
--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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So strange! I see it working now too. Just updated the PR. ✨
3d6fcf2
to
bfdab94
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 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).
components/avatar/index.css
Outdated
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should change this to the --spectrum-avatar-border-color-default
!
@@ -15,7 +15,7 @@ export default { | |||
type: { summary: "string" }, | |||
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.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
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.
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!
Description
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