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