Skip to content

Conversation

aramos-adobe
Copy link
Contributor

Description

Creates AI-generated migration documentation to analyze component differences to guide SWC migration to S2, with human vetting. The documentation serves as a bridge between the migrated Spectrum 2 CSS work and the corresponding web components, in order to help engineers understand what needs to be implemented, updated, or aligned between the two systems to guide the development of 2nd generation web components.

This batch is for the barebones components:

  • Avatar
  • Opacity checkerboard
  • Swatch + Swatch group
  • Thumbnail

Motivation and context

  • Clear development roadmap: Provides comprehensive feature gap analysis for building 2nd generation web components
  • Implementation requirements: Identifies all features and capabilities that need to be implemented to match Spectrum 2 CSS and design specs
  • Breaking change transparency: Establishes implementation requirements and design changes that may lead to breaking changes and/or API changes for the next major version
  • Adoption planning: Enables developers and consuming teams to plan for 2nd gen web component adoption and understand migration effort required

Related issue(s)

SWC-1221

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 changeset if changes suggested include 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

Documentation Quality

  • All files follow template structure with proper collapsible sections
  • CSS => SWC mapping tables use correct status values
  • Summary sections are concise and actionable
  • No broken markdown syntax

Cross-Reference Accuracy

  • CSS selectors match actual metadata.json files
  • SWC attributes match actual TypeScript source files
  • DOM structure comparisons match template files
  • Implementation gaps are complete and accurate

@aramos-adobe aramos-adobe requested a review from a team as a code owner September 18, 2025 04:38
Copy link

changeset-bot bot commented Sep 18, 2025

⚠️ No Changeset found

Latest commit: ee5fdd5

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.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

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

@aramos-adobe aramos-adobe changed the title Aramos-adobe/swc1221-component-analysis-docs chore(docs): 2nd gen component analysis for avatar, opacity checkerboard, swatch + swatchgroup, thumbnail Sep 18, 2025
@aramos-adobe aramos-adobe self-assigned this Sep 18, 2025
Copy link
Contributor

github-actions bot commented Sep 18, 2025

📚 Branch Preview

🔍 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-5740

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.

Copy link
Contributor

Tachometer results

Currently, no packages are changed by this PR...

Copy link
Collaborator

@rise-erpelding rise-erpelding left a comment

Choose a reason for hiding this comment

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

Left some comments! We'll definitely want to fill in the Resources sections here, plus review some of the callouts that the docs are making for accuracy!

@marissahuysentruyt marissahuysentruyt self-assigned this Sep 23, 2025
@castastrophe castastrophe force-pushed the aramos-adobe/swc1221-component-analysis-docs branch 4 times, most recently from 152b6af to c5f8345 Compare September 24, 2025 20:31
```html
<!-- With link -->
<a id="link" class="link" href="[href]">
<img class="image" alt="[label]" src="[src]" />
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh I love how this showcases where the props go!

| `.spectrum-Avatar-image` | `src` attribute | Implemented |
| `.spectrum-Avatar-link` | `href` attribute | Implemented |
| `.is-focused` | Focus state | Implemented |
| `.is-disabled` | `disabled` attribute | Missing from WC |
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh yeah, I think Rise mentioned we could mark the disabled attribute as Implemented.

Copy link
Contributor

Choose a reason for hiding this comment

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

Nice, I'll update this


## Summary of changes

### CSS => SWC implementation gaps
Copy link
Collaborator

Choose a reason for hiding this comment

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

oh! There's a follow up ticket for avatar with some newly added default gradient background support. Should we call out that there's more to this component that isn't supported by CSS yet either?

Just thinking out loud- when would that work be done? Separately from the SWC migration to S2? Like a follow up once avatar has migrated?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh dang, that's tough. I'm tempted to call it "out of scope" for now since it wasn't in place when we first migrated the component. Do you think we're likely to miss it if we do that though?

Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think it hurts to include information about variants that we didn't implement in CSS, and I'm not sure what the exact order of implementation would be, but I would guess that we might do a single pass to bring our existing CSS over, then go back and address the other variants later, so it might not be absolutely necessary to include for the "first pass" migration.

We do have a ticket for those additional variants: CSS-1236. If that ends up happening in CSS before we migrate, we should come back and note it in these docs. But if we address it in SWC, I think we'll be ok.

I'm also hoping/assuming that we'll do some kind of design review before shipping anything so that's another fallback for missing variants to be called out!


```html
<!-- Used as a utility class in other components -->
<div class="opacity-checkerboard [variant]">
Copy link
Collaborator

