Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Expose dark-mode-apps switch on client side #26733

Merged
merged 3 commits into from
Dec 1, 2023

Conversation

georgeblahblah
Copy link
Contributor

Only switches with exposeClientSide=true are passed to DCR.

val switches: Map[String, Boolean] = conf.switches.Switches.all
.filter(_.exposeClientSide)
.foldLeft(Map.empty[String, Boolean])((acc, switch) => {
acc + (CamelCase.fromHyphenated(switch.name) -> switch.isSwitchedOn)
})

Only switches with `exposeClientSide=true` are passed to DCR.
@georgeblahblah georgeblahblah requested a review from a team as a code owner December 1, 2023 11:16
Copy link
Contributor

@mxdvl mxdvl left a comment

Choose a reason for hiding this comment

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

A good ol’ gotcha!

@cemms1
Copy link
Contributor

cemms1 commented Dec 1, 2023

I didn't know this! But I was wondering why switches weren't pulling through as expected locally 😄

@georgeblahblah
Copy link
Contributor Author

I'll also take this opportunity to rename the switch in Frontend.

We've referred to it as darkModeInApps in DCR, but it's coming through as darkModeApps.

@georgeblahblah georgeblahblah merged commit a06fec0 into main Dec 1, 2023
2 checks passed
@georgeblahblah georgeblahblah deleted the gb/expose-darkmode-switch-dcr branch December 1, 2023 14:45
@prout-bot
Copy link
Collaborator

Seen on ADMIN-PROD (merged by @georgeblahblah 11 minutes and 28 seconds ago)

@prout-bot
Copy link
Collaborator

Seen on FRONTS-PROD (merged by @georgeblahblah 12 minutes and 34 seconds ago)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants