Skip to content

chore(s2): split S2 Storybook into demo and dev - #972

Merged
c-lamoureux merged 30 commits into
mainfrom
chore/s2-storybook-demo-dev-split
Oct 7, 2026
Merged

c-lamoureux merged 30 commits into
mainfrom
chore/s2-storybook-demo-dev-split

Conversation

@c-lamoureux

Copy link
Copy Markdown
Contributor

Splits the S2 Storybook into a polished demo Storybook and a dev Storybook for internal testing.

Description

  • Demo (yarn storybook:s2, port 6010; yarn build:storybook:s2, which the S2 Storybook publish workflow uses) loads only packages/react-spectrum-charts-s2/src/stories/**. Stories were curated to one representative story per feature with realistic data, no debug UI and no UNSAFE_/unstable_ APIs. Axis, Legend, Bar, Line, Chart, Popover and Action Bar stories are grouped into folders.
  • Dev (yarn storybook:s2:dev, port 6011; yarn build:storybook:s2:dev, new .storybook-s2-dev config) loads the demo stories plus src/dev/<Chart>/<Folder>/:
    • Playground: one story per chart/component with broad controls, children and interactions.
    • Performance: animation, large-data and stress stories.
    • Dashboards: variation dashboards (the Donut dashboard is unhidden here).
    • Regressions: real bug reproductions. Each sets parameters.regression = { description, pr }, which the dev preview shows above the story.
    • Coverage: test-specific and feature-coverage stories, including former demo variants.
  • Story data and helpers used by both live in storyShared. Dev story tests sit next to the dev stories, and S2 tests no longer depend on demo story args.
  • PR checks build both Storybooks.
  • CLAUDE.md documents the split and where new stories go.

How Has This Been Tested?

  • yarn lint, yarn tsc and the full test suite (314 suites / 4,646 tests) pass.
  • yarn build:storybook:s2 and yarn build:storybook:s2:dev both succeed.

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

@c-lamoureux
c-lamoureux force-pushed the chore/s2-storybook-demo-dev-split branch from 930e14e to deb7e7c Compare October 6, 2026 21:25
@c-lamoureux
c-lamoureux force-pushed the chore/s2-storybook-demo-dev-split branch from deb7e7c to 0ea44bc Compare October 7, 2026 16:06
c-lamoureux and others added 27 commits October 7, 2026 10:22
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Handlers folders

Apply Axis Storybook review feedback: remove ReferenceLine position/size,
currencyCode and tick-count stories; clarify Y/X axis stories; free-text
numberFormat; per-orientation position controls; wider bars for subLabels;
labelLimit on a horizontal bar; labelFormat 'time' option.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…ries into folders

Callback stories move to an Action Handlers folder per component; props are
grouped into Labels, Series Visibility, Symbols, Spacing, Styling, Points,
Series, Animation, Highlight, Size and Encodings folders.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…oryShared

Dev stories no longer import from the demo stories tree.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Playgrounds passed undefined for both, overriding Chart's defaults and
crashing on render. Adds a smoke test that renders every playground.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…n stories

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
…Coverage folders

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@c-lamoureux
c-lamoureux force-pushed the chore/s2-storybook-demo-dev-split branch from 0ea44bc to 9aa8431 Compare October 7, 2026 16:34
…labels

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
madelineluke
madelineluke previously approved these changes Oct 7, 2026
…ayground dataPreset options

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@sonarqubecloud

sonarqubecloud Bot commented Oct 7, 2026

Copy link
Copy Markdown

@github-actions

github-actions Bot commented Oct 7, 2026

Copy link
Copy Markdown
Contributor

@c-lamoureux
c-lamoureux merged commit 1f395e4 into main Oct 7, 2026
7 checks passed
@c-lamoureux
c-lamoureux deleted the chore/s2-storybook-demo-dev-split branch October 7, 2026 19:22
c-lamoureux added a commit that referenced this pull request Oct 7, 2026
Brings in #967, #970 and #972. Story files moved by #972 take main's
version with imports rewritten to core-s2 subpaths and fully specified
.js extensions (scripts/addRelativeImportExtensions.mjs). Ports #970's
donut constants into core-s2 and excludes the new dev/ and storyShared/
story folders from the S2 declaration build.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants