Skip to content

Commit

Permalink
Feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
abailly-akamai committed Mar 6, 2024
1 parent 3b5c4eb commit e6e7f53
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
7 changes: 7 additions & 0 deletions docs/development-guide/11-feature-flags.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions packages/manager/src/dev-tools/FeatureFlagTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down

0 comments on commit e6e7f53

Please sign in to comment.