Choose a reason for hiding this comment

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

What would one of the variant options be? Like fill (which I saw in the swatch story)?

Copy link
Contributor

Choose a reason for hiding this comment

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

Oh yeah, I suppose it doesn't have any variants. I can remove this reference.


### CSS Spectrum 2 changes

No significant structural changes between CSS main and spectrum-two branches. The templates are identical, indicating that the swatch group component structure remains consistent across Spectrum 2 migration. Swatch group includes a setting for single or multiple selection and it might be worth connecting with design to see if there should be any unique styles designed that differentiates single or multi-select swatch groups.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not sure where this information would be most helpful, but could we add a short description of why the border prop for swatch group is getting deprecated for SWC S2?

If I'm remembering correctly, the border used to be applied per-swatch within a swatch group (as in- low-contrast swatches would get the light border, while higher contrast swatches didn't need a border). Design decided that they wanted borders on all swatches for S2, however. The only exception looks like the addSwatch.

Copy link
Contributor

Choose a reason for hiding this comment

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

I added some verbage to this end, let me know if it sounds okay!


<!-- With background -->
<div
class="spectrum-Thumbnail spectrum-Thumbnail--cover spectrum-Thumbnail-layer is-selected is-disabled is-focused spectrum-Thumbnail--size500"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is this background example supposed to have the layer class still?

Copy link
Collaborator

Choose a reason for hiding this comment

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

🤔


<!-- Default -->
<div
class="spectrum-Thumbnail spectrum-Thumbnail--cover spectrum-Thumbnail-layer is-selected is-disabled is-focused spectrum-Thumbnail--size500"
Copy link
Collaborator

Choose a reason for hiding this comment

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

same here- I assume the layer class needs to be removed.

Comment on lines +164 to +167
<div
class="spectrum-Thumbnail-background"
style="background-color: [backgroundColor]"
></div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

And then this gets removed from the Default example markup too, I assume?


**CSS features missing from Web Component:**

