fix a placeholder message when sharing template (#3868)

This commit is contained in:
Yusuke Nemoto 2022-09-28 07:06:04 +09:00 committed by GitHub
parent a522f7f92d
commit 9b3be29af5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 9 additions and 5 deletions

View file

@ -221,6 +221,7 @@
"ShareBoard.userPermissionsRemoveMemberText": "Remove member",
"ShareBoard.userPermissionsYouText": "(You)",
"ShareTemplate.Title": "Share Template",
"ShareTemplate.searchPlaceholder": "Search for people",
"Sidebar.about": "About Focalboard",
"Sidebar.add-board": "+ Add board",
"Sidebar.changePassword": "Change password",

View file

@ -2379,7 +2379,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard template and cli
class=" css-14el2xx-placeholder"
id="react-select-14-placeholder"
>
Search for people and channels
Search for people
</div>
<div
class=" css-ox1y69-Input"
@ -2573,7 +2573,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard template and cli
class=" css-14el2xx-placeholder"
id="react-select-14-placeholder"
>
Search for people and channels
Search for people
</div>
<div
class=" css-ox1y69-Input"
@ -4185,7 +4185,7 @@ exports[`src/components/shareBoard/shareBoard should match snapshot, with templa
class=" css-14el2xx-placeholder"
id="react-select-13-placeholder"
>
Search for people and channels
Search for people
</div>
<div
class=" css-ox1y69-Input"

View file

@ -709,7 +709,7 @@ describe('src/components/shareBoard/shareBoard', () => {
})
expect(container).toMatchSnapshot()
const selectElement = screen.getByText('Search for people and channels')
const selectElement = screen.getByText('Search for people')
expect(selectElement).toBeDefined()
await act(async () => {

View file

@ -389,7 +389,10 @@ 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 and channels'})}
placeholder={board.isTemplate ?
intl.formatMessage({id: 'ShareTemplate.searchPlaceholder', defaultMessage: 'Search for people'}) :
intl.formatMessage({id: 'ShareBoard.searchPlaceholder', defaultMessage: 'Search for people and channels'})
}
onChange={(newValue) => {
if (newValue && (newValue as IUser).username) {
mutator.createBoardMember(boardId, newValue.id)