From e6e7f534f34b7234c77902afcf2a280a4f32cfb3 Mon Sep 17 00:00:00 2001 From: Alban Bailly Date: Wed, 6 Mar 2024 13:30:56 -0500 Subject: [PATCH] Feedback --- docs/development-guide/11-feature-flags.md | 7 +++++++ packages/manager/src/dev-tools/FeatureFlagTool.tsx | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/docs/development-guide/11-feature-flags.md b/docs/development-guide/11-feature-flags.md index 2a973c3ae87..d38c468b12f 100644 --- a/docs/development-guide/11-feature-flags.md +++ b/docs/development-guide/11-feature-flags.md @@ -20,6 +20,13 @@ We often need to control more than one setting for a given feature. For instance } ``` +Feature flags variations should also be labelled as clearly as possible to avoid confusion for a potential third party managing the flag you created. +For instance, for the example above, the variations could be labelled: + +- Variation 1: Feature ON, Beta ON +- Variation 2: Feature ON, Beta OFF +- Variation 3: Everything OFF + ## Creating a feature flag Feature flags are created in the LaunchDarkly dashboard. Give your flag a name (like "Images Pricing Banner") and key (like "imagesPricingBanner") and select the flag type (boolean, etc). Configure the desired variations and targeting options. diff --git a/packages/manager/src/dev-tools/FeatureFlagTool.tsx b/packages/manager/src/dev-tools/FeatureFlagTool.tsx index bd8d612f965..fa08c1c2cc8 100644 --- a/packages/manager/src/dev-tools/FeatureFlagTool.tsx +++ b/packages/manager/src/dev-tools/FeatureFlagTool.tsx @@ -12,10 +12,10 @@ import { getStorage, setStorage } from 'src/utilities/storage'; const MOCK_FEATURE_FLAGS_STORAGE_KEY = 'devTools/mock-feature-flags'; /** - * Our flags can be either a boolean or an JSON object + * Our flags can be either a boolean or a JSON object * In the case of JSON Objects, the `enabled` key will be used to control flag. - * It is required to have the `enabled` key if using a JSON object for on/off Featured flags. - * This requirement is both documented here and in our Docs since we don't have a way to enforce types from Launch Darkly objects. . + * It is required to have the `enabled` key if using a JSON object for on/off featured flags. + * This requirement is both documented here and in our Docs since we don't have a way to enforce types from Launch Darkly objects. */ const options: { flag: keyof Flags; label: string }[] = [ { flag: 'aclb', label: 'ACLB' },