-
Notifications
You must be signed in to change notification settings - Fork 194
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(avatar)!: use spectrum tokens #1565
Conversation
efa7a14
to
834e542
Compare
🚀 Deployed on https://pr-1565--spectrum-css.netlify.app |
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.
Approving here with a minor question for PJ and Jess in terms of content strategy:
https://adobedesign.slack.com/archives/G019JTYMT6H/p1671723449855909
components/avatar/index.css
Outdated
box-sizing: border-box; | ||
border-width: var(--spectrum-avatar-border-size); | ||
top: calc( | ||
var(--mod-avatar-focus-indicator-gap, var(--spectrum-avatar-focus-indicator-gap)) * |
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.
nit. I would place the -2
for both cases on a single line.
fe0e3e1
to
272987f
Compare
I don't have a problem with this, as we seem to use his photo in other examples in other components. I can double-check with design folks for the ultimate answer, though. I pushed up a few more commits here to correct a few things:
|
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.
Mostly suggestions, but I think the focus indicator position does need a change.
Thanks! I fixed up those things @lunarfusion! |
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.
Changes to calc format and to WHCM.
@lunarfusion - pushed up some changes to address your most recent feedback. This includes the updates to WHCM and the reinstatement of |
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 good to me! 🚀
@pfulton @lunarfusion I am adding the new avatar here in a moment. Maybe please don't merge or release yet. |
I also added a 2x variant for future use. |
Thanks @bernhard-adobe!! |
08f0887
to
94bf397
Compare
Beta released: Tracking the integration here: adobe/spectrum-web-components#2844 |
components/avatar/index.css
Outdated
} | ||
} | ||
|
||
.spectrum-Avatar:focus-within:not(.is-disabled) .spectrum-Avatar-link { |
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 could also be: .spectrum-Avatar:not(.is-disabled) .spectrum-Avatar-link:focus-visible
and have the same functional styles, right? The main difference that we've not discussed for :focus-within
is that is doesn't match the keyboard heuristics of :focus-visible
...
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.
Yeah, that'll work.
And yes, we definitely have a discussion about how best to serve :focus-*
to y'all going forward.
94bf397
to
23115bd
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.
Works for SWC! Graduate a stable release and we can get adobe/spectrum-web-components#2844 closed out as well!
ac4f363
to
a66e376
Compare
BREAKING CHANGE
a66e376
to
883c45d
Compare
Description
.spectrum-Avatar-link
and focus indicator styles for default variantHow and where has this been tested?
Tested in Chrome
Tested in WHCM
Screenshots
To-do list