Skip to content

docs(storybook-spec): add concrete colorScheme companion decorator gu… - #158

Merged
miguelramos merged 2 commits into
nextfrom
chore/line-ui-p3v-47-colorscheme-decorator-guidance
Mar 20, 2026
Merged

docs(storybook-spec): add concrete colorScheme companion decorator gu…#158
miguelramos merged 2 commits into
nextfrom
chore/line-ui-p3v-47-colorscheme-decorator-guidance

Conversation

@miguelramos

Copy link
Copy Markdown
Member

…idance

The withThemeByClassName decorator from @storybook/addon-themes only toggles CSS classes — it has no mechanism for setting inline styles. This left a gap where the spec said "should also set style.colorScheme" without explaining how.

Add a companion decorator to the preview.ts code sample that syncs style.colorScheme based on the .dark class presence. Replace vague "should also set" prose in sections 4.2 and 7.1 with concrete cross-references to the new code sample.

…idance

The withThemeByClassName decorator from @storybook/addon-themes only
toggles CSS classes — it has no mechanism for setting inline styles.
This left a gap where the spec said "should also set style.colorScheme"
without explaining how.

Add a companion decorator to the preview.ts code sample that syncs
style.colorScheme based on the .dark class presence. Replace vague
"should also set" prose in sections 4.2 and 7.1 with concrete
cross-references to the new code sample.
@miguelramos miguelramos self-assigned this Mar 20, 2026
@miguelramos miguelramos added 📚 TYPE: Docs Documentation work ✨ TYPE: Feature New feature or capability labels Mar 20, 2026
@changeset-bot

changeset-bot Bot commented Mar 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: c6d2117

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

…ment

Storybook executes decorators first-to-last (each wraps the next),
not bottom-to-top as previously stated. The companion decorator
behavior was correct but the explanation could mislead implementors.
@miguelramos
miguelramos merged commit c1f5b3d into next Mar 20, 2026
1 check passed
@miguelramos
miguelramos deleted the chore/line-ui-p3v-47-colorscheme-decorator-guidance branch March 20, 2026 12:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 TYPE: Docs Documentation work ✨ TYPE: Feature New feature or capability

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant