Skip to content

Commit d373e28

Browse files
committed
Describe regular setting path
1 parent 8b0257d commit d373e28

1 file changed

Lines changed: 24 additions & 3 deletions

File tree

‎docs/feature-flags.md‎

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,8 @@ When starting work on a feature, we should create a matching feature flag:
6060
With these steps completed, the feature is disabled by default, but can be
6161
enabled on develop by interested users for testing.
6262

63-
Different features may have different deployment plans for when to enable where. The
64-
following lists a few common options.
63+
Different features may have different deployment plans for when to enable where.
64+
The following lists a few common options.
6565

6666
## Enabling by default on develop
6767

@@ -75,7 +75,8 @@ Set the feature to `enable` in the [develop config](https://github.com/vector-im
7575

7676
## Enabling by default on staging and app
7777

78-
Set the feature to `enable` in the [app config](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json).
78+
Set the feature to `enable` in the [app
79+
config](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json).
7980

8081
## Feature deployed successfully
8182

@@ -89,3 +90,23 @@ Once we're confident that a feature is working well, we should remove the flag:
8990
and [app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json)
9091
configs
9192
5. Celebrate! 🥳
93+
94+
## Convert to a regular setting (optional)
95+
96+
Sometimes we decide a feature should always be user-controllable as a setting
97+
even after it has been fully deployed. In that case, we would craft a new,
98+
regular setting:
99+
100+
1. Remove the feature flag from
101+
[settings](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.js)
102+
and add a regular setting with the appropriate levels for your feature
103+
2. Replace the `isFeatureEnabled` lines with `getValue` or similar calls
104+
according to the [settings
105+
docs](https://github.com/matrix-org/matrix-react-sdk/blob/develop/docs/settings.md)
106+
(checking carefully, as we may want a different mix of code paths when the
107+
feature is always present but gated by a setting)
108+
3. Remove the feature from the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md)
109+
4. Remove feature state from
110+
[develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json)
111+
and [app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json)
112+
configs

0 commit comments

Comments
 (0)