From 360c0192a6943fb252e730c9fbb493c675bc4f90 Mon Sep 17 00:00:00 2001 From: Daniel Roberts Date: Mon, 22 Jul 2024 17:45:38 -0500 Subject: [PATCH 1/4] Fix domain interpolation on feature flag page --- corehq/apps/toggle_ui/templates/toggle/edit_flag.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corehq/apps/toggle_ui/templates/toggle/edit_flag.html b/corehq/apps/toggle_ui/templates/toggle/edit_flag.html index 8abcb755f4b2..2161f41758ad 100644 --- a/corehq/apps/toggle_ui/templates/toggle/edit_flag.html +++ b/corehq/apps/toggle_ui/templates/toggle/edit_flag.html @@ -22,7 +22,7 @@ {% block page_content %} {% registerurl 'edit_toggle' toggle.slug %} - {% registerurl 'domain_internal_settings' '___' %} + {% registerurl 'domain_internal_settings' '---' %} {% initial_page_data 'items' toggle.enabled_users %} {% initial_page_data 'namespaces' namespaces %} {% initial_page_data 'last_used' last_used %} From e6611c5c22f036d5ff22cc6bef1fa8b3b1f05f75 Mon Sep 17 00:00:00 2001 From: Daniel Roberts Date: Mon, 22 Jul 2024 17:46:04 -0500 Subject: [PATCH 2/4] Make domain interpolation on feature flag page work with `!` --- corehq/apps/toggle_ui/static/toggle_ui/js/edit-flag.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/corehq/apps/toggle_ui/static/toggle_ui/js/edit-flag.js b/corehq/apps/toggle_ui/static/toggle_ui/js/edit-flag.js index f67bb0822b4a..748eae578d77 100644 --- a/corehq/apps/toggle_ui/static/toggle_ui/js/edit-flag.js +++ b/corehq/apps/toggle_ui/static/toggle_ui/js/edit-flag.js @@ -106,6 +106,9 @@ hqDefine('toggle_ui/js/edit-flag', [ self.saveButtonBottom = self.createSaveButton(); self.getNamespaceHtml = function (namespace, value) { + if (value && value[0] === '!') { + value = value.replace(/^!/, ''); + } if (namespace === 'domain') { return 'domain '; } else { From 909ebc5eee5b730fb654608a5c48218b19e118b6 Mon Sep 17 00:00:00 2001 From: Daniel Roberts Date: Mon, 22 Jul 2024 17:46:31 -0500 Subject: [PATCH 3/4] Note use of `!` in feature flag page help bubble --- corehq/apps/toggle_ui/templates/toggle/edit_flag.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/corehq/apps/toggle_ui/templates/toggle/edit_flag.html b/corehq/apps/toggle_ui/templates/toggle/edit_flag.html index 2161f41758ad..f68c0a2f2dd9 100644 --- a/corehq/apps/toggle_ui/templates/toggle/edit_flag.html +++ b/corehq/apps/toggle_ui/templates/toggle/edit_flag.html @@ -155,7 +155,7 @@

{% trans "Enabled toggle items" %} {% if is_random %} + description: '{% trans "Items added here will be enabled regardless of the randomness (or disabled if preceded by `!`)" %}'}"> {% endif %}

From 512b9f7070f8e2f1f9edb0d5aeb551dd3275596e Mon Sep 17 00:00:00 2001 From: Daniel Roberts Date: Fri, 26 Jul 2024 17:19:09 -0500 Subject: [PATCH 4/4] Update flag UI to show check / xmark icon to show included / excluded --- corehq/apps/toggle_ui/templates/toggle/edit_flag.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/corehq/apps/toggle_ui/templates/toggle/edit_flag.html b/corehq/apps/toggle_ui/templates/toggle/edit_flag.html index f68c0a2f2dd9..cc2ea8322c6a 100644 --- a/corehq/apps/toggle_ui/templates/toggle/edit_flag.html +++ b/corehq/apps/toggle_ui/templates/toggle/edit_flag.html @@ -169,6 +169,12 @@

+ + + + + +