From 008d95208fe01be80671fa365d095826cb0d6bf8 Mon Sep 17 00:00:00 2001 From: ayush-chauhan233 Date: Fri, 6 Dec 2024 14:09:35 +0530 Subject: [PATCH] [BST-186]: Review Fixes: Updated the message menu structure --- .../product_menu_list.test.tsx.snap | 2 +- .../post_priority/post_priority_picker.tsx | 163 +++++++++--------- .../post_priority_picker_item.tsx | 4 +- .../widgets/menu/menu_group.test.tsx | 2 +- .../components/widgets/menu/menu_group.tsx | 2 +- 5 files changed, 91 insertions(+), 82 deletions(-) diff --git a/webapp/channels/src/components/global_header/left_controls/product_menu/product_menu_list/__snapshots__/product_menu_list.test.tsx.snap b/webapp/channels/src/components/global_header/left_controls/product_menu/product_menu_list/__snapshots__/product_menu_list.test.tsx.snap index 5255a46494c..2f0c45285f2 100644 --- a/webapp/channels/src/components/global_header/left_controls/product_menu/product_menu_list/__snapshots__/product_menu_list.test.tsx.snap +++ b/webapp/channels/src/components/global_header/left_controls/product_menu/product_menu_list/__snapshots__/product_menu_list.test.tsx.snap @@ -501,7 +501,7 @@ exports[`components/global/product_switcher_menu should show integrations should
  • -
    - + + + } + text={formatMessage({ + id: 'post_priority.priority.standard', + defaultMessage: 'Standard', + })} + /> + } + text={formatMessage({ + id: 'post_priority.priority.important', + defaultMessage: 'Important', + })} + /> + } + text={formatMessage({ + id: 'post_priority.priority.urgent', + defaultMessage: 'Urgent', + })} + /> + + {(postAcknowledgementsEnabled || persistentNotificationsEnabled) && ( - } - text={formatMessage({ - id: 'post_priority.priority.standard', - defaultMessage: 'Standard', - })} - /> - } - text={formatMessage({ - id: 'post_priority.priority.important', - defaultMessage: 'Important', - })} - /> - } - text={formatMessage({ - id: 'post_priority.priority.urgent', - defaultMessage: 'Urgent', - })} - /> +
  • +
      + {postAcknowledgementsEnabled && ( + } + text={formatMessage({ + id: 'post_priority.requested_ack.text', + defaultMessage: 'Request acknowledgement', + })} + description={formatMessage({ + id: 'post_priority.requested_ack.description', + defaultMessage: 'An acknowledgement button will appear with your message', + })} + /> + )} + {priority === PostPriority.URGENT && persistentNotificationsEnabled && ( + } + text={formatMessage({ + id: 'post_priority.persistent_notifications.text', + defaultMessage: 'Send persistent notifications', + })} + description={formatMessage( + { + id: 'post_priority.persistent_notifications.description', + defaultMessage: 'Recipients will be notified every {interval, plural, one {1 minute} other {{interval} minutes}} until they acknowledge or reply', + }, { + interval, + }, + )} + /> + )} +
    +
  • - {(postAcknowledgementsEnabled || persistentNotificationsEnabled) && ( - - {postAcknowledgementsEnabled && ( - } - text={formatMessage({ - id: 'post_priority.requested_ack.text', - defaultMessage: 'Request acknowledgement', - })} - description={formatMessage({ - id: 'post_priority.requested_ack.description', - defaultMessage: 'An acknowledgement button will appear with your message', - })} - /> - )} - {priority === PostPriority.URGENT && persistentNotificationsEnabled && ( - } - text={formatMessage({ - id: 'post_priority.persistent_notifications.text', - defaultMessage: 'Send persistent notifications', - })} - description={formatMessage( - { - id: 'post_priority.persistent_notifications.description', - defaultMessage: 'Recipients will be notified every {interval, plural, one {1 minute} other {{interval} minutes}} until they acknowledge or reply', - }, { - interval, - }, - )} - /> - )} - - )} -
    -
    + )} + {postAcknowledgementsEnabled && (