From d373e2891ecbbbaddcad2e5b55666ad69bd2a3ad Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Fri, 8 Nov 2019 15:57:46 +0000 Subject: [PATCH] Describe regular setting path --- docs/feature-flags.md | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/docs/feature-flags.md b/docs/feature-flags.md index 26b9333066..8d31afec10 100644 --- a/docs/feature-flags.md +++ b/docs/feature-flags.md @@ -60,8 +60,8 @@ When starting work on a feature, we should create a matching feature flag: With these steps completed, the feature is disabled by default, but can be enabled on develop by interested users for testing. -Different features may have different deployment plans for when to enable where. The -following lists a few common options. +Different features may have different deployment plans for when to enable where. +The following lists a few common options. ## Enabling by default on develop @@ -75,7 +75,8 @@ Set the feature to `enable` in the [develop config](https://github.com/vector-im ## Enabling by default on staging and app -Set the feature to `enable` in the [app config](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json). +Set the feature to `enable` in the [app +config](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json). ## Feature deployed successfully @@ -89,3 +90,23 @@ Once we're confident that a feature is working well, we should remove the flag: and [app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json) configs 5. Celebrate! 🥳 + +## Convert to a regular setting (optional) + +Sometimes we decide a feature should always be user-controllable as a setting +even after it has been fully deployed. In that case, we would craft a new, +regular setting: + +1. Remove the feature flag from + [settings](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.js) + and add a regular setting with the appropriate levels for your feature +2. Replace the `isFeatureEnabled` lines with `getValue` or similar calls + according to the [settings + docs](https://github.com/matrix-org/matrix-react-sdk/blob/develop/docs/settings.md) + (checking carefully, as we may want a different mix of code paths when the + feature is always present but gated by a setting) +3. Remove the feature from the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md) +4. Remove feature state from + [develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json) + and [app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json) + configs