Skip to content

chore: update Storybook to 10 - #1357

Merged
dangreen merged 3 commits into
masterfrom
chore/storybook
Nov 30, 2026
Merged

dangreen merged 3 commits into
masterfrom
chore/storybook

Conversation

@dangreen

@dangreen dangreen commented Nov 30, 2026 •

Copy link
Copy Markdown
Collaborator

Part 4 of the tooling stack. Based on #1356.

What

  • Storybook 8.4 → 10.6. Actions and controls are part of the core now, so @storybook/addon-actions, addon-controls, client-logger, manager-api, preview-api, theming and @storybook/react are gone; storybook (with storybook/actions, storybook/manager-api, storybook/theming), @storybook/react-vite and @storybook/addon-docs remain.
  • Config is ESM TypeScript (.storybook/main.ts, preview.ts, manager.ts); the CommonJS package.json override in .storybook is removed. The sandboxes still run on the sources through an alias.
  • Scripts are named as in nano_kit: storybook and storybook:build (CI updated).
  • Stories are written in typed CSF3 (satisfies Meta<typeof Component>, StoryObj) and are type-checked by test:types, so a change of the component types that breaks real usage fails CI. Hooks live in named render functions; the click events story logs through action().
  • The decimation story generates its 100 000 points when it renders instead of when Storybook loads the stories file.
  • chartjs-plugin-zoom 2 → 3 for its ESM types (the stories register it).
  • tsconfig.json maps react-chartjs-2 to src: stories import the sandboxes, which import the package by name, and CI does not install the sandboxes here. chore: install the sandboxes from the root workspace #1358 drops the mapping once the workspace links the package.

Checked locally

  • pnpm storybook:build; then every one of the 21 stories was opened in headless Chrome: each renders a canvas with a painted chart and logs no errors.
  • pnpm test:types, pnpm test:unit, pnpm lint.

Stack

  1. chore: agent skills and notes (chore: add agent skills lock and agent notes #1354)
  2. ci: Node.js 26, pnpm 12 and workflows (ci: update Node.js, pnpm and workflows #1355)
  3. build: Vite and Vitest (build: build and test with Vite #1356)
  4. chore: Storybook 10 ← this PR
  5. chore: sandboxes in the root workspace (chore: install the sandboxes from the root workspace #1358)
  6. chore: lint with oxlint (chore: lint with oxlint #1359)
  7. chore(deps): update dependencies (chore(deps): update dependencies #1360)
  8. docs: move the website to Starlight (docs: move the website to Starlight #1361)
  9. build!: drop the CommonJS build (build!: drop the CommonJS build #1362)

🤖 Generated with Claude Code

@codecov

codecov Bot commented Nov 30, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 93.75%. Comparing base (e74b0d8) to head (7a88f82).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1357   +/-   ##
=======================================
  Coverage   93.75%   93.75%           
=======================================
  Files           3        3           
  Lines          80       80           
  Branches       20       20           
=======================================
  Hits           75       75           
  Misses          3        3           
  Partials        2        2           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@dangreen
dangreen added this pull request to stack #1363 November 30, 2026 15:01
@dangreen
dangreen force-pushed the chore/storybook branch 2 times, most recently from 53c0b7b to b0d23ec Compare November 30, 2026 15:32
Base automatically changed from build/vite to master November 30, 2026 15:35
Addons that moved into the core are dropped, the config is ESM TypeScript, and the scripts are named as in the other Trigen repositories: storybook and storybook:build. chartjs-plugin-zoom 3 ships ESM types that the stories need.
Stories are type-checked with the rest of the code now, so a change of the component types that breaks a usage shows up in test:types.
Stories import the sandboxes, which import react-chartjs-2 by name: without an install of the sandboxes, as in CI, tsc maps the name to the sources.
@dangreen
dangreen marked this pull request as ready for review November 30, 2026 15:41
@dangreen
dangreen merged commit 97f8ab5 into master Nov 30, 2026
11 checks passed
@dangreen
dangreen deleted the chore/storybook branch November 30, 2026 15:42
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.

1 participant