Repository navigation
Conversation
🦋 Changeset detectedLatest commit: c62935a The changes in this PR will be included in the next version bump. This PR includes changesets to release 19 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
9927373 to
856f0f4
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Breaking stylesheet requirements are incorrectly marked as minor or patch releases, and a published package’s dependency update lacks the required changeset entry.
4 open issues
1 file not reviewed
pnpm-lock.yaml: Generated file
What changed in this PR
This PR adds EDS light/dark colour-scheme support to shared Framework components and the dev portal, supporting the broader Fusion dark-mode work.
Changes:
- Replaces fixed colours with EDS CSS variables in AG Grid, bookmarks, roles and portal UI.
- Adds portal stylesheet injection, system-preference synchronization and dark-only classic-token mapping, with focused tests.
- Updates documentation, changesets and dependencies for the coordinated upstream releases.
As documented in the PR, dependency publication and lockfile regeneration remain pending before full validation.
| File | Description |
|---|---|
pnpm-lock.yaml |
Removes two obsolete token dependency entries. |
packages/vite-plugins/spa/src/html/html.ts |
Adds a scheme-aware page background. |
packages/react/components/roles/src/components/required-access/RoleClaimableView.tsx |
Uses EDS border and elevation variables. |
packages/react/components/roles/src/components/compact/CompactRoleRow.tsx |
Uses scheme-aware assignment indicators. |
packages/react/components/roles/src/components/claim/RoleClaimDialog.tsx |
Migrates divider and duration colours. |
packages/react/components/roles/src/components/application/RoleAssignmentCard.tsx |
Migrates card borders. |
packages/react/components/people-resolver/package.json |
Updates the person web-component development dependency. |
packages/react/components/bookmark/src/components/shared/SharedIcon.tsx |
Migrates shared-label and icon colours. |
packages/react/components/bookmark/src/components/section/Section.tsx |
Migrates section accents. |
packages/react/components/bookmark/src/components/row/Row.tsx |
Migrates hover, border and menu-icon colours. |
packages/react/components/bookmark/src/components/messages/Message.tsx |
Uses semantic message and title colours. |
packages/react/components/bookmark/src/__tests__/Message.test.tsx |
Checks message colour-variable props. |
packages/react/components/bookmark/package.json |
Removes direct token dependencies. |
packages/react/ag-grid/README.md |
Documents scheme-aware theme customization. |
packages/modules/ag-grid/src/themes.ts |
Maps the default theme to EDS variables. |
packages/modules/ag-grid/src/AgGridConfigurator.interface.ts |
Updates theme documentation examples. |
packages/modules/ag-grid/src/__tests__/themes.test.ts |
Checks theme variables and inherited scheme. |
packages/modules/ag-grid/README.md |
Documents stylesheet setup and dark mode. |
packages/modules/ag-grid/package.json |
Removes direct token dependencies. |
packages/dev-portal/src/Router.tsx |
Adds a scheme-aware portal background. |
packages/dev-portal/src/resources/svg.ts |
Removes the fixed-colour avatar asset. |
packages/dev-portal/src/PersonSideSheet/sheets/styled.tsx |
Migrates the person-sheet accent border. |
packages/dev-portal/src/main.tsx |
Installs scheme support and removes the avatar override. |
packages/dev-portal/src/install-eds-color-scheme.ts |
Injects styles and follows system colour preferences. |
packages/dev-portal/src/install-eds-color-scheme.test.ts |
Tests injection, synchronization and colour mappings. |
packages/dev-portal/src/inline-css.d.ts |
Declares inline stylesheet imports. |
packages/dev-portal/src/HelpSideSheet/HelpSideSheet.tsx |
Uses an EDS indicator colour. |
packages/dev-portal/src/HelpSideSheet/HelpSearch.tsx |
Migrates search-result surfaces and borders. |
packages/dev-portal/src/HelpSideSheet/HelpNavigation.tsx |
Migrates navigation colours and interaction states. |
packages/dev-portal/src/HelpSideSheet/HelpHome.tsx |
Migrates help-card surfaces and borders. |
packages/dev-portal/src/HelpSideSheet/HelpFaqs.tsx |
Migrates FAQ accents and separators. |
packages/dev-portal/src/HelpSideSheet/HelpArticleView.tsx |
Migrates table borders and code backgrounds. |
packages/dev-portal/src/Header.tsx |
Adds scheme-aware header styling. |
packages/dev-portal/src/BookmarkSideSheet.tsx |
Uses an EDS bookmark indicator colour. |
packages/dev-portal/README.md |
Describes portal colour-scheme initialization. |
packages/dev-portal/package.json |
Targets upstream dark-mode releases. |
cookbooks/portal-analytics/package.json |
Updates the context-selector dependency. |
cookbooks/app-react-styling/package.json |
Updates the styles dependency. |
cookbooks/app-react-router/package.json |
Updates the markdown web component. |
cookbooks/app-react-people/package.json |
Updates React person components. |
.changeset/vite-plugin-spa_eds-page-background.md |
Records the SPA background change. |
.changeset/react-components-roles_eds-css-variables.md |
Records roles styling and host requirements. |
.changeset/react-components-bookmark_eds-css-variables.md |
Records bookmark styling and host requirements. |
.changeset/react-ag-grid_eds-theme-docs.md |
Records theme documentation updates. |
.changeset/module-ag-grid_eds-color-scheme.md |
Records theme changes and stylesheet migration. |
.changeset/dev-portal_eds-color-scheme.md |
Records portal styling and avatar changes. |
.changeset/dev-portal_eds-classic-dark-mapping.md |
Records dark-only classic-token mapping. |
.changeset/dark-mode-unreleased-deps.md |
Records coordinated dependency upgrades. |
Review effort: Balanced
Replace runtime @equinor/eds-tokens JS `tokens` usage and hard-coded colour literals with EDS CSS custom properties so the shared AG Grid theme, bookmark and role components and the dev portal (header, side sheets, help) follow the active light/dark colour scheme. Remove the dev portal's fixed-colour fallback avatar image. Refs equinor/fusion-core-tasks#2755 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
In dark mode, the dev portal declares the classic --eds_* variables that EDS 2.x components read through the tokens object, pointing them at the scheme-aware --eds-color-* variables via classicColourDeclarations() from @equinor/fusion-react-styles. Classic EDS components, including portalled menus, tooltips and dialogs, then follow dark mode without moving to EDS beta. Light mode is unchanged. Refs equinor/fusion-core-tasks#2755 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Points the dev-portal, people-resolver and cookbooks at the versions the pending dark mode changesets in fusion-react-components and fusion-web-components produce. pnpm-lock.yaml is not regenerated yet because these versions are unpublished; run pnpm install after they are released. Refs equinor/fusion-core-tasks#2755 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…hange Hosts must now load @equinor/eds-tokens/css/variables because the components have no literal colour fallbacks. Release module-ag-grid, react-ag-grid (re-exports fusionTheme) and react-components-bookmark as major, and react-components-roles as minor (pre-1.0), with migration notes. Refs equinor/fusion-core-tasks#2755 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
35ffb69 to
5fd257a
Compare
There was a problem hiding this comment.
🟡 Changes recommended
Repeated renders accumulate matchMedia listeners without cleanup, and the consumer-facing README updates lack the required docs-package patch changeset.
2 open issues
4 resolved since last review
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
Refs equinor/fusion-core-tasks#3136 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The portal discards the color-scheme installer’s cleanup function, causing repeated renders or remounts to accumulate media-query listeners and duplicate document updates.
2 open issues
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
Verify and reuse immutable loopback packages for the three source commits. Keep range alignment and prerelease pins in disposable staging and leave production dependency declarations unchanged. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Committed dependency ranges exclude the planned 3.0.0 side-sheet and errorboundary releases, preventing normal installs from receiving their dark-mode changes.
5 open issues
Align dependency ranges with planned 3.0.0 releases · New Verify the full transitive preview dependency closure · New Run changeset status against the archived source snapshot · New Prevent duplicate matchMedia listeners on reinstall and HMR Add a docs patch changeset for consumer-facing README updates
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
Check the complete upstream comparisons before allowing read-only reuse. Keep publish mode on exact live source heads and reject package-input drift. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
The preview helper runs Changesets against the live checkout rather than the selected archive, undermining reproducibility, while portal remounts accumulate media-query listeners because cleanup is discarded.
4 open issues
1 resolved since last review
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Unresolved duplicate media-query subscriptions cause repeated updates, while Changesets runs against the live checkout rather than staged source, making preview results depend on uncommitted changes.
4 open issues
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
Refs equinor/fusion-core-tasks#3136 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refs equinor/fusion-core-tasks#3136 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Refs equinor/fusion-core-tasks#3136 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because the release notes describe the upgraded styling package as forced-light, contradicting its implemented dark-mode behavior and companion mapping changeset.
1 open issue
3 resolved since last review
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
Refs equinor/fusion-core-tasks#3136 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
Human assessment is needed because the documented --reuse preview command conflicts with the helper’s source checks and aborts before handoff verification.
1 open issue
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
Refs equinor/fusion-core-tasks#3136 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🔵 Needs a closer look
A maintainer must resolve Roles’ errorboundary 2.x/3.x peer-support contract, and the final public dependency graph still needs frozen-install, build, and browser validation beyond staging-only snapshots.
1 open issue
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
Keep Roles compatible with errorboundary 2.x and 3.x. Validate the committed dependency ranges before applying snapshot overrides. Refs equinor/fusion-core-tasks#3136 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
🟡 Changes recommended
Explicit host color-scheme selections should remain in effect, but mounting the portal on a dark OS overwrites data-color-scheme="light", and later system-preference changes overwrite selections made after mounting. An explicit Light choice therefore does not reliably stay light.
1 open issue
1 resolved since last review
1 file not reviewed
pnpm-lock.yaml: Generated file
Review effort: Balanced
Follow system preference only while the portal owns the document scheme. An explicit host write opts out, and removing the attribute opts back in. Refs equinor/fusion-core-tasks#3136 Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>


