diff --git a/mattermost-plugin/webapp/src/components/boardSelector.scss b/mattermost-plugin/webapp/src/components/boardSelector.scss index 519755fa1..184af0434 100644 --- a/mattermost-plugin/webapp/src/components/boardSelector.scss +++ b/mattermost-plugin/webapp/src/components/boardSelector.scss @@ -139,7 +139,7 @@ position: absolute; left: 13px; font-size: 18px; - top: 14px; + top: 13px; width: 20px; height: 20px; opacity: 0.48; diff --git a/mattermost-plugin/webapp/src/components/boardSelector.tsx b/mattermost-plugin/webapp/src/components/boardSelector.tsx index 8390db17f..c65368503 100644 --- a/mattermost-plugin/webapp/src/components/boardSelector.tsx +++ b/mattermost-plugin/webapp/src/components/boardSelector.tsx @@ -116,12 +116,12 @@ const BoardSelector = () => { if (showLinkBoardConfirmation?.channelId !== '') { confirmationSubText = intl.formatMessage({ id: 'boardSelector.confirm-link-board-subtext-with-other-channel', - defaultMessage: 'Linking the "{boardName}" board to this channel would give all members of this channel "Editor" access to the board.\n\nAdditionally, this board is linked to another channel, and will be unlinked from the other channel when you link it here.\n\nAre you sure you want to link it?' - }, {boardName: showLinkBoardConfirmation?.title}) + defaultMessage: 'When you link "{boardName}" to the channel, all members of the channel (existing and new) will be able to edit it.{lineBreak} This board is currently linked to another channel. It will be unlinked if you choose to link it here.' + }, {boardName: showLinkBoardConfirmation?.title, lineBreak:

}) } else { confirmationSubText = intl.formatMessage({ id: 'boardSelector.confirm-link-board-subtext', - defaultMessage: 'Linking the "{boardName}" board to this channel would give all members of this channel "Editor" access to the board.\n\nAre you sure you want to link it?' + defaultMessage: 'When you link "{boardName}" to the channel, all members of the channel (existing and new) will be able to edit it. You can unlink a board from a channel at any time.' }, {boardName: showLinkBoardConfirmation?.title}) } @@ -143,6 +143,7 @@ const BoardSelector = () => { heading: intl.formatMessage({id: 'boardSelector.confirm-link-board', defaultMessage: 'Link board to channel'}), subText: confirmationSubText, confirmButtonText: intl.formatMessage({id: 'boardSelector.confirm-link-board-button', defaultMessage: 'Yes, link board'}), + destructive: showLinkBoardConfirmation?.channelId !== '', onConfirm: () => linkBoard(showLinkBoardConfirmation, true), onClose: () => setShowLinkBoardConfirmation(null), }} @@ -160,7 +161,7 @@ const BoardSelector = () => { onClick={() => newLinkedBoard()} emphasis='secondary' > - diff --git a/mattermost-plugin/webapp/src/components/boardSelectorItem.scss b/mattermost-plugin/webapp/src/components/boardSelectorItem.scss index 6aa64c87b..260b6afd5 100644 --- a/mattermost-plugin/webapp/src/components/boardSelectorItem.scss +++ b/mattermost-plugin/webapp/src/components/boardSelectorItem.scss @@ -8,6 +8,10 @@ .icon { align-items: flex-start; margin-right: 10px; + + &:empty { + display: none; + } } .resultLine { @@ -34,5 +38,6 @@ display: flex; align-self: center; align-items: center; + padding-left: 16px; } } diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index 18db9a2d1..f130dc412 100644 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -203,7 +203,7 @@ "ShareBoard.copiedLink": "Copied!", "ShareBoard.copyLink": "Copy link", "ShareBoard.regenerate": "Regenerate token", - "ShareBoard.searchPlaceholder": "Search for people", + "ShareBoard.searchPlaceholder": "Search for people and channels", "ShareBoard.teamPermissionsText": "Everyone at {teamName} Team", "ShareBoard.tokenRegenrated": "Token regenerated", "ShareBoard.userPermissionsRemoveMemberText": "Remove member", @@ -311,9 +311,9 @@ "WelcomePage.NoThanks.Text": "No thanks, I'll figure it out myself", "Workspace.editing-board-template": "You're editing a board template.", "boardSelector.confirm-link-board": "Link board to channel", - "boardSelector.confirm-link-board-button": "Yes, link board", - "boardSelector.confirm-link-board-subtext": "Linking the \"{boardName}\" board to this channel would give all members of this channel \"Editor\" access to the board. Are you sure you want to link it?", - "boardSelector.confirm-link-board-subtext-with-other-channel": "Linking the \"{boardName}\" board to this channel would give all members of this channel \"Editor\" access to the board. Additionally, this board is linked to another channel, and will be unlinked from the other channel when you link it here. Are you sure you want to link it?", + "boardSelector.confirm-link-board-button": "Link board", + "boardSelector.confirm-link-board-subtext": "When you link \"{boardName}\" to the channel, all members of the channel (existing and new) will be able to edit it. You can unlink a board from a channel at any time.", + "boardSelector.confirm-link-board-subtext-with-other-channel": "When you link a channel to a board, all members of the channel (existing and new) will be able to edit it.{lineBreak}This board is currently linked to another channel. It will be unlinked if you choose to link it here.", "boardSelector.create-a-board": "Create a board", "boardSelector.link": "Link", "boardSelector.search-for-boards": "Search for boards", @@ -366,14 +366,13 @@ "share-board.share": "Share", "shareBoard.channels-select-group": "Channels", "shareBoard.confirm-link-channel": "Link board to channel", - "shareBoard.confirm-link-channel-button": "Yes, link here", - "shareBoard.confirm-link-channel-button-with-other-channel": "Yes, unlink and link here", - "shareBoard.confirm-link-channel-subtext": "When you link a channel to a board, all members of the channel (existing and new) will be able to edit it. Are you sure you want to link it?", - "shareBoard.confirm-link-channel-subtext-with-other-channel": "When you link a channel to a board, all members of the channel (existing and new) will be able to edit it. This board is currently linked to another channel. It will be unlinked if you choose to link it here. Are you sure you want to link it?", - "shareBoard.confirm-unlink.title": "Unlink channel from board", - "shareBoard.confirm-unlink.body": "When you unlink a channel from a board, all members of the channel (existing and new) will loose access to it unless they are given permission separately. {lineBreak} Are you sure you want to unlink it?", - "shareBoard.confirm-unlink.confirmBtnText": "Yes, unlink", + "shareBoard.confirm-link-channel-button": "Link channel", + "shareBoard.confirm-link-channel-button-with-other-channel": "Unlink and link here", + "shareBoard.confirm-link-channel-subtext": "When you link a channel to a board, all members of the channel (existing and new) will be able to edit it.", + "shareBoard.confirm-link-channel-subtext-with-other-channel": "When you link a channel to a board, all members of the channel (existing and new) will be able to edit it.{lineBreak}This board is currently linked to another channel. It will be unlinked if you choose to link it here.", "shareBoard.confirm-unlink.title": "Unlink channel from board", + "shareBoard.confirm-unlink.body": "When you unlink a channel from a board, all members of the channel (existing and new) will lose access to it unless they're given permission separately.", + "shareBoard.confirm-unlink.confirmBtnText": "Unlink channel", "shareBoard.lastAdmin": "Boards must have at least one Administrator", "shareBoard.members-select-group": "Members", "tutorial_tip.finish_tour": "Done", diff --git a/webapp/i18n/en_AU.json b/webapp/i18n/en_AU.json index 5f5c8edc8..e1a9a355c 100644 --- a/webapp/i18n/en_AU.json +++ b/webapp/i18n/en_AU.json @@ -203,7 +203,7 @@ "ShareBoard.copiedLink": "Copied!", "ShareBoard.copyLink": "Copy link", "ShareBoard.regenerate": "Regenerate token", - "ShareBoard.searchPlaceholder": "Search for people", + "ShareBoard.searchPlaceholder": "Search for people and channels", "ShareBoard.teamPermissionsText": "Everyone at {teamName} Team", "ShareBoard.tokenRegenrated": "Token regenerated", "ShareBoard.userPermissionsRemoveMemberText": "Remove member", @@ -305,8 +305,8 @@ "WelcomePage.NoThanks.Text": "No thanks, I'll figure it out myself", "Workspace.editing-board-template": "You're editing a board template.", "boardSelector.confirm-link-board": "Link board to channel", - "boardSelector.confirm-link-board-button": "Yes, link board", - "boardSelector.confirm-link-board-subtext": "Linking the '\\{boardName}'\\ board to this channel would give all members of this channel 'Editor' access to the board. Are you sure you want to link it?", + "boardSelector.confirm-link-board-button": "Link board", + "boardSelector.confirm-link-board-subtext-with-other-channel": "When you link "{boardName}" to the channel, all members of the channel (existing and new) will be able to edit it.{lineBreak} This board is currently linked to another channel. It will be unlinked if you choose to link it here.", "boardSelector.create-a-board": "Create a board", "boardSelector.link": "Link", "boardSelector.search-for-boards": "Search for boards", diff --git a/webapp/src/components/__snapshots__/confirmationDialogBox.test.tsx.snap b/webapp/src/components/__snapshots__/confirmationDialogBox.test.tsx.snap index c9a6aed68..9775ad06a 100644 --- a/webapp/src/components/__snapshots__/confirmationDialogBox.test.tsx.snap +++ b/webapp/src/components/__snapshots__/confirmationDialogBox.test.tsx.snap @@ -59,7 +59,7 @@ exports[`/components/confirmationDialogBox confirmDialog should match snapshot 1