Open-Assistant icon indicating copy to clipboard operation
Open-Assistant copied to clipboard

Setup feature flags for website

Open fozziethebeat opened this issue 2 years ago • 3 comments

As we're developing more features that might not be complete-able within a single PR, we might benefit from adopting some kind of feature flag system where by the feature requires some URL parameter to activate.

this blog post lists a few ways this could be done. Ideally we pick a solution that we can run and maintain ourselves without adding too much complexity. That means no external services like Flagship. react-feature-flags might be the best choice but this requires a bit of investigation.

fozziethebeat avatar Jan 02 '23 07:01 fozziethebeat

I would argue that feature flags should be also available on the level of nextjs and then propagated to react, I could imagine cases where the api should behave differently depending on flags

unfortunately, most libs I find rfer to Saas with dynamic flag management, which is not something that we need.

for react-feature-flags, maybe we can use getStaticProps to have flags available on both sides? it worries me a bit that react-feature-flags had last update 5 years ago...

AbdBarho avatar Jan 02 '23 08:01 AbdBarho

Yeah, i'm not happy with the general state of things depending on some SaaS product. Neither NextJS nor RedwoodJS have default support for feature flags which feels like a major missing feature.

The age of react-feature-flags is problematic too tho it does look remarkably simple.

fozziethebeat avatar Jan 02 '23 08:01 fozziethebeat

Since we're getting more and more web features in and some are moving faster than backend, I'm going to test out react-feature-flags and make sure it integrates well. That'll be a good enough solution for the time being since we mostly want to feature flag component rendering more than anything else.

fozziethebeat avatar Jan 05 '23 00:01 fozziethebeat