Skip to content

chore(thumbnail): s2 migration full fidelity - #6740

Open
cdransf wants to merge 5 commits into
cdransf/s2-migration-thumbnail-api-a11yfrom
cdransf/s2-migration-thumbnail-full-fidelity
Open

cdransf wants to merge 5 commits into
cdransf/s2-migration-thumbnail-api-a11yfrom
cdransf/s2-migration-thumbnail-full-fidelity

Conversation

@cdransf

@cdransf cdransf commented Sep 11, 2026

Copy link
Copy Markdown
Member

Description

  • Migrated thumbnail.css to Spectrum 2 tokens: all 12 sizes, bordered frame (inset box-shadow), fit="cover"|"contain", forced-colors border override
  • Sourced from spectrum-css spectrum-two branch + @adobe/spectrum-tokens; dropped layer/background/disabled/focused/selected per the migration plan (consumer-owned styling instead)
  • Expanded stories to cover Overview, Anatomy, Sizes, Fit, and a consumer-styled-states example
  • Found and fixed 2 pre-existing a11y bugs while reviewing:
    • aria-hidden could get permanently stuck on <swc-thumbnail decorative> once decorative was unset
    • missing-alt DEBUG warning could log twice on first render
  • Trimmed a couple of comments that leaned on "replaces 1st-gen's X" framing instead of just stating current behavior

Motivation and context

Closes out Phase 5 (Styling) of the Thumbnail migration so it matches the S2 Figma spec pixel-for-pixel.

Related issue(s)

  • fixes SWC-2199

Screenshots (if appropriate)

Add Chromatic/Storybook screenshots here before requesting review — sizes, fit, forced-colors.

Author's checklist

  • I have read the CONTRIBUTING and PULL_REQUESTS documents.
  • I have reviewed at the Accessibility Practices for this feature, see: Aria Practices
  • I have added automated tests to cover my changes.
  • I have included a well-written changeset if my change needs to be published.
  • I have included updated documentation if my change required it.

Reviewer's checklist

  • Includes a Github Issue with appropriate flag or Jira ticket number without a link
  • Includes thoughtfully written changenclude patch, minor, or major features
  • Automated tests cover all use cases and follow best practices for writing
  • Validated on all supported browsers
  • All VRTs are approved before the author can update Golden Hash

Manual review test cases

  • All 12 sizes render correctly

    1. Go to Thumbnail > Sizes in Storyb
    2. Expect 12 thumbnails, 16px → 64px, each with a visible checkerboard + border
  • fit behaves correctly

    1. Go to Thumbnail > Fit in Storyboo
    2. Expect contain to letterbox the image, cover to crop and fill the box
  • Decorative toggle no longer gets stuck

    1. In the Playground, add decorative, "` in devtools
    2. Remove decorative
    3. Expect aria-hidden to be gone

Device review

  • Did it pass in Desktop?
  • Did it pass in (emulated) Mobile?
  • Did it pass in (emulated) iPad?

Accessibility testing checklist

  • Keyboard (required — document st

    1. Go to Thumbnail > Overview in Storybook
    2. Press Tab from before the
    3. Expect focus to skip the thumbnail entirely — no interactive parts, never a tab stop
  • Screen reader (required — document steps below)

    1. Go to Thumbnail > Overview with V
    2. Expect the slotted <img> to announce as an image with its alt text as the name
    3. Toggle decorative in the Playground
    4. Expect the thumbnail to be skipped entirely — not announced at all

@cdransf cdransf self-assigned this Sep 11, 2026
@changeset-bot

changeset-bot Bot commented Sep 11, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 904c0f5

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@cdransf cdransf added Component:Thumbnail Spectrum 2 Issues related to Spectrum 2 run_vrt Triggers the Chromatic VRT run for 2nd-gen labels Sep 11, 2026
@cdransf
cdransf added this pull request to stack #6730 September 11, 2026 21:07
@cdransf
cdransf marked this pull request as ready for review September 11, 2026 21:07
@cdransf
cdransf requested a review from a team as a code owner September 11, 2026 21:07
@github-actions

Copy link
Copy Markdown
Contributor

📚 Branch Preview Links

🔍 Gen1 Visual Regression Test Results

When 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: pr-6740

If the changes are expected, update the current_golden_images_cache hash in the circleci config to accept the new images. Instructions are included in that file.
If the changes are unexpected, you can investigate the cause of the differences and update the code accordingly.

@aramos-adobe aramos-adobe added the Status:Ready for review PR ready for review or re-review. label Sep 11, 2026

@5t3ph 5t3ph left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

A note that the merge base isn't quite correct so this is showing more than just the "full fidelity" related changes

Comment thread 2nd-gen/.changeset/thumbnail-s2-visual-fidelity.md Outdated
Comment thread 2nd-gen/packages/swc/components/thumbnail/thumbnail.css
Comment thread 2nd-gen/packages/swc/components/thumbnail/thumbnail.css Outdated
Comment thread 2nd-gen/packages/swc/components/thumbnail/thumbnail.css Outdated
@cdransf
cdransf force-pushed the cdransf/s2-migration-thumbnail-full-fidelity branch from 4294aff to c90d5a8 Compare September 14, 2026 22:43
@cdransf
cdransf requested a review from 5t3ph September 14, 2026 23:10
@coveralls

coveralls commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 34908834099

Warning

No base build found for commit 2d8fece on cdransf/s2-migration-thumbnail-api-a11y.
Coverage changes can't be calculated without a base build.
If a base build is processing, this comment will update automatically when it completes.

Coverage: 96.287%

Details

  • Patch coverage: No coverable lines changed in this PR.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

Requires a base build to compare against. How to fix this →


Coverage Stats

Coverage Status
Relevant Lines: 39827
Covered Lines: 38548
Line Coverage: 96.79%
Relevant Branches: 6555
Covered Branches: 6112
Branch Coverage: 93.24%
Branches in Coverage %: Yes
Coverage Strength: 460.05 hits per line

💛 - Coveralls

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Component:Thumbnail run_vrt Triggers the Chromatic VRT run for 2nd-gen Spectrum 2 Issues related to Spectrum 2 Status:Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants