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

Way of setting feature flag without resetting existing feature flags. #54

Open
jamesstonehill opened this issue May 5, 2017 · 1 comment

Comments

@jamesstonehill
Copy link

jamesstonehill commented May 5, 2017

It would be really good if you could set feature flags in bulk without resetting the existing flags like setup does. Something like:

features.merge({
  "new-billing-plans": true,
  "new-homepage": false
});

The reason why I want to do this is because there are specific feature flags I need to set in the config file, and there are other flags that I need to set during runtime, because they depend on things like who the user is. However, there is no way to succinctly set a bunch of variables at runtime without overwriting the ones that have already been set.

P.S. It might also be worth stating in the README that setup resets all flags that have been currently set. This wasn't immediately obvious.

@walter
Copy link

walter commented Mar 7, 2018

I have a similar need. I want to set default values for flags and then when user logs in, only overwrite flag values returned from the server rather than entire set. Perhaps unusually I need most of my flags to be enabled by default.

Since the setup code is pretty simple to emulate, it's not a big deal to roll my own that handles this use case. Just adding another data point.

Thanks for the work on the add-on, Katie and other contributors.

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

No branches or pull requests

2 participants