-
Notifications
You must be signed in to change notification settings - Fork 233
chore(docs): 2nd gen component analysis for avatar, opacity checkerboard, swatch + swatchgroup, thumbnail #5740
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
base: 2nd-gen-component-analysis
Are you sure you want to change the base?
Conversation
|
📚 Branch Preview🔍 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 |
Tachometer resultsCurrently, no packages are changed by this PR... |
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.
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!
|
||
<details> | ||
<summary>Attributes</summary> | ||
|
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.
Is disabled
missing from this list? I know it's listed as a gap below, but it looks like you can actually make the avatar disabled:
```html | ||
<!-- With link --> | ||
<a id="link" class="link" href="[href]"> | ||
<img class="image" alt="[label]" src="[src]" /> | ||
</a> | ||
|
||
<!-- Without link --> | ||
<img class="image" alt="[label]" src="[src]" /> | ||
``` |
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.
Love that both options are included here!
| `.spectrum-Avatar-link` | `href` attribute | Implemented | | ||
| `.spectrum-Avatar.is-disabled` | `disabled` attribute | Missing from WC | | ||
| `.spectrum-Avatar.is-focused` | Focus state | Missing from WC | | ||
| `.spectrum-Avatar--size800` | `size="800"` | Missing from WC | |
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.
Are these all new sizes for S2 or things that existed in S1 that SWC never implemented (implementation gaps)? Can you make a quick note of which one these "Missing from WC" items are in the table as well? For example:
| `.spectrum-Avatar--size800` | `size="800"` | Missing from WC | | |
| `.spectrum-Avatar--size800` | `size="800"` | Missing from WC (new size for S2) | |
- [CSS migration]() | ||
- [Spectrum 2 preview]() | ||
- [React]() |
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.
Could we track down the links for these and fill them in?
The migration PR is adobe/spectrum-css#3355
| `.spectrum-Avatar-image` | `src` attribute | Implemented | | ||
| `.spectrum-Avatar-link` | `href` attribute | Implemented | | ||
| `.spectrum-Avatar.is-disabled` | `disabled` attribute | Missing from WC | | ||
| `.spectrum-Avatar.is-focused` | Focus state | Missing from WC | |
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'm not sure this is a gap, because it does look like at least the linked Avatar is focusable? https://opensource.adobe.com/spectrum-web-components/storybook/index.html?path=/story/avatar--linked&globals=system:spectrum-two
|
||
## Resources | ||
|
||
- [CSS migration]() |
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.
|
||
### CSS Spectrum 2 changes | ||
|
||
No significant structural changes between CSS main and spectrum-two branches. The templates are identical, indicating that the swatch component structure remains consistent across Spectrum 2 migration. |
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.
Hmmm, this feels like a Cursor miss, it forgot about the Add Swatch variant, although it is called out above a couple of times.
|
||
## Resources | ||
|
||
- [CSS migration]() |
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.
Same migration as Swatch, see the comment there for the PR #.
**Web Component Features Missing from CSS:** | ||
|
||
- Border attribute support | ||
- Rounding attribute support | ||
- Selected state management | ||
- Selection mode (single/multiple) | ||
- Shape attribute support | ||
- Size attribute support |
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.
These probably aren't that useful for the purpose of migrating, since we handle all of that a different way in CSS.
| `.spectrum-Thumbnail.is-disabled` | `disabled` attribute | Missing from WC | | ||
| `.spectrum-Thumbnail.is-focused` | Focus state | Missing from WC | | ||
| `.spectrum-Thumbnail.is-selected` | `selected` attribute | Missing from WC | | ||
| `.spectrum-Thumbnail:before` | Pseudo-element styling | Missing from WC | | ||
| `.spectrum-Thumbnail:after` | Pseudo-element styling | Missing from WC | | ||
| `.spectrum-Thumbnail-layer:before` | Pseudo-element styling | Missing from WC | |
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.
Let's take another look at these before we label them as potential gaps or new features that SWC needs to add, I know for sure that disabled does appear to exist in SWC, but some of the other states/pseudo-classes might actually be implemented. Might be worth comparing spectrum-css/components/thumbnail/index.css
to spectrum-web-components/packages/thumbnail/src/spectrum-thumbnail.css
and other SWC CSS files as well.
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:
Motivation and context
Related issue(s)
SWC-1221
Author's checklist
I have added automated tests to cover my changes.I have included a well-written changeset if my change needs to be published.Reviewer's checklist
Includes thoughtfully written changeset if changes suggested includepatch
,minor
, ormajor
featuresAutomated tests cover all use cases and follow best practices for writingValidated on all supported browsersAll VRTs are approved before the author can update Golden HashDocumentation Quality
Cross-Reference Accuracy
metadata.json
files