Skip to content

docs: split theme into use-a-theme and author-a-theme - #7141

Merged
josephfarina merged 1 commit into
mainfrom
docs/theme-split
Oct 8, 2026
Merged

josephfarina merged 1 commit into
mainfrom
docs/theme-split

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

What this does

The theme doc was a 33 KB, 19-section monolith mixing two concerns: using themes and authoring themes.

Split into two focused guides plus a thin overview:

use-a-theme (7 sections, ~8 KB) — applying themes to your app

  • Quick start, available themes, props, integration themes, dark mode, nested themes, runtime vs built

author-a-theme (13 sections, ~18 KB) — creating and customizing themes

  • Custom themes, palette generation, defineTheme, extending, component overrides, custom variants, adaptations, build, icon registry, theme families, token utilities, useTheme

theme overview (4 sections, ~3 KB) — thin entry point linking to both

Search results (after)

Query Top result
dark mode toggle use-a-theme#light-dark-mode
defineTheme scale config author-a-theme#definetheme
custom variant button author-a-theme#custom-variants
useTheme chart author-a-theme#usetheme-hook
color palette theme author-a-theme#palette
how do I add a theme integration guide add-a-theme

Cross-links

  • use-a-theme ↔ author-a-theme (both directions)
  • Both → integration authoring guides (define-the-theme, generate-a-palette)
  • Both → styling-libraries, tokens

Also

  • Updates 8 {@link generic:theme} references to point to the right new doc
  • Updates zh/dense overlays for the thin overview
  • Updates test assertions for the new section structure
  • 193/193 CLI tests pass, 0 tree errors, 0 link problems

@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Oct 8, 2026 5:03am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 7, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Oct 7, 2026
@astracat-bot

astracat-bot Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟡 Reviewed (for maintainers only) Oct 8, 2026, 5:14 AM UTC

@github-actions

github-actions Bot commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

Previews ready: Storybook and Sandbox were built with this PR's docsite. CI evidence will be added when available.

View Storybook for this PR · View Sandbox for this PR

josephfarina added a commit that referenced this pull request Oct 7, 2026
Split the 33 KB theme monolith into two focused guides:

- use-a-theme (7 sections) — applying themes, dark mode, nested, runtime vs built
- author-a-theme (13 sections) — defineTheme, palette, overrides, variants, adaptations, build

Thin overview stays at the theme route with cross-links to both.
Updates 8 link references and test assertions.
josephfarina added a commit that referenced this pull request Oct 7, 2026
Split the 33 KB theme monolith into two focused guides:

- use-a-theme (7 sections) — applying themes, dark mode, nested, runtime vs built
- author-a-theme (13 sections) — defineTheme, palette, overrides, variants, adaptations, build

Thin overview stays at the theme route with cross-links to both.
Updates 8 link references and test assertions.
@josephfarina josephfarina reopened this Oct 7, 2026
@josephfarina josephfarina reopened this Oct 7, 2026

@astracat-bot astracat-bot Bot 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.

Thanks for splitting the theme guide — separating “use a theme” from “author a theme” makes the right guide much easier to find.

Before this can land, the workflow inside the new guides needs to match the current theme workflow. For example, use-a-theme tells readers to add an integration theme with plain theme add and describes the result as editable copied source, and author-a-theme presents plain theme add as the way to copy a theme in. The current workflow instead has builder-facing guides name the import form of theme add for using a theme, wire the generated theme module once, customize with extends, and reserve copying for an explicit fork.

The smallest fix is to keep the use/author split and update the copied passages in use-a-theme, author-a-theme, and the thin theme overview to that workflow, preserving the current guide's import-based sections including migration for earlier copies. I did not re-run the CLI tests or search checks here, so please make sure the updated tests still support the search results described in the pull request after the fix.

[Automated review]

@josephfarina josephfarina reopened this Oct 7, 2026
@josephfarina josephfarina reopened this Oct 8, 2026
josephfarina added a commit that referenced this pull request Oct 8, 2026
Split the 33 KB theme monolith into two focused guides:

- use-a-theme (7 sections) — applying themes, dark mode, nested, runtime vs built
- author-a-theme (13 sections) — defineTheme, palette, overrides, variants, adaptations, build

Thin overview stays at the theme route with cross-links to both.
Updates 8 link references and test assertions.

@astracat-bot astracat-bot Bot 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.

Thanks for splitting the theme guide — separating “use a theme” from “author a theme” makes the right guide much easier to find.

