microsoft / FeatureManagement-Dotnet

Microsoft.FeatureManagement provides standardized APIs for enabling feature flags within applications. Utilize this library to secure a consistent experience when developing applications that use patterns such as beta access, rollout, dark deployments, and more.
MIT License
1.03k stars 111 forks source link

Support variant for FeatureTagHelper #407

Closed zhiyuanliang-ms closed 3 months ago

zhiyuanliang-ms commented 5 months ago

We've already offer <feature> tags which can be used to conditionally render content based on whether a feature is enabled or not.

<feature name="FeatureX">
  <p>This can only be seen if 'FeatureX' is enabled.</p>
</feature>

We want to extend the feature tag helper to support variant.

The usage will be like:

<feature name=”Alpha” variant=”V1”> Content only for Variant 1</feature> 
<feature name=”Alpha” variant=”V2> Content only for Variant 2</feature> 
zhenlan commented 5 months ago

It will be helpful if you can add description and examples of usage.

zhiyuanliang-ms commented 5 months ago

README updated.

zhiyuanliang-ms commented 4 months ago

@jimmyca15 @rossgrambo Could you help review/approve this PR?