Skip to content

feat(settings): add feature flag for dark mode#20179

Open
MagentaManifold wants to merge 1 commit intomainfrom
FXA-13025
Open

feat(settings): add feature flag for dark mode#20179
MagentaManifold wants to merge 1 commit intomainfrom
FXA-13025

Conversation

@MagentaManifold
Copy link
Contributor

Because

  • dark mode needs to be feature flagged

This pull request

  • adds feature flag for dark mode

Issue that this pull request solves

Closes: FXA-13025

Checklist

Put an x in the boxes that apply

  • My commit is GPG signed.
  • If applicable, I have modified or added tests which pass locally.
  • I have added necessary documentation (if appropriate).
  • I have verified that my changes render correctly in RTL (if appropriate).

Screenshots (Optional)

Please attach the screenshots of the changes made in case of change in user interface.

Other information (Optional)

Any other information that is important to this pull request.

@MagentaManifold MagentaManifold requested a review from a team as a code owner March 11, 2026 20:57
passkeysEnabled: FEATURE_FLAGS_PASSKEYS_ENABLED,
},
darkMode: {
enabled: DARK_MODE_ENABLED,
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I put it in its own object instead of in the featureFlags object, because I foresee that we will need at least one more config for it in the future, for setting whether to default to the light theme or to follow system's theme.

Copy link

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds a new configuration-driven feature gate for dark mode and wires it through both the Settings client config model and the Content Server’s injected frontend config.

Changes:

  • Extend fxa-settings config shape and defaults to include darkMode.enabled.
  • Add a new Convict config entry (darkMode.enabled) in Content Server and expose it to the React app config payload.
  • Update local dev config template to include the new setting.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
packages/fxa-settings/src/lib/config.ts Adds darkMode to the Settings config interface and default config.
packages/fxa-content-server/server/lib/routes/react-app/route-definition-index.js Exposes darkMode.enabled to the React app config payload.
packages/fxa-content-server/server/lib/configuration.js Defines darkMode.enabled in the Convict schema (env: DARK_MODE_ENABLED).
packages/fxa-content-server/server/lib/beta-settings.js Exposes darkMode.enabled in the Settings config injected into Settings HTML.
packages/fxa-content-server/server/config/local.json-dist Adds a local dev example for enabling dark mode.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Because:

* dark mode needs to be feature flagged

This commit:

* adds feature flag for dark mode

Closes FXA-13025
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