Skip to content

Conversation

@graynorton
Copy link
Collaborator

@graynorton graynorton commented Oct 20, 2025

Description

This PR introduces a comprehensive contributor documentation system to help maintainers and contributors understand the SWC project's objectives, strategy, and workflows.

Note: This PR targets the barebones branch; nothing in it will land in main until barebones merges into main. With that in mind, the objective of this review is not to focus on details, which can be changed, but to validate and approve this general direction for our contributor docs moving forward.

What's included

This PR adds a CONTRIBUTOR-DOCS folder at the repository root. These docs are just ordinary Markdown files organized within a folder structure that is used to auto-generate breadcrumbs and tables of contents for navigating the docs.

The docs are organized into five main sections:

Objectives and Strategy - Explains the strategic context for the 1st-gen-to-2nd-gen transition, including our goals for unifying Spectrum CSS & SWC, building a clean foundation, enabling Spectrum 2 adoption, improving accessibility, and continually improving components. Also describes our strategy for managing disruptive vs. non-disruptive changes through side-by-side development. The current content represents where the project is today, but this section is intended to be evergreen, updated as our objectives and strategy evolve over time.

Contributor Guides - Includes guides for working on the project, starting with the Adobe Code of Conduct and a detailed guide for authoring and maintaining these contributor docs themselves (including automated TOC/breadcrumb generation via a Node.js script).

After this PR lands, we'll gradually migrate basic information for maintainers and contributors that currently exists in various places beneath the first-gen workspace into this section, updating and cleaning it up as we go.

Style Guide - Placeholder for comprehensive style guide covering project-wide conventions and area-specific rules (to be populated in future work).

Workstream Info and Component Info - These two sections establish a dual-view organizational structure for tracking and planning our work, but are mostly incomplete from a content perspective:

  • Workstream Info provides a workstream-centric view of cross-cutting work. Currently includes framework documentation for 2nd-gen definition/development, 2nd-gen component migration (with a detailed 6-phase migration process), accessibility improvements, component improvements, and 1st-gen Spectrum 2 enhancements. This structure will be populated with detailed planning and status information over time.

  • Component Info offers a component-centric view for tracking individual component roadmaps and status across multiple workstreams. This folder is intended to contain a subfolder for each component, containing analysis and planning docs specific to that component. Note that PR docs: 2nd gen component analysis #5770 contains component analysis work (relevant to the S1 => S2, CSS => SWC migration) that will be merged into this section after this PR lands.

Together, these sections provide the scaffolding we need to organize our planning and tracking efforts as the project evolves.

Motivation and context

These docs serve several purposes:

  1. Context - Provide essential background on why we're doing what we're doing
  2. Coordination - Enable better planning and tracking across multiple parallel workstreams
  3. Onboarding - Help new contributors quickly understand the project's structure, goals, and current transition strategy

Related issue(s)

SWC-1234

@changeset-bot
Copy link

changeset-bot bot commented Oct 20, 2025

⚠️ No Changeset found

Latest commit: 73c97a3

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

@github-actions
Copy link
Contributor

github-actions bot commented Oct 20, 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-5816

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.

@github-actions
Copy link
Contributor

Tachometer results

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

@caseyisonit caseyisonit added the 2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. label Oct 20, 2025
@graynorton graynorton marked this pull request as ready for review October 21, 2025 19:11
@graynorton graynorton requested a review from a team as a code owner October 21, 2025 19:11
@graynorton graynorton added the Status: Ready for review PR ready for review or re-review. label Oct 21, 2025
@graynorton graynorton changed the title [DRAFT] docs: add contributor docs docs: add contributor docs Oct 21, 2025
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.

This is a really fantastic start! There's a lot of information to be organized, and this does a really good job of laying it all out. I left some comments for things we might consider at some point, but no objections regarding merging this into barebones!

Copy link
Collaborator

Choose a reason for hiding this comment

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

This is fantastic, and I love the idea of being able to use both AI and a script to keep TOC and breadcrumbs in order!

Copy link
Collaborator

Choose a reason for hiding this comment

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

