Skip to content

Surface variable modes in the Storybook toolbar #636

Description

@nathanacurtis

Problem

Split out of #609, which bundled a page with a host feature. This is the host feature.

Variable modes are emitted and never exercised. In the sealed run described on #574, the library defined Light and Dark and all 138 snapshots were taken in Light — half the library's surface went unrendered and unverified.

Scope

  • Toolbar globals built from the emitted modes manifest, one control per collection.
  • Selecting a mode sets the corresponding attribute on the document root, which the emitted custom-properties stylesheet already keys off.
  • Works for component stories and foundations pages alike.

Notes

Acceptance criteria

  • A toolbar control per emitted collection, populated from the modes manifest rather than hardcoded.
  • Switching a mode re-renders the current story against that mode.
  • A library with a single mode produces no empty control.
  • Document the complete reference Storybook host #607's documented host includes the configuration.

Case data

  • Territory: cli
  • Size: s
  • Wave: 2

Activity

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

Metadata

Metadata

Assignees

Labels

clispecs-cli commandsdocsDocumentation that appears on specsplugin.com

Type

No type

Fields

Priority

None yet

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions