1
0
mirror of https://github.com/mattermost/focalboard.git synced 2025-01-23 18:34:02 +02:00

GH-3350 - Updating language for linking modals (#3507)

GH-3350 - Updating language for linking modals and the color of buttons
GH-3512 - Added margin between button and text in link modal
GH-3523 - Updated text in share modal

Co-authored-by: Justine Geffen <justinegeffen@users.noreply.github.com>
This commit is contained in:
Asaad Mahmood 2022-08-04 12:48:10 +05:00 committed by GitHub
parent dcdea6d7a5
commit b6826f8509
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 59 additions and 53 deletions

View File

@ -139,7 +139,7 @@
position: absolute;
left: 13px;
font-size: 18px;
top: 14px;
top: 13px;
width: 20px;
height: 20px;
opacity: 0.48;

View File

@ -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: <p/>})
} 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),
}}

View File

@ -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;
}
}

View File

@ -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",

View File

@ -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",

View File

@ -59,7 +59,7 @@ exports[`/components/confirmationDialogBox confirmDialog should match snapshot 1
</span>
</button>
<button
class="Button filled danger size--medium"
class="Button filled size--medium"
title="test-btn-text"
type="submit"
>
@ -134,7 +134,7 @@ exports[`/components/confirmationDialogBox confirmDialog with Confirm Button Tex
</span>
</button>
<button
class="Button filled danger size--medium"
class="Button filled size--medium"
title="test-btn-text"
type="submit"
>

View File

@ -43,13 +43,13 @@
.sub-text {
text-align: center;
white-space: pre-line;
}
}
.action-buttons {
display: grid;
grid-gap: 10px;
display: flex;
grid-gap: 12px;
gap: 12px;
grid-template-columns: repeat(2, 1fr);
margin-top: 32px;
}

View File