I do really like the idea of a table, but will note that I think it'll be really easy to forget to update this. I know part of the migration work we've been doing in barebones included adding the migrated tag in Storybook (for example in Badge) to mirror how we did Spectrum 2 migrations in spectrum-css. It might be nice to find a way to integrate the use of that tag at some point... maybe to have a script or something that looks through the stories files to see what's been migrated. Not necessary now, but a thought for future iteration!

Copy link
Contributor

Choose a reason for hiding this comment

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

love this idea! we should definitely chat about this in a team meeting! or here ;) but i want to make sure this isnt lost!

Copy link
Collaborator Author

@graynorton graynorton Oct 21, 2025

Choose a reason for hiding this comment

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

Yeah, I think there are various things we might do to stay on top of status.

I'm not against the idea of using Storybook tags for this, but one sort of funny thing is that—unlike the situation for the S1 => S2 migration in the CSS repo, if I understand correctly—we aren't starting from a bunch of unmigrated components in 2nd-gen. That is, by the time a component shows up in 2nd-gen Storybook, it will in essence be migrated by definition.

(That was a bit different for the Barebones components, because Ruben "pre-populated" 2nd-gen with stuff copy-pasted from 1st-gen, just so he had something to test the tooling against.)

One thing I've thought about is having some AI-assisted pre-commit instructions...whether they'd be tied to actual precommit hooks I have not yet thought through, but we I think it would be pretty simple to set up Cursor to help us remember to update the status table when we're doing migration PRs. I think Cursor would also be pretty good at doing one-off checks of the table against what it sees in the repo.

In any case, we can discuss what we'd like to do, and then make it so!

Inside the CSS directory, you can expect to find the following files:

- `index.css` - This is the source of truth for the component Styles
- `dist/index.css` - This is the processed version of the component styles; for now, this is the best place to source styles for SWC. When copying files from Spectrum CSS into the 2nd-generation component, using this file will ensure you get the benefits of the CSS build tooling.
Copy link
Collaborator

Choose a reason for hiding this comment

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

This might be obvious, but we don't commit dist/index.css so you have to install & build locally to access this file.

Copy link
Contributor

Choose a reason for hiding this comment

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

great callout, we should add that context to the intro line

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, I think we may end up making a bunch of refinement edits to this doc as we flesh out its peers, and this is definitely a good thing to add!

- Create additional stories showcasing variants, sizes, states
- Add `tags: ['!dev']` to all non-default stories
- In HELPER FUNCTIONS section (if needed):
- Add any utility functions or template helpers
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 I see that some of the utility functions here are a little repetitive... for instance, Status light and Badge both use a CONTAINER function. Status light implements a sizeMap function that maybe could be used in some of the other components in barebones, but definitely could be used in other components outside of barebones as we go along.

I believe that the repetitiveness rather than creating utility functions in a place where they'd be reusable is a deliberate choice for now, right? Could be worth mentioning that here or somewhere if we continue with this for more component migrations--to me, one challenge with this work was trying to figure out what's in scope and what's not.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes! And I agree with your point about “scope” — it’s a bit blurry since we defined barebones as "the minimum possible to validate certain requirements" (as outlined in the RFC), but of course, that can materialize differently once you get into the implementation.
In this case we purposely left the utilities in line but we'll want to evaluate which ones we definitely want and find a shared place for those.
The idea is that right after barebones, we’ll look at this first set of components and take specific actions to address this and other questions or open threads that came up during this initial phase 😀

Comment on lines +14 to +15
- Badge
- Progress Circle
Copy link
Collaborator

Choose a reason for hiding this comment

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

