Repository navigation
feat(user-card): full s2 migration - #6742
aramos-adobe wants to merge 15 commits into
Conversation
* feat(user-card): files, api, styling extend CardBase * fix(user-card): updating xs avatar size to 100 * chore(user-card): keep it focused on files api and styling for now tests for next pr * feat(user-card): update grid avatar layout and docs * fix(usercard): fixing broken doc links * Update 2nd-gen/packages/swc/components/user-card/user-card.css Use border width token instead of hardcoded value Co-authored-by: Stephanie Eckles <seckles@adobe.com> --------- Co-authored-by: Stephanie Eckles <seckles@adobe.com>
|
📚 Branch Preview Links🔍 Gen1 Visual Regression Test ResultsWhen a visual regression test fails (or has previously failed while working on this branch), its results can be found in the following URLs:
Deployed to Azure Blob Storage: If the changes are expected, update the |
* test(user-card): add vrt, tests and a11y specs * fix(user-card): overlap test fix * test(user-card): add action button in docs and vrt * fix(user-card): update fire udpate * fix(user-card): fix type error
* docs(user-card): update docs * docs(user-card): updating docs to include asset * docs(card): update migration plan docs * feat(user-card): adding asset card to test with * docs(user-card): removing default 3 1 line * chore(user-card): bringing new changes to PR * docs(user-card): update migration plans * chore(user-card): addressing feedback * docs(user-card): make decorative and alt consistent
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
5t3ph
left a comment
There was a problem hiding this comment.
Great work on this! I just missed getting to it during the docs phase, so a bit of comments from that angle.
| <swc-avatar | ||
| slot="avatar" | ||
| src="./images/avatar-preview.png" | ||
| alt="Jane Doe" |
There was a problem hiding this comment.
This change to swc-avatar was missed
| COMBINED STATES | ||
| ───────────────────────────────────────────────────────────────────────────── */ | ||
|
|
||
| :host(:is([title-as-link], [selectable]):not([variant="tertiary"], [variant="quiet"]):is(:hover, :focus-visible)) { |
There was a problem hiding this comment.
To fix the Card VRT regression, restore this selector since it's a :not() condition, since it's already complex it will be easiest to keep here and won't harm the other card types as it will be ignored as not applicable.
nikkimk
left a comment
There was a problem hiding this comment.
I have some a11y questions on this one that need to be resolved. I'd like to pause if we can.
Description
This migration brings
user-cardinto the Spectrum 2 component structure and updates it to match the newer card patterns and token system.The work includes the new
user-cardcomponent, updated exports and types, Spectrum 2 styling, storybook docs, and the test coverage needed to support the component in the SWC library.I also added the changelog entry and migration docs so the component lands with the rest of the gen2 work.
Motivation and context
We’re moving the older first-generation components to the new Spectrum 2 architecture, and
user-cardis part of that effort.This update keeps the component aligned with the newer API, design tokens, and documentation standards while making it ready for the same testing and accessibility expectations as the rest of the library.
Related issue(s)
Screenshots (if appropriate)
Author's checklist
Reviewer's checklist
patch,minor, ormajorfeaturesManual review test cases
Default render and layout
user-cardStorybook story.Content and action states
Accessibility check
Device review
Accessibility testing checklist
Required: Complete each applicable item and document your testing steps (replace the placeholders with your component-specific instructions).
Keyboard (required — document steps below) — What to test for: Focus order is logical; Tab reaches the component and all interactive descendants; Enter/Space activate where appropriate; arrow keys work for tabs, menus, sliders, etc.; no focus traps; Escape dismisses when applicable; focus indicator is visible.
user-cardStorybook stories and tab through each interactive control.Screen reader (required — document steps below) — What to test for: Role and name are announced correctly; state changes (e.g. expanded, selected) are announced; labels and relationships are clear; no unnecessary or duplicate announcements.