From 61aeee1b54c48d4f4d853689567e90b6e70651f1 Mon Sep 17 00:00:00 2001 From: Ben King <bking@gitlab.com> Date: Fri, 7 Jul 2023 19:06:38 +0000 Subject: [PATCH] Update Confirm Danger wording The Confirm Danger Modal has been updated to simplify the confirmation message. An end-user should not be informed about the 'modal' as this might cause confusion. Changelog: changed --- .../vue_shared/components/confirm_danger/constants.js | 4 +--- ee/spec/features/groups/sso_spec.rb | 2 +- locale/gitlab.pot | 2 +- .../components/confirm_danger/confirm_danger_modal_spec.js | 4 +--- 4 files changed, 4 insertions(+), 8 deletions(-) diff --git a/app/assets/javascripts/vue_shared/components/confirm_danger/constants.js b/app/assets/javascripts/vue_shared/components/confirm_danger/constants.js index 90d55d0f93f9c..c6b9e61b85f43 100644 --- a/app/assets/javascripts/vue_shared/components/confirm_danger/constants.js +++ b/app/assets/javascripts/vue_shared/components/confirm_danger/constants.js @@ -6,7 +6,5 @@ export const CONFIRM_DANGER_MODAL_BUTTON = __('Confirm'); export const CONFIRM_DANGER_WARNING = __( 'This action can lead to data loss. To prevent accidental actions we ask you to confirm your intention.', ); -export const CONFIRM_DANGER_PHRASE_TEXT = __( - 'Please type %{phrase_code} to proceed or close this modal to cancel.', -); +export const CONFIRM_DANGER_PHRASE_TEXT = __('Please type %{phrase_code} to proceed.'); export const CONFIRM_DANGER_MODAL_CANCEL = __('Cancel'); diff --git a/ee/spec/features/groups/sso_spec.rb b/ee/spec/features/groups/sso_spec.rb index 28e6128219941..af4309b13dad9 100644 --- a/ee/spec/features/groups/sso_spec.rb +++ b/ee/spec/features/groups/sso_spec.rb @@ -55,7 +55,7 @@ click_button('Transfer ownership') expect(page).to have_content('This action can lead to data loss. To prevent accidental actions we ask you to confirm your intention.') - expect(page).to have_content("Please type #{user.username} to proceed or close this modal to cancel.") + expect(page).to have_content("Please type #{user.username} to proceed.") fill_in 'confirm_name_input', with: user.username click_button 'Confirm' diff --git a/locale/gitlab.pot b/locale/gitlab.pot index 8357366ae54ff..ff7bea3df77d5 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -34328,7 +34328,7 @@ msgstr "" msgid "Please try and refresh the page. If the problem persists please contact support." msgstr "" -msgid "Please type %{phrase_code} to proceed or close this modal to cancel." +msgid "Please type %{phrase_code} to proceed." msgstr "" msgid "Please use this form to report to the administrator users who create spam issues, comments or behave inappropriately." diff --git a/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_modal_spec.js b/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_modal_spec.js index d7f94c00d093d..0b5c8d9afc323 100644 --- a/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_modal_spec.js +++ b/spec/frontend/vue_shared/components/confirm_danger/confirm_danger_modal_spec.js @@ -60,9 +60,7 @@ describe('Confirm Danger Modal', () => { }); it('renders the correct confirmation phrase', () => { - expect(findConfirmationPhrase().text()).toBe( - `Please type ${phrase} to proceed or close this modal to cancel.`, - ); + expect(findConfirmationPhrase().text()).toBe(`Please type ${phrase} to proceed.`); }); describe('without injected data', () => { -- GitLab