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

Resolve campaign settings remotely #3805

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

hyphenized
Copy link
Collaborator

@hyphenized hyphenized commented Mar 14, 2025

Implements in memory storage to override certain build time parameters. This can be used to e.g. flip a feature flag without having to make a new release. Since campaign settings are only checked during browser startup, user will need to perform another browser restart before the feature is flipped.

Testing

  • Change the JSON URL to point to some locally hosted JSON
  • Check that feature flag has flipped, e.g. network and banners show up

Latest build: extension-builds-3805 (as of Fri, 14 Mar 2025 20:33:46 GMT).

Implements in memory storage to override certain build time parameters
This can be used to flip a feature flag without having to make a new
release
@hyphenized hyphenized requested a review from Shadowfiend March 14, 2025 19:49
@hyphenized hyphenized self-assigned this Mar 14, 2025
} as const

type BuildTimeFlagType = keyof typeof BuildTimeFlag

export type RuntimeFlagType = keyof typeof RuntimeFlag

export type FeatureFlagType = RuntimeFlagType | BuildTimeFlagType
export type FeatureFlagType =
| RuntimeFlagType
Copy link
Contributor

Choose a reason for hiding this comment

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

Isn't this roughly the same as the dynamic one?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah I think restoring all the runtime flag code paths and then hooking them up to your lookup stuff is going to achieve what we're trying to do here... But I might be misremembering.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Hold on I think I got carried away with the types lol. We only need to check === "true" for boolean flags

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