- Disabled state support (`.is-disabled`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think disabled is supported in SWC! It's not on the API table, though.

Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder how that happened... it looks like focus and selected are supported as well.


- [CSS migration](https://github.com/adobe/spectrum-css/pull/3394)
- [Spectrum 2 preview](https://spectrumcss.z13.web.core.windows.net/pr-2352/index.html?path=/docs/components-opacity-checkerboard--docs)
- [React](https://react-spectrum.adobe.com/s2/index.html?path=/docs/colorslider--docs) (not a standalone component, but styles are used by the color slider)
Copy link
Collaborator

Choose a reason for hiding this comment

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

not a standalone component, but styles are used by the color slider

Love this clarification, will be borrowing this for other components if it comes up.


### CSS Spectrum 2 changes

There is a new add swatch functionality in the `spectrum-two` branch and supplemental state and pseudo-element styling selectors in the `spectrum-two` branch which will automatically be applied when consumed by the web component for Spectrum 2.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Just a nit to make the name of the feature stand out more. This seems to align with Adobe's grammar & mechanics guidelines although I do see other examples on the page where they're using quotes or italics.

Suggested change
There is a new add swatch functionality in the `spectrum-two` branch and supplemental state and pseudo-element styling selectors in the `spectrum-two` branch which will automatically be applied when consumed by the web component for Spectrum 2.
There is a new **add swatch** functionality in the `spectrum-two` branch and supplemental state and pseudo-element styling selectors in the `spectrum-two` branch which will automatically be applied when consumed by the web component for Spectrum 2.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes, love it!

<details>
<summary>Attributes</summary>

- `border` (string) - Border style: 'light', 'none' **deprecated** (from Swatch component)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yep, as mentioned with Swatch the borders are more transparent when in the group.


<!-- With background -->
<div
class="spectrum-Thumbnail spectrum-Thumbnail--cover spectrum-Thumbnail-layer is-selected is-disabled is-focused spectrum-Thumbnail--size500"
Copy link
Collaborator

Choose a reason for hiding this comment

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

🤔

Comment on lines +265 to +267
| `.is-disabled` | `disabled` attribute | Missing from WC |
| `.is-focused` | Focus state | Missing from WC |
| `.is-selected` | `selected` attribute | Missing from WC |
Copy link
Collaborator

Choose a reason for hiding this comment

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

It looks like these states do exist in SWC


**CSS features missing from Web Component:**

- Disabled state support (`.is-disabled`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I wonder how that happened... it looks like focus and selected are supported as well.

@castastrophe castastrophe force-pushed the aramos-adobe/swc1221-component-analysis-docs branch from c5f8345 to 088c63c Compare October 2, 2025 17:59
@castastrophe castastrophe force-pushed the aramos-adobe/swc1221-component-analysis-docs branch from 088c63c to ee5fdd5 Compare October 2, 2025 18:11

**CSS features missing from Web Component:**

- Disabled state support (`.is-disabled`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
- Disabled state support (`.is-disabled`)


## Summary of changes

### CSS => SWC implementation gaps
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't think it hurts to include information about variants that we didn't implement in CSS, and I'm not sure what the exact order of implementation would be, but I would guess that we might do a single pass to bring our existing CSS over, then go back and address the other variants later, so it might not be absolutely necessary to include for the "first pass" migration.

We do have a ticket for those additional variants: CSS-1236. If that ends up happening in CSS before we migrate, we should come back and note it in these docs. But if we address it in SWC, I think we'll be ok.

I'm also hoping/assuming that we'll do some kind of design review before shipping anything so that's another fallback for missing variants to be called out!

- `.spectrum-Swatch-disabledIcon path:last-child`
- `.spectrum-Swatch-fill`
- `.spectrum-Swatch-fill:before`
- `.spectrum-Swatch-icon`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Duplicate:

Suggested change
- `.spectrum-Swatch-icon`

- `.spectrum-Swatch-fill`
- `.spectrum-Swatch-fill:before`
- `.spectrum-Swatch-icon`
- `.spectrum-Swatch-image`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Another duplicate (the suggestion doesn't seem to work for me to suggest removing 2 lines of code, sorry for the duplicate suggestion 😆)

Suggested change
- `.spectrum-Swatch-image`

- `rounding` (string) - Corner rounding: 'none', 'full'
- `selected` (boolean) - Whether the swatch is selected
- `shape` (string) - Shape variant: 'rectangle'
- `size` (string) - Size: 'xs', 's', 'm', 'l'
Copy link
Collaborator

Choose a reason for hiding this comment

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

Is it maybe because it's using a size mixin? I've noticed if the types aren't defined within the file (if they're imported) those don't get picked up either.


<!-- Default -->
<div
class="spectrum-Thumbnail spectrum-Thumbnail--cover spectrum-Thumbnail-layer is-selected is-disabled is-focused spectrum-Thumbnail--size500"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
class="spectrum-Thumbnail spectrum-Thumbnail--cover spectrum-Thumbnail-layer is-selected is-disabled is-focused spectrum-Thumbnail--size500"
class="spectrum-Thumbnail spectrum-Thumbnail--cover is-selected is-disabled is-focused spectrum-Thumbnail--size500"


<!-- With background -->
<div
class="spectrum-Thumbnail spectrum-Thumbnail--cover spectrum-Thumbnail-layer is-selected is-disabled is-focused spectrum-Thumbnail--size500"
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
class="spectrum-Thumbnail spectrum-Thumbnail--cover spectrum-Thumbnail-layer is-selected is-disabled is-focused spectrum-Thumbnail--size500"
class="spectrum-Thumbnail spectrum-Thumbnail--cover is-selected is-disabled is-focused spectrum-Thumbnail--size500"

Comment on lines +220 to +223
<div
class="spectrum-Thumbnail-background"
style="background-color: [backgroundColor]"
></div>
Copy link
Collaborator

Choose a reason for hiding this comment

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

As with legacy, the default thumbnail doesn't have this background div

Suggested change
<div
class="spectrum-Thumbnail-background"
style="background-color: [backgroundColor]"
></div>

Comment on lines +265 to +267
| `.is-disabled` | `disabled` attribute | Missing from WC |
| `.is-focused` | Focus state | Missing from WC |
| `.is-selected` | `selected` attribute | Missing from WC |
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
| `.is-disabled` | `disabled` attribute | Missing from WC |
| `.is-focused` | Focus state | Missing from WC |
| `.is-selected` | `selected` attribute | Missing from WC |
| `.is-disabled` | `disabled` attribute | Implemented |
| `.is-focused` | Focus state | Implemented |
| `.is-selected` | `selected` attribute | Implemented |

Comment on lines +275 to +277
- Disabled state support (`.is-disabled`)
- Focus state support (`.is-focused`)
- Selected state support (`.is-selected`)
Copy link
Collaborator

Choose a reason for hiding this comment

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

I think focus, selected, and disabled, are all there in SWC.

Suggested change
- Disabled state support (`.is-disabled`)
- Focus state support (`.is-focused`)
- Selected state support (`.is-selected`)
None found for this component.

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

Successfully merging this pull request may close these issues.

4 participants