Skip to content

docs(storybook): document Storybook 9+ parameters and supported versions - #255

Merged
gregberge merged 1 commit into
mainfrom
greg/storybook-11-compat
Sep 13, 2026
Merged

gregberge merged 1 commit into
mainfrom
greg/storybook-11-compat

Conversation

@gregberge

Copy link
Copy Markdown
Member

Companion to argos-ci/argos-javascript#381, which makes @argos-ci/storybook compatible with Storybook 11 and teaches it the Storybook 9+ viewport format. The pages still described the Storybook 8 parameter shapes, which the SDK only kept for backwards compatibility.

What changed

  • learn/how-to-guides/visual-coverage/storybook-story-modes.md — the setup section now says viewports and backgrounds are built into Storybook 9+ (the addon packages are for Storybook 8), the preview.ts example uses viewport.options and backgrounds.options, and the modes select a background by key (backgrounds: { value: "dark" }) instead of by color. A hint keeps the Storybook 8 format for readers still on 8. A new paragraph after the modes example explains what a mode's viewport resolves to and that Storybook's { value, isRotated } form works too. The FAQ entry on addons drops the viewport/backgrounds addon links accordingly.
  • sdks-reference/storybook.md — a Compatibility section (Storybook 8 through 11 including the 11 pre-releases, Vitest 4 or 5, Node.js 22; the Vitest addon needs Storybook 9+, the Test Runner works from 8) and a Viewports section describing how the viewport global is resolved: a key of viewport.options (or viewport.viewports on 8), Storybook's { value, isRotated } object, or a bare number used as the width.
  • quickstart/storybook-quickstart/README.md — the prerequisite moves from Storybook v8+ to v9+, since @storybook/addon-vitest only exists from 9 (the Test Runner quickstart keeps v8+).

No SUMMARY.md change — no page was added. All GitBook block tags verified balanced.

Not changed, worth a look

The modes guide shows { disable: true } to turn off an inherited mode, but the SDK currently checks disabled (packages/storybook/src/utils/screenshot.ts, and its fixture stories use disabled: true). Chromatic uses disable. I left the page as is; the SDK should probably accept both, which would be a one-line follow-up in argos-javascript.

🤖 Generated with Claude Code

Companion to argos-ci/argos-javascript#381, which makes @argos-ci/storybook
resolve viewports from the Storybook 9+ `viewport.options` parameter and the
`{ value, isRotated }` global.

- Story modes guide: viewports and backgrounds are built into Storybook 9+
  and configured through `options` maps, and a mode selects a background by
  key. A hint keeps the Storybook 8 format (`viewports`, `values`, color as
  value) for readers still on 8.
- SDK reference: a Compatibility section (Storybook 8 through 11, Vitest 4
  or 5, Node.js 22) and a Viewports section describing how a mode's or a
  story's `viewport` global is resolved.
- Storybook Quickstart: the Vitest addon requires Storybook 9 or later.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@gregberge
gregberge merged commit d63e928 into main Sep 13, 2026
2 checks passed
@gregberge
gregberge deleted the greg/storybook-11-compat branch September 13, 2026 11:18
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