From 1832e1c9b424dbd5d80688d7e3120135a03f5277 Mon Sep 17 00:00:00 2001 From: AMER JUSUPOVIC Date: Wed, 18 Oct 2023 16:50:52 -0700 Subject: [PATCH 1/2] add edits for variants --- README.md | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index f26c87c6..478bdb9a 100644 --- a/README.md +++ b/README.md @@ -777,6 +777,9 @@ Allocation logic is similar to the [Microsoft.Targeting](./README.md#MicrosoftTa You can use variants to override the enabled state of a feature flag. This gives variants an opportunity to extend the evaluation of a feature flag. If a caller is checking whether a flag that has variants is enabled, then variant allocation will be performed to see if an allocated variant is set up to override the result. This is done using the optional variant property `StatusOverride`. By default, this property is set to `None`, which means the variant doesn't affect whether the flag is considered enabled or disabled. Setting `StatusOverride` to `Enabled` allows the variant, when chosen, to override a flag to be enabled. Setting `StatusOverride` to `Disabled` provides the opposite functionality, therefore disabling the flag when the variant is chosen. A feature with a `Status` of `Disabled` cannot be overridden. +The `StatusOverride` property allows translating the outcome of variant allocation into the enabled state of a feature flag. This allows you to continue using APIs like `IsEnabledAsync` and `FeatureGateAttribute` in your application, all while benefiting from the new features that come with variants, such as percentile allocation and seed. + + ``` "Allocation": { "Percentile": [{ @@ -789,12 +792,10 @@ You can use variants to override the enabled state of a feature flag. This gives }, "Variants": [ { - "Name": "On", - "ConfigurationValue": true + "Name": "On" }, { "Name": "Off", - "ConfigurationValue": false, "StatusOverride": "Disabled" } ], From 51fbca1b2225f8e7493099474f6a8c4fa6f878d9 Mon Sep 17 00:00:00 2001 From: AMER JUSUPOVIC Date: Thu, 19 Oct 2023 10:50:03 -0700 Subject: [PATCH 2/2] fix wording --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 478bdb9a..ad594b8b 100644 --- a/README.md +++ b/README.md @@ -777,8 +777,7 @@ Allocation logic is similar to the [Microsoft.Targeting](./README.md#MicrosoftTa You can use variants to override the enabled state of a feature flag. This gives variants an opportunity to extend the evaluation of a feature flag. If a caller is checking whether a flag that has variants is enabled, then variant allocation will be performed to see if an allocated variant is set up to override the result. This is done using the optional variant property `StatusOverride`. By default, this property is set to `None`, which means the variant doesn't affect whether the flag is considered enabled or disabled. Setting `StatusOverride` to `Enabled` allows the variant, when chosen, to override a flag to be enabled. Setting `StatusOverride` to `Disabled` provides the opposite functionality, therefore disabling the flag when the variant is chosen. A feature with a `Status` of `Disabled` cannot be overridden. -The `StatusOverride` property allows translating the outcome of variant allocation into the enabled state of a feature flag. This allows you to continue using APIs like `IsEnabledAsync` and `FeatureGateAttribute` in your application, all while benefiting from the new features that come with variants, such as percentile allocation and seed. - +If you are using a feature flag with binary variants, the `StatusOverride` property can be very helpful. It allows you to continue using APIs like `IsEnabledAsync` and `FeatureGateAttribute` in your application, all while benefiting from the new features that come with variants, such as percentile allocation and seed. ``` "Allocation": {