This will be where the markdown files from component analysis docs (#5770) go eventually, right? Would this file get integrated with the README from there? And then over here we'd link to each component and potentially also the prompt?

Copy link
Contributor

Choose a reason for hiding this comment

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

thats how i was interpreting that section

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Yeah, those showed up there because I locally had empty folders for Badge and Progress Circle. When the script for auto-generating nav saw those, it created those TOC entries.

Here's what I quickly splatted into a Slack chat—so, subject to refinement, but generally how I see stuff from #5770 getting integrated:

  • Component analysis should be added as a step (probably the first step, order-wise) in the 2nd-gen Component Migration workstream docs. This would mean making a new folder under CONTRIBUTOR-DOCS/04_workstream-info/02_2nd-gen-component-migration/02_step-by-step and moving the README and cursor_prompt from docs: 2nd gen component analysis #5770 inside it, making any necessary adaptations in the process

  • The analysis for each component should move to an appropriate location beneath CONTRIBUTOR-DOCS/05_component-info. Because I envision the Component Info section evolving to include additional analysis (e.g., analysis of current usage data and patterns), I think the structure that makes most sense might be to add a folder per component, and within each folder include an both an initially empty index file (README.md) and a file containing the analysis from docs: 2nd gen component analysis #5770. My suggestion would be to name that file something like design-and-api-analysis.md, and to update the H1 heading in the file accordingly.

- Import `StoryObj as Story` for consistency
- Set up Storybook helpers with `getStorybookHelpers()`
- Configure argTypes for component-specific controls
- Define and export the meta object
Copy link
Collaborator

@rise-erpelding rise-erpelding Oct 21, 2025

Choose a reason for hiding this comment

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

Is it worthwhile to mention that we should be adding tags: ['migrated'],? Do we want to keep doing that?

Copy link
Contributor

Choose a reason for hiding this comment

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

Good call - probably doesn’t hurt to keep the “migrated” tags for now. That said, “tags” in general probably deserve their own little thought to make sure we’re leveraging them to their full potential (e.g., I can imagine us having "preview", "stable",...)

@graynorton graynorton merged commit 9d536d6 into barebones Oct 21, 2025
20 of 22 checks passed
@graynorton graynorton deleted the gnorton/add-contributor-docs branch October 21, 2025 22:14
@graynorton
Copy link
Collaborator Author

Thanks for the reviews! Going ahead and merging, and we'll refine from here...

- [Contributor Guides](02_contributor-guides/README.md)
- [Adobe Code of Conduct](02_contributor-guides/01_code-of-conduct.md)
- [Authoring contributor docs](02_contributor-guides/authoring-contributor-docs/README.md)
- [Style Guide](03_style-guide/README.md)
Copy link
Contributor

Choose a reason for hiding this comment

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

  • Should we move this to the contributors section? I can't think of a non-contributor use case.
  • I have a JIRA ticket (SWC-996) with a series of accessibility guides, some aimed at contributors, some at consumer, and some at both. Where should it go in this hierarchy?

Copy link
Collaborator Author

@graynorton graynorton Oct 21, 2025

Choose a reason for hiding this comment

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

Should we move this to the contributors section? I can't think of a non-contributor use case.

Very much open to discussing changes to the shape of the outline. In the specific case of Style Guide, I was thinking of it almost like a Style Reference (hmmm, maybe that's a better name for it) with fairly terse descriptions of style and organization conventions that could be followed by either humans or AIs for various purposes.

In contrast, I was thinking of the stuff in Contributor Guides as being a bit more conceptual and topical, more clearly designed for human consumption.

But all of this is up for discussion and revision!

I have a JIRA ticket (SWC-996) with a series of accessibility guides, some aimed at contributors, some at consumer, and some at both. Where should it go in this hierarchy?

We can discuss this, too, but I think it might show up in this hierarchy in a few ways:

  • The description of the work would go in the Workstream Info section somewhere.
  • The contributor-facing docs produced as part of this work would go, most likely, somewhere under Contributor Guides
  • The purely customer-facing docs produced as part of this work would presumably go not in this hierarchy but in Storybook
  • To the extent that there are docs produced as part of this work that are applicable to both audiences, we'd either a) copy-paste the content so it appears in both our contributor-facing and customer-facing docs; or b) include the content in one or the other set of docs and link from the other; or c) come up with a way to share certain Markdown source files so that the same content appears in both docs

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

Labels

2nd gen These issues or PRs map to our 2nd generation work to modernizing infrastructure. Status: Ready for review PR ready for review or re-review.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants