feat(settings): add feature flag for dark mode#20179
Open
MagentaManifold wants to merge 1 commit intomainfrom
Open
feat(settings): add feature flag for dark mode#20179MagentaManifold wants to merge 1 commit intomainfrom
MagentaManifold wants to merge 1 commit intomainfrom
Conversation
MagentaManifold
commented
Mar 11, 2026
| passkeysEnabled: FEATURE_FLAGS_PASSKEYS_ENABLED, | ||
| }, | ||
| darkMode: { | ||
| enabled: DARK_MODE_ENABLED, |
Contributor
Author
There was a problem hiding this comment.
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.
4 tasks
There was a problem hiding this comment.
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-settingsconfig shape and defaults to includedarkMode.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.
packages/fxa-content-server/server/lib/routes/react-app/route-definition-index.js
Show resolved
Hide resolved
Because: * dark mode needs to be feature flagged This commit: * adds feature flag for dark mode Closes FXA-13025
10dcd1e to
ce8c86e
Compare
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.
Because
This pull request
Issue that this pull request solves
Closes: FXA-13025
Checklist
Put an
xin the boxes that applyScreenshots (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.