Conversation
Keep Storybook preview and manager light through initial and live OS preference changes without changing shared providers. Related to equinor/fusion-core-tasks#2120. Co-authored-by: Copilot App <[email protected]>
|
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Component Development
Type
Reference to assignment
Related to equinor/fusion-core-tasks#2120, Storybook portion only. Other runtime surfaces are handled separately. This is a nonclosing reference; legacy work remains unresolved.
Description of assignment
Temporarily keep normal Storybook UI using EDS CSS variables and native browser controls light, both at initial light/dark OS/browser preferences and when preferences change live. Do not add dark-mode support or change reusable component/provider defaults.
Description of Proposed Changes
only lightscheme synchronously instorybook/.storybook/preview-head.html, before stories render. Cover Docs canvases and body-portaled content without changingThemeProvider.storybook/.storybook/manager-head.htmlto keep native manager controls light alongside its existing light Storybook theme. Target manager descendants because Storybook's layout and popovers explicitly restorelight darkbelow the root. The selector outranks their generated class rules without!importantand cannot affect the preview iframe.storybook/.storybook/light-mode.test.mjs, wire them throughstorybook/package.json, and document the temporary policy and verification procedure inCONTRIBUTING.md.Preserve explicit nested dark specimens. Do not change SideSheet or any reusable library.
Changeset: N/A — user-approved private-only exemption (2026-09-30). The user explicitly selected “Exempt the private-only Storybook PR (Recommended)” after reviewing the release-planner evidence. The only affected package is
@equinor/fusion-react-components-stories(storybook/package.json,private: true); contributor documentation is also updated. Existing Changesets configuration defaults toprivatePackages.version: false, and the installed release planner returns no releases for a private Storybook patch entry. Such an entry would be inert. Do not change the repository's private-versioning policy, bump untouched public libraries, or add an empty/inert changeset. No package version bump is included.Validation completed in the dedicated worktree:
bun install --frozen-lockfilebun run buildbun run --cwd storybook testbun run storybook:build --disable-telemetrygit diff --checkbun run check -- storybook/.storybook/light-mode.test.mjsnode /Users/christian.frene/.copilot/session-state/490877d1-0c04-4928-851e-8d83283486ea/files/storybook-browser.mjsAutomated browser evidence covers initial light/dark preferences and live transitions on a textarea story and Docs canvas, manager controls, native/shadow-DOM controls, and an existing body-portaled EDS tooltip. The EDS input token stays
#f5f5f5; removing the root selector under dark preference reproduces#0b0b0b. An explicit nested dark specimen remains dark.Local evidence is retained in
/Users/christian.frene/.copilot/session-state/490877d1-0c04-4928-851e-8d83283486ea/files/, includingstorybook-browser.json, build logs, and light/dark screenshots. The dependency-free browser harness is a local artifact rather than new repository tooling. Browser coverage is Chromium-only against development Storybook; the production build was checked separately.User-reported manual acceptance (2026-09-30):
The user checked http://127.0.0.1:46123/?path=/story/data-textarea--basic and http://127.0.0.1:46123/?path=/docs/data-textarea--docs. Contents, textarea, and surrounding Storybook controls stayed light after light/dark reloads and live switching. This is a pass for those checked routes and surfaces only, not every story. It is separate from the automated browser/probe results above; no user browser/version or manual portal-specimen check was reported. The report is retained in the local
manual-evidence.mdartifact.Checklist
Create User Story(DevOps) or Issue(Github)
No new visual design is introduced; the change preserves the existing light appearance.
Development
Reuse existing stories rather than add a new component or story. Local verification screenshots are retained, but no snapshot baselines are added. Biome excludes Storybook; see the validation result above.
Create Pull Request
Create a ready-for-review PR under the user's explicit authorization. Leave assignees unset; no reviewer assignment, merge, deployment, or issue closure is part of this change.
Review of Pull Request
Publish Code
Version increment: N/A under the explicit user-approved private-only changeset exemption above.