From a2d3e216faac63e91c69bf1b2823287b20b70ab4 Mon Sep 17 00:00:00 2001 From: AMER JUSUPOVIC Date: Thu, 5 Oct 2023 16:00:47 -0700 Subject: [PATCH 1/3] add negating feature tag evaluation section to readme --- README.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/README.md b/README.md index 49c2ec6f..cae9393a 100644 --- a/README.md +++ b/README.md @@ -261,6 +261,18 @@ The `` tag requires a tag helper to work. This can be done by adding th @addTagHelper *, Microsoft.FeatureManagement.AspNetCore ``` +### Negating Feature Tag Evaluation + +When using the `` tag to conditionally render content in MVC views, you can negate the tag helper evaluation to display content when a feature or set of features are disabled. + +``` HTML+Razor + +

This can only be seen if 'FeatureX' is disabled.

+
+``` + +In the above example, the content is only rendered if `FeatureX` is disabled. + ### MVC Filters MVC action filters can be set up to conditionally execute based on the state of a feature. This is done by registering MVC filters in a feature aware manner. From 11a5dacecf4b2ff0754717a59c53adcee8c170be Mon Sep 17 00:00:00 2001 From: AMER JUSUPOVIC Date: Fri, 6 Oct 2023 10:19:38 -0700 Subject: [PATCH 2/3] reword last sentence --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index cae9393a..b961d055 100644 --- a/README.md +++ b/README.md @@ -271,7 +271,7 @@ When using the `` tag to conditionally render content in MVC views, you ``` -In the above example, the content is only rendered if `FeatureX` is disabled. +By setting `negate="true"`, the content is only rendered if `FeatureX` is disabled. ### MVC Filters From f4ccd2111f255b3b48bcc5630ff523d1e90ea97b Mon Sep 17 00:00:00 2001 From: AMER JUSUPOVIC Date: Fri, 6 Oct 2023 12:48:24 -0700 Subject: [PATCH 3/3] fix ordering and consolidate sections for readability --- README.md | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index b961d055..f5fa337b 100644 --- a/README.md +++ b/README.md @@ -256,14 +256,7 @@ In MVC views `` tags can be used to conditionally render content based ``` -The `` tag requires a tag helper to work. This can be done by adding the feature management tag helper to the _ViewImports.cshtml_ file. -``` HTML+Razor -@addTagHelper *, Microsoft.FeatureManagement.AspNetCore -``` - -### Negating Feature Tag Evaluation - -When using the `` tag to conditionally render content in MVC views, you can negate the tag helper evaluation to display content when a feature or set of features are disabled. +You can also negate the tag helper evaluation to display content when a feature or set of features are disabled. By setting `negate="true"` in the example below, the content is only rendered if `FeatureX` is disabled. ``` HTML+Razor @@ -271,7 +264,10 @@ When using the `` tag to conditionally render content in MVC views, you ``` -By setting `negate="true"`, the content is only rendered if `FeatureX` is disabled. +The `` tag requires a tag helper to work. This can be done by adding the feature management tag helper to the _ViewImports.cshtml_ file. +``` HTML+Razor +@addTagHelper *, Microsoft.FeatureManagement.AspNetCore +``` ### MVC Filters