From 8c66f4d6df2be8efa401e3c701ef731d41b4673a Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Tue, 3 Oct 2023 11:44:28 +0200 Subject: [PATCH 1/2] chore(form): remove "optional" mention because people never fill them Closes #9540 --- .../champ_label_content_component.html.haml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml b/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml index f83359ec7..8400ff299 100644 --- a/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml +++ b/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml @@ -5,7 +5,7 @@ - elsif @champ.dossier.procedure.feature_enabled?(:disable_label_optional_champ_2023_06_29) -# noop here, allow admin to disable the optional_champ - else - = "#{t('.optional_champ')}" + %span.sr-only= t('.optional_champ') - if @champ.forked_with_changes? %span.updated-at.highlighted From 9673485904b11acc44f3d617d691822e6ea8cde0 Mon Sep 17 00:00:00 2001 From: Colin Darie Date: Tue, 3 Oct 2023 14:32:48 +0200 Subject: [PATCH 2/2] chore(flipper): delete disable_label_optional_champ_2023_06_29 feature flag --- .../champ_label_content_component.html.haml | 2 -- ...03123111_delete_optional_champ_feature_flag.rake | 13 +++++++++++++ 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 lib/tasks/deployment/20231003123111_delete_optional_champ_feature_flag.rake diff --git a/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml b/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml index 8400ff299..713fd100d 100644 --- a/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml +++ b/app/components/editable_champ/champ_label_content_component/champ_label_content_component.html.haml @@ -2,8 +2,6 @@ - if @champ.public? && !@champ.checkbox? - if @champ.mandatory? = render EditableChamp::AsteriskMandatoryComponent.new - - elsif @champ.dossier.procedure.feature_enabled?(:disable_label_optional_champ_2023_06_29) - -# noop here, allow admin to disable the optional_champ - else %span.sr-only= t('.optional_champ') diff --git a/lib/tasks/deployment/20231003123111_delete_optional_champ_feature_flag.rake b/lib/tasks/deployment/20231003123111_delete_optional_champ_feature_flag.rake new file mode 100644 index 000000000..8223aa9cf --- /dev/null +++ b/lib/tasks/deployment/20231003123111_delete_optional_champ_feature_flag.rake @@ -0,0 +1,13 @@ +namespace :after_party do + desc 'Deployment task: delete_optional_champ_feature_flag' + task delete_optional_champ_feature_flag: :environment do + puts "Running deploy task 'delete_optional_champ_feature_flag'" + + Flipper::Adapters::ActiveRecord::Gate.where(feature_key: 'disable_label_optional_champ_2023_06_29').destroy_all + + # Update task as completed. If you remove the line below, the task will + # run with every deploy (or every time you call after_party:run). + AfterParty::TaskRecord + .create version: AfterParty::TaskRecorder.new(__FILE__).timestamp + end +end