@ -13,6 +13,7 @@ type ConfirmationDialogBoxProps = {
heading: string
subText?: string | ReactNode
confirmButtonText?: string
destructive?: boolean
onConfirm: () => void
onClose: () => void
}
@ -53,7 +54,7 @@ export const ConfirmationDialogBox = (props: Props) => {
title={props.dialogBox.confirmButtonText || 'Confirm'}
size='medium'
submit={true}
danger={true}
danger={props.dialogBox.destructive ? true : false}
onClick={handleOnConfirm}
filled={true}
>

View File

@ -71,7 +71,7 @@ exports[`src/components/shareBoard/shareBoard confirm unlinking linked channel 1
class=" css-14el2xx-placeholder"
id="react-select-12-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -321,7 +321,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l
class=" css-14el2xx-placeholder"
id="react-select-4-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -530,7 +530,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l
class=" css-14el2xx-placeholder"
id="react-select-4-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -739,7 +739,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Regene
class=" css-14el2xx-placeholder"
id="react-select-5-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -971,7 +971,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Select
class=" css-14el2xx-placeholder"
id="react-select-10-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -1216,7 +1216,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Select
class=" css-14el2xx-placeholder"
id="react-select-10-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -1675,7 +1675,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Select
class=" css-14el2xx-placeholder"
id="react-select-11-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -1920,7 +1920,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Select
class=" css-14el2xx-placeholder"
id="react-select-11-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -2379,7 +2379,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard, and click switc
class=" css-14el2xx-placeholder"
id="react-select-6-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -2611,7 +2611,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoardComponent and cli
class=" css-14el2xx-placeholder"
id="react-select-7-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -2843,7 +2843,7 @@ exports[`src/components/shareBoard/shareBoard should match snapshot 1`] = `
class=" css-14el2xx-placeholder"
id="react-select-2-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -3052,7 +3052,7 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class=" css-14el2xx-placeholder"
id="react-select-3-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -3261,7 +3261,7 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class=" css-14el2xx-placeholder"
id="react-select-9-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"
@ -3470,7 +3470,7 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class=" css-14el2xx-placeholder"
id="react-select-8-placeholder"
>
Search for people
Search for people and channels
</div>
<div
class=" css-ox1y69-Input"

View File

@ -64,13 +64,11 @@ const ChannelPermissionsRow = (props: Props): JSX.Element => {
}),
subText: intl.formatMessage({
id: 'shareBoard.confirm-unlink.body',
defaultMessage: '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?',
}, {
lineBreak: <p/>
defaultMessage: '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.',
}),
confirmButtonText: intl.formatMessage({
id: 'shareBoard.confirm-unlink.confirmBtnText',
defaultMessage: 'Yes, unlink',
defaultMessage: 'Unlink channel',
}),
onConfirm: onUnlinkBoard,
onClose: () => setShowUnlinkChannelConfirmation(false),

View File

@ -528,7 +528,7 @@ describe('src/components/shareBoard/shareBoard', () => {
})
expect(container).toMatchSnapshot()
const selectElement = screen.getByText('Search for people')
const selectElement = screen.getByText('Search for people and channels')
expect(selectElement).toBeDefined()
await act(async () => {
@ -577,7 +577,7 @@ describe('src/components/shareBoard/shareBoard', () => {
})
expect(container).toMatchSnapshot()
const selectElement = screen.getByText('Search for people')
const selectElement = screen.getByText('Search for people and channels')
expect(selectElement).toBeDefined()
await act(async () => {
@ -621,7 +621,7 @@ describe('src/components/shareBoard/shareBoard', () => {
expect(unlinkOption).not.toBeNull()
userEvent.click(unlinkOption)
const unlinkConfirmationBtn = screen.getByText('Yes, unlink')
const unlinkConfirmationBtn = screen.getByText('Unlink channel')
expect(unlinkConfirmationBtn).not.toBeNull()
userEvent.click(unlinkConfirmationBtn)

View File

@ -325,11 +325,11 @@ export default function ShareBoardDialog(props: Props): JSX.Element {
let confirmSubtext
let confirmButtonText
if (board.channelId == '') {
confirmSubtext = intl.formatMessage({id: 'shareBoard.confirm-link-channel-subtext', defaultMessage: 'When you link a channel to a board, all members of the channel (existing and new) will be able to edit it.\n\nAre you sure you want to link it?'})
confirmButtonText = intl.formatMessage({id: 'shareBoard.confirm-link-channel-button', defaultMessage: 'Yes, link here'})
confirmSubtext = intl.formatMessage({id: 'shareBoard.confirm-link-channel-subtext', defaultMessage: 'When you link a channel to a board, all members of the channel (existing and new) will be able to edit it.'})
confirmButtonText = intl.formatMessage({id: 'shareBoard.confirm-link-channel-button', defaultMessage: 'Link channel'})
} else {
confirmSubtext = intl.formatMessage({id: 'shareBoard.confirm-link-channel-subtext-with-other-channel', defaultMessage: 'When you link a channel to a board, all members of the channel (existing and new) will be able to edit it.\n\nThis board is currently linked to another channel.\nIt will be unlinked if you choose to link it here.\n\nAre you sure you want to link it?'})
confirmButtonText = intl.formatMessage({id: 'shareBoard.confirm-link-channel-button-with-other-channel', defaultMessage: 'Yes, unlink and link here'})
confirmSubtext = intl.formatMessage({id: 'shareBoard.confirm-link-channel-subtext-with-other-channel', defaultMessage: '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.\nIt will be unlinked if you choose to link it here.'}, {lineBreak: <p/>})
confirmButtonText = intl.formatMessage({id: 'shareBoard.confirm-link-channel-button-with-other-channel', defaultMessage: 'Unlink and link here'})
}
return (
@ -344,6 +344,7 @@ export default function ShareBoardDialog(props: Props): JSX.Element {
heading: intl.formatMessage({id: 'shareBoard.confirm-link-channel', defaultMessage: 'Link board to channel'}),
subText: confirmSubtext,
confirmButtonText: confirmButtonText,
destructive: board.channelId != '',
onConfirm: () => onLinkBoard(showLinkChannelConfirmation, true),
onClose: () => setShowLinkChannelConfirmation(null),
}}
@ -380,7 +381,7 @@ export default function ShareBoardDialog(props: Props): JSX.Element {
getOptionValue={(u) => u.id}
getOptionLabel={(u: IUser|Channel) => (u as IUser).username || (u as Channel).display_name}
isMulti={false}
placeholder={intl.formatMessage({id: 'ShareBoard.searchPlaceholder', defaultMessage: 'Search for people'})}
placeholder={intl.formatMessage({id: 'ShareBoard.searchPlaceholder', defaultMessage: 'Search for people and channels'})}
onChange={(newValue) => {
if (newValue && (newValue as IUser).username) {
mutator.createBoardMember(boardId, newValue.id)

View File

@ -23,7 +23,7 @@
}
&.sidebar-view-item {
padding-left: 32px;
padding-left: 42px;
color: rgba(var(--sidebar-text-rgb), 0.64);
font-weight: 400;
}
@ -138,7 +138,7 @@
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
display: flex;
display: block;
align-items: baseline;
.octo-icon {

View File

@ -95,6 +95,7 @@
text-overflow: ellipsis;
flex-grow: 1;
white-space: nowrap;
text-align: left;
}
> .SubmenuTriangleIcon {