Why is this change needed?
This is the framework part of the dark mode rollout described in equinor/fusion-core-tasks discussion 2755. The
@equinor/eds-tokensJStokensobject and hard-coded hex values resolve to fixed light colours, so framework components can't follow a dark colour scheme.Part of equinor/fusion-core-tasks#3136 (feature equinor/fusion-core-tasks#3133).
What is the current behavior?
fusionTheme), the bookmark and roles components, and the dev portal read colours from the JStokensobject or from literal hex values.prefers-color-scheme.What is the new behavior?
fusionThemeuses EDS variables for the grid surface, floating menus, accent, text and borders.@equinor/eds-tokensis no longer a runtime dependency.tokensand hex literals, with no literal fallbacks.installEdsColorSchemeinstalls the EDS variables and uses the sharedclassicColourSchemeStyles()from@equinor/fusion-react-styles; there is no separate Framework palette. It followsprefers-color-schemeunless the host explicitly setsdata-color-schemeon<html>, before or after mounting. Removing the attribute restores system mode. Remounts reuse the document's subscription. The dark page uses--eds-color-bg-neutral-canvas, the header and panels use--eds-color-bg-neutral-surface, and the light page keeps its neutral surface. The header, help and person side sheets use EDS variables. WithfallbackImageremoved, a missing avatar shows the themedfwc-skeletonplaceholder.What is the intended behavior or invariant?
--eds_*mapping applies only under the dark scheme. It applies under[data-color-scheme="dark"], and underprefers-color-scheme: darkwhen nodata-color-scheme="light"is set.@equinor/eds-tokens/css/variables(EDS 2.x). The dev portal does this itself.Does this PR introduce a breaking change?
Yes. Hosts must load
@equinor/eds-tokens/css/variables, because the AG Grid theme, bookmark and roles components no longer have literal colour fallbacks. Without the stylesheet they lose their colours.@equinor/eds-tokensis no longer a peer dependency ofmodule-ag-gridorreact-components-bookmark. The dev portal already loads the stylesheet.Migration: add
@equinor/eds-tokens(^2.0.0) to the host and import@equinor/eds-tokens/css/variablesonce at the app or portal entry point. The changesets carry the same notes.Impact assessment:
module-ag-gridreact-ag-gridfusionTheme)react-components-bookmarkreact-components-rolesdev-portal,vite-plugin-spa,fusion-framework-docscookbook-app-react-router,cookbook-app-react-styling,cookbook-app-react-people,portal-analyticsDownstream, fusion-portal and fusion-core-apps can consume these packages after the Framework release. This PR does not publish them.
Review guidance:
fusionTheme,installEdsColorSchemeand the selector scoping inclassicColourSchemeStyles().Additional context
The lockfile uses stable packages from equinor/fusion-react-components#3514 and equinor/fusion-web-components#2551:
fusion-react-side-sheet,fusion-react-errorboundary,fusion-react-styles,fusion-react-context-selectorat 3.0.0;fusion-wc-chip2.0.0 andfusion-wc-person4.0.0^3.0.0; peer^2.0.0or^3.0.0^3.0.0; router usesfusion-wc-markdown2.0.0fusion-react-person3.0.0,fusion-react-styles3.0.0 andfusion-wc-person4.0.0 respectivelyThe installed React styles package resolves
fusion-web-theme0.2.0; Web person resolves its compatible 0.1.12 version. There are no preview tarballs, loopback registry entries or absolute local paths in the committed lockfile.Public release validation: a clean frozen public install and both errorboundary major-version checks passed at
7b03c2765. The full tests/build/lint and the dev-portal type-check passed again with the host-override fix atc62935af2.Commands and outcomes
pnpm install --lockfile-only --no-frozen-lockfile --registry=https://registry.npmjs.org/pnpm install --frozen-lockfile --registry=https://registry.npmjs.org/node_modules; lockfile hash unchanged.pnpm buildpnpm testpnpm lintandpnpm -w checkpnpm --filter @equinor/fusion-framework-dev-portal exec tsc --noEmit/adapterssubpath.pnpm --filter @equinor/fusion-framework-dev-portal exec vitest run --config vitest.config.tspnpm buildthenpnpm exec vitest run --config vitest.config.ts src/components/required-access/AccessRoleBoundary.test.tsx src/context/RolesProvider.lifecycle.test.tsxin the Roles packagenode --test .github/scripts/dark-mode-preview.test.mjspnpm exec changeset status --output=<release-plan.json>andgit diff --checkHost override regression: the same Chromium fixture sets Light on
<html>before installing the portal colour scheme on a dark system. The previous installer replaced it with Dark; the corrected one preserves Light.7b03c2765)c62935af2)Palette comparison: the earlier Chromium comparison used React
9471ee3band Web090f40d9Verdaccio inputs. It measured 11.78:1 contrast for header and grid text and 8.45:1 for the filter label. The page backdrop matched stock EDS in light and explicit Light on a dark OS. These are historical preview screenshots, not new public-install captures.9471ee3bEarlier local Verdaccio evidence
Before the palette update, six qualified packages were built and published to localhost only; 54 build tasks and six portal browser tests passed. A clean
pnpm install --ignore-scriptschecked the CLI → dev-portal, dev-server → SPA and React Grid → module Grid dependency paths. The helper reproduced all six digests and verified the handoff without writes after tooling-only changes. For the later palette comparison, scoped portal and grid suites passed (68 and 21 tests respectively), as did the portal Vite build, scoped Fusion/Biome checks andgit diff --check. Normal public-install results are reported separately above.Related issues
Part of equinor/fusion-core-tasks#3136; feature equinor/fusion-core-tasks#3133. Background: https://github.com/equinor/fusion-core-tasks/discussions/2755.
Checklist