Before this can land, the workflow inside the new guides needs to match the current theme workflow. For example, use-a-theme tells readers to add an integration theme with plain theme add and describes the result as editable copied source, and author-a-theme presents plain theme add as the way to copy a theme in. The current workflow instead has builder-facing guides name the import form of theme add for using a theme, wire the generated theme module once, customize with extends, and reserve copying for an explicit fork.

The smallest fix is to keep the use/author split and update the copied passages in use-a-theme, author-a-theme, and the thin theme overview to that workflow, preserving the current guide's import-based sections including migration for earlier copies. I did not re-run the CLI tests or search checks here, so please make sure the updated tests still support the search results described in the pull request after the fix.

[Automated review]

josephfarina added a commit that referenced this pull request Oct 8, 2026
Split the 33 KB theme monolith into two focused guides:

- use-a-theme (7 sections) — applying themes, dark mode, nested, runtime vs built
- author-a-theme (13 sections) — defineTheme, palette, overrides, variants, adaptations, build

Thin overview stays at the theme route with cross-links to both.
Updates 8 link references and test assertions.

@astracat-bot astracat-bot Bot 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.

Thanks for splitting the theme guide — separating “use a theme” from “author a theme” makes the right guide much easier to find.

Before this can land, the workflow inside the new guides needs to match the current theme workflow. For example, use-a-theme tells readers to add an integration theme with plain theme add and describes the result as editable copied source, and author-a-theme presents plain theme add as the way to copy a theme in. The current workflow instead has builder-facing guides name the import form of theme add for using a theme, wire the generated theme module once, customize with extends, and reserve copying for an explicit fork. The search test change also relaxes the exact import command assertion for theme results to a prefix, which no longer checks that stage command.

The smallest fix is to keep the use/author split and update the copied passages in use-a-theme, author-a-theme, and the thin theme overview to that workflow, preserving the current guide's import-based sections including migration for earlier copies, and restore the exact stage-command assertion. The changed CLI doc and search tests pass here apart from one usage-prefix assertion that depends on how the test runner was invoked, so please make sure the updated tests still support the search results described in the pull request after the fix.

[Automated review]

Split the 33 KB theme monolith into two focused guides:

- use-a-theme (7 sections) — applying themes, dark mode, nested, runtime vs built
- author-a-theme (13 sections) — defineTheme, palette, overrides, variants, adaptations, build

Thin overview stays at the theme route with cross-links to both.
Updates 8 link references, the token-docs generator, and test assertions.

@astracat-bot astracat-bot Bot 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.

Thanks for splitting the theme guide — separating “use a theme” from “author a theme” makes the right guide much easier to find, and the changed CLI tests pass locally (152 tests across the five changed files).

Before this can land, the workflow inside the new guides needs to match the current theme workflow. For example, use-a-theme tells readers to add an integration theme with plain theme add and describes the result as editable copied source, author-a-theme presents plain theme add as the way to copy a theme in, and none of the new guides mentions the import form, the generated app theme module, or the fork command — the earlier-copy migration guidance also disappears. The current workflow instead names theme add --import for using a theme, wires the generated module once, customizes with extends, reserves copying for an explicit fork, and keeps migration guidance for earlier copies. The referring getting-started and integration guides still teach the import workflow and now link into the new guides, so the shipped surfaces would disagree with each other.

The smallest fix is to keep the use/author split and update the workflow passages in use-a-theme, author-a-theme, and the thin theme overview from the current import-based sections, preserving the migration section, then confirm the updated tests still support the search behavior described in the pull request.

[Automated review]

@josephfarina
josephfarina merged commit 35df694 into main Oct 8, 2026
45 checks passed
@github-actions
github-actions Bot deleted the docs/theme-split branch October 8, 2026 06:25
josephfarina added a commit that referenced this pull request Oct 8, 2026
The theme split (#7141) taught plain `theme add` (copying) instead of
the current `theme add --import` workflow. This fixes use-a-theme,
author-a-theme, and the theme overview to match the import-based
workflow that getting-started and the integration guides teach:

- theme add --import + generated astryx-themes module
- theme use / theme remove for managing imported themes
- theme eject only for independent source forks
- Restores the "Migrating Earlier Theme Copies" section
- Fixes apostrophe syntax error in author-a-theme

Addresses CodeBunny review on #7141.
josephfarina added a commit that referenced this pull request Oct 8, 2026
Adds styling-overview doc (CSS setup for three paths).
Fixes theme split (#7141) to teach the import-based workflow:
theme add --import, generated astryx-themes module, theme use/remove,
theme eject for forking, and the migration section for earlier copies.
Addresses CodeBunny review on #7141.

This branch was successfully deployed

1 active deployment
Preview — 0731990e Deployed Oct 8, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant