1
0
mirror of https://github.com/mattermost/focalboard.git synced 2024-12-24 13:43:12 +02:00

Upgrading to react-select 5 (#2651)

* Upgrading to react-select 5

* fixing type problems

* Fixing not-logged in redirect
This commit is contained in:
Jesús Espino 2022-03-29 10:14:57 +02:00 committed by GitHub
parent efb8caf88f
commit c336f06f19
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
17 changed files with 504 additions and 378 deletions

View File

@ -11,7 +11,7 @@ describe('Login actions', () => {
cy.log('**Redirects to error then login page**')
cy.visit('/')
cy.location('pathname').should('eq', '/error')
cy.get('button').contains('Log in').click()
cy.get('button').contains('Login').click()
cy.location('pathname').should('eq', '/login')
cy.get('.LoginPage').contains('Log in')
cy.get('#login-username').should('exist')

View File

@ -46,7 +46,7 @@
"react-intl": "^5.24.7",
"react-redux": "^7.2.6",
"react-router-dom": "^5.2.1",
"react-select": "^4.3.0",
"react-select": "^5.2.2",
"trim-newlines": "^4.0.2"
},
"devDependencies": {
@ -69,7 +69,7 @@
"@types/react-intl": "^3.0.0",
"@types/react-redux": "^7.1.23",
"@types/react-router-dom": "^5.3.3",
"@types/react-select": "^4.0.13",
"@types/react-select": "^5.0.0",
"@types/redux-mock-store": "^1.0.3",
"@typescript-eslint/eslint-plugin": "^5.16.0",
"@typescript-eslint/parser": "^5.16.0",
@ -2653,22 +2653,19 @@
}
},
"node_modules/@types/react-select": {
"version": "4.0.18",
"resolved": "https://registry.npmjs.org/@types/react-select/-/react-select-4.0.18.tgz",
"integrity": "sha512-uCPRMPshd96BwHuT7oCrFduiv5d6km3VwmtW7rVl9g4XetS3VoJ9nZo540LiwtQgaFcW96POwaxQDZDAyYaepg==",
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@types/react-select/-/react-select-5.0.1.tgz",
"integrity": "sha512-h5Im0AP0dr4AVeHtrcvQrLV+gmPa7SA0AGdxl2jOhtwiE6KgXBFSogWw8az32/nusE6AQHlCOHQWjP1S/+oMWA==",
"deprecated": "This is a stub types definition. react-select provides its own type definitions, so you do not need this installed.",
"dev": true,
"dependencies": {
"@emotion/serialize": "^1.0.0",
"@types/react": "*",
"@types/react-dom": "*",
"@types/react-transition-group": "*"
"react-select": "*"
}
},
"node_modules/@types/react-transition-group": {
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz",
"integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==",
"dev": true,
"dependencies": {
"@types/react": "*"
}
@ -13241,17 +13238,6 @@
"react": "*"
}
},
"node_modules/react-input-autosize": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-3.0.0.tgz",
"integrity": "sha512-nL9uS7jEs/zu8sqwFE5MAPx6pPkNAriACQ2rGLlqmKr2sPGtN7TXTyDdQt4lbNXVx7Uzadb40x8qotIuru6Rhg==",
"dependencies": {
"prop-types": "^15.5.8"
},
"peerDependencies": {
"react": "^16.3.0 || ^17.0.0"
}
},
"node_modules/react-intl": {
"version": "5.24.7",
"resolved": "https://registry.npmjs.org/react-intl/-/react-intl-5.24.7.tgz",
@ -13368,16 +13354,16 @@
}
},
"node_modules/react-select": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/react-select/-/react-select-4.3.1.tgz",
"integrity": "sha512-HBBd0dYwkF5aZk1zP81Wx5UsLIIT2lSvAY2JiJo199LjoLHoivjn9//KsmvQMEFGNhe58xyuOITjfxKCcGc62Q==",
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/react-select/-/react-select-5.2.2.tgz",
"integrity": "sha512-miGS2rT1XbFNjduMZT+V73xbJEeMzVkJOz727F6MeAr2hKE0uUSA8Ff7vD44H32x2PD3SRB6OXTY/L+fTV3z9w==",
"dependencies": {
"@babel/runtime": "^7.12.0",
"@emotion/cache": "^11.4.0",
"@emotion/react": "^11.1.1",
"@types/react-transition-group": "^4.4.0",
"memoize-one": "^5.0.0",
"prop-types": "^15.6.0",
"react-input-autosize": "^3.0.0",
"react-transition-group": "^4.3.0"
},
"peerDependencies": {
@ -18472,22 +18458,18 @@
}
},
"@types/react-select": {
"version": "4.0.18",
"resolved": "https://registry.npmjs.org/@types/react-select/-/react-select-4.0.18.tgz",
"integrity": "sha512-uCPRMPshd96BwHuT7oCrFduiv5d6km3VwmtW7rVl9g4XetS3VoJ9nZo540LiwtQgaFcW96POwaxQDZDAyYaepg==",
"version": "5.0.1",
"resolved": "https://registry.npmjs.org/@types/react-select/-/react-select-5.0.1.tgz",
"integrity": "sha512-h5Im0AP0dr4AVeHtrcvQrLV+gmPa7SA0AGdxl2jOhtwiE6KgXBFSogWw8az32/nusE6AQHlCOHQWjP1S/+oMWA==",
"dev": true,
"requires": {
"@emotion/serialize": "^1.0.0",
"@types/react": "*",
"@types/react-dom": "*",
"@types/react-transition-group": "*"
"react-select": "*"
}
},
"@types/react-transition-group": {
"version": "4.4.4",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.4.tgz",
"integrity": "sha512-7gAPz7anVK5xzbeQW9wFBDg7G++aPLAFY0QaSMOou9rJZpbuI58WAuJrgu+qR92l61grlnCUe7AFX8KGahAgug==",
"dev": true,
"requires": {
"@types/react": "*"
}
@ -26455,14 +26437,6 @@
"integrity": "sha512-cB10MXLTs3gVuXimblAdI71jrJx8njrJZmNMEMC+sQu5B/BIOmlsAjskdqpn81y8UBVEGuHODd7/ci5DvoSzTQ==",
"requires": {}
},
"react-input-autosize": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/react-input-autosize/-/react-input-autosize-3.0.0.tgz",
"integrity": "sha512-nL9uS7jEs/zu8sqwFE5MAPx6pPkNAriACQ2rGLlqmKr2sPGtN7TXTyDdQt4lbNXVx7Uzadb40x8qotIuru6Rhg==",
"requires": {
"prop-types": "^15.5.8"
}
},
"react-intl": {
"version": "5.24.7",
"resolved": "https://registry.npmjs.org/react-intl/-/react-intl-5.24.7.tgz",
@ -26553,16 +26527,16 @@
}
},
"react-select": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/react-select/-/react-select-4.3.1.tgz",
"integrity": "sha512-HBBd0dYwkF5aZk1zP81Wx5UsLIIT2lSvAY2JiJo199LjoLHoivjn9//KsmvQMEFGNhe58xyuOITjfxKCcGc62Q==",
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/react-select/-/react-select-5.2.2.tgz",
"integrity": "sha512-miGS2rT1XbFNjduMZT+V73xbJEeMzVkJOz727F6MeAr2hKE0uUSA8Ff7vD44H32x2PD3SRB6OXTY/L+fTV3z9w==",
"requires": {
"@babel/runtime": "^7.12.0",
"@emotion/cache": "^11.4.0",
"@emotion/react": "^11.1.1",
"@types/react-transition-group": "^4.4.0",
"memoize-one": "^5.0.0",
"prop-types": "^15.6.0",
"react-input-autosize": "^3.0.0",
"react-transition-group": "^4.3.0"
}
},

View File

@ -61,7 +61,7 @@
"react-intl": "^5.24.7",
"react-redux": "^7.2.6",
"react-router-dom": "^5.2.1",
"react-select": "^4.3.0",
"react-select": "^5.2.2",
"trim-newlines": "^4.0.2"
},
"jest": {
@ -108,7 +108,7 @@
"@types/react-intl": "^3.0.0",
"@types/react-redux": "^7.1.23",
"@types/react-router-dom": "^5.3.3",
"@types/react-select": "^4.0.13",
"@types/react-select": "^5.0.0",
"@types/redux-mock-store": "^1.0.3",
"@typescript-eslint/eslint-plugin": "^5.16.0",
"@typescript-eslint/parser": "^5.16.0",

View File

@ -86,8 +86,12 @@ exports[`components/calculations/Calculation should match snapshot - option chan
>
<div>
<div
class="CalculationOptions css-2b097c-container"
class="CalculationOptions css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-2-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -101,15 +105,21 @@ exports[`components/calculations/Calculation should match snapshot - option chan
class="CalculationOptions__value-container CalculationOptions__value-container--has-value css-1mxrbau-ValueContainer"
>
<div
class="CalculationOptions__single-value css-1brck82-singleValue"
class="CalculationOptions__single-value css-1qlwihv-singleValue"
>
Calculate
</div>
<input
aria-autocomplete="list"
class="css-wmatm6-dummyInput-DummyInput"
aria-controls="react-select-2-listbox"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-2-listbox"
aria-readonly="true"
class="css-mohuvp-dummyInput-DummyInput"
id="react-select-2-input"
readonly=""
inputmode="none"
role="combobox"
tabindex="0"
value=""
/>

View File

@ -3,8 +3,12 @@
exports[`components/calculations/Options should match snapshot 1`] = `
<div>
<div
class="CalculationOptions css-2b097c-container"
class="CalculationOptions css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-2-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -18,15 +22,21 @@ exports[`components/calculations/Options should match snapshot 1`] = `
class="CalculationOptions__value-container CalculationOptions__value-container--has-value css-1mxrbau-ValueContainer"
>
<div
class="CalculationOptions__single-value css-1brck82-singleValue"
class="CalculationOptions__single-value css-1qlwihv-singleValue"
>
Calculate
</div>
<input
aria-autocomplete="list"
class="css-wmatm6-dummyInput-DummyInput"
aria-controls="react-select-2-listbox"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-2-listbox"
aria-readonly="true"
class="css-mohuvp-dummyInput-DummyInput"
id="react-select-2-input"
readonly=""
inputmode="none"
role="combobox"
tabindex="0"
value=""
/>
@ -76,8 +86,12 @@ exports[`components/calculations/Options should match snapshot 1`] = `
exports[`components/calculations/Options should match snapshot menu open 1`] = `
<div>
<div
class="CalculationOptions css-2b097c-container"
class="CalculationOptions css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-3-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -91,15 +105,21 @@ exports[`components/calculations/Options should match snapshot menu open 1`] = `
class="CalculationOptions__value-container CalculationOptions__value-container--has-value css-1mxrbau-ValueContainer"
>
<div
class="CalculationOptions__single-value css-1brck82-singleValue"
class="CalculationOptions__single-value css-1qlwihv-singleValue"
>
Calculate
</div>
<input
aria-autocomplete="list"
class="css-wmatm6-dummyInput-DummyInput"
aria-controls="react-select-3-listbox"
aria-expanded="true"
aria-haspopup="true"
aria-owns="react-select-3-listbox"
aria-readonly="true"
class="css-mohuvp-dummyInput-DummyInput"
id="react-select-3-input"
readonly=""
inputmode="none"
role="combobox"
tabindex="0"
value=""
/>
@ -139,11 +159,13 @@ exports[`components/calculations/Options should match snapshot menu open 1`] = `
</div>
<div
class="CalculationOptions__menu css-1rsmi4x-menu"
id="react-select-3-listbox"
>
<div
class="CalculationOptions__menu-list css-g29tl0-MenuList"
>
<div
aria-disabled="false"
class="CalculationOptions__option css-14xsrqy-option"
id="react-select-3-option-0"
tabindex="-1"
@ -151,6 +173,7 @@ exports[`components/calculations/Options should match snapshot menu open 1`] = `
Count
</div>
<div
aria-disabled="false"
class="CalculationOptions__option css-14xsrqy-option"
id="react-select-3-option-1"
tabindex="-1"

View File

@ -2,7 +2,7 @@
// See LICENSE.txt for license information.
import React from 'react'
import Select, {components, IndicatorProps} from 'react-select'
import Select, {components, DropdownIndicatorProps} from 'react-select'
import {CSSObject} from '@emotion/serialize'
@ -151,7 +151,7 @@ const styles = {
}),
}
const DropdownIndicator = (props: IndicatorProps<Option, false>) => {
const DropdownIndicator = (props: DropdownIndicatorProps<Option, false>) => {
return (
<components.DropdownIndicator {...props}>
<ChevronUp/>

View File

@ -329,8 +329,12 @@ exports[`src/component/kanban/kanban return kanban and click on KanbanCalculatio
</span>
</button>
<div
class="CalculationOptions css-2b097c-container"
class="CalculationOptions css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-2-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -344,15 +348,21 @@ exports[`src/component/kanban/kanban return kanban and click on KanbanCalculatio
class="CalculationOptions__value-container CalculationOptions__value-container--has-value css-1mxrbau-ValueContainer"
>
<div
class="CalculationOptions__single-value css-1brck82-singleValue"
class="CalculationOptions__single-value css-1qlwihv-singleValue"
>
Count
</div>
<input
aria-autocomplete="list"
class="css-wmatm6-dummyInput-DummyInput"
aria-controls="react-select-2-listbox"
aria-expanded="true"
aria-haspopup="true"
aria-owns="react-select-2-listbox"
aria-readonly="true"
class="css-mohuvp-dummyInput-DummyInput"
id="react-select-2-input"
readonly=""
inputmode="none"
role="combobox"
tabindex="0"
value=""
/>
@ -392,6 +402,7 @@ exports[`src/component/kanban/kanban return kanban and click on KanbanCalculatio
</div>
<div
class="CalculationOptions__menu css-1rsmi4x-menu"
id="react-select-2-listbox"
>
<div
class="CalculationOptions__menu-list css-g29tl0-MenuList"

View File

@ -33,8 +33,12 @@ exports[`components/kanban/calculation/KanbanCalculation calculations menu open
</span>
</button>
<div
class="CalculationOptions css-2b097c-container"
class="CalculationOptions css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-2-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -48,15 +52,21 @@ exports[`components/kanban/calculation/KanbanCalculation calculations menu open
class="CalculationOptions__value-container CalculationOptions__value-container--has-value css-1mxrbau-ValueContainer"
>
<div
class="CalculationOptions__single-value css-1brck82-singleValue"
class="CalculationOptions__single-value css-1qlwihv-singleValue"
>
Count
</div>
<input
aria-autocomplete="list"
class="css-wmatm6-dummyInput-DummyInput"
aria-controls="react-select-2-listbox"
aria-expanded="true"
aria-haspopup="true"
aria-owns="react-select-2-listbox"
aria-readonly="true"
class="css-mohuvp-dummyInput-DummyInput"
id="react-select-2-input"
readonly=""
inputmode="none"
role="combobox"
tabindex="0"
value=""
/>
@ -96,6 +106,7 @@ exports[`components/kanban/calculation/KanbanCalculation calculations menu open
</div>
<div
class="CalculationOptions__menu css-1rsmi4x-menu"
id="react-select-2-listbox"
>
<div
class="CalculationOptions__menu-list css-g29tl0-MenuList"

View File

@ -3,8 +3,12 @@
exports[`components/kanban/calculations/KanbanCalculationOptions base case 1`] = `
<div>
<div
class="CalculationOptions css-2b097c-container"
class="CalculationOptions css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-2-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -18,15 +22,21 @@ exports[`components/kanban/calculations/KanbanCalculationOptions base case 1`] =
class="CalculationOptions__value-container CalculationOptions__value-container--has-value css-1mxrbau-ValueContainer"
>
<div
class="CalculationOptions__single-value css-1brck82-singleValue"
class="CalculationOptions__single-value css-1qlwihv-singleValue"
>
Count
</div>
<input
aria-autocomplete="list"
class="css-wmatm6-dummyInput-DummyInput"
aria-controls="react-select-2-listbox"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-2-listbox"
aria-readonly="true"
class="css-mohuvp-dummyInput-DummyInput"
id="react-select-2-input"
readonly=""
inputmode="none"
role="combobox"
tabindex="0"
value=""
/>
@ -76,8 +86,12 @@ exports[`components/kanban/calculations/KanbanCalculationOptions base case 1`] =
exports[`components/kanban/calculations/KanbanCalculationOptions with menu open 1`] = `
<div>
<div
class="CalculationOptions css-2b097c-container"
class="CalculationOptions css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-3-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -91,15 +105,21 @@ exports[`components/kanban/calculations/KanbanCalculationOptions with menu open
class="CalculationOptions__value-container CalculationOptions__value-container--has-value css-1mxrbau-ValueContainer"
>
<div
class="CalculationOptions__single-value css-1brck82-singleValue"
class="CalculationOptions__single-value css-1qlwihv-singleValue"
>
Count
</div>
<input
aria-autocomplete="list"
class="css-wmatm6-dummyInput-DummyInput"
aria-controls="react-select-3-listbox"
aria-expanded="true"
aria-haspopup="true"
aria-owns="react-select-3-listbox"
aria-readonly="true"
class="css-mohuvp-dummyInput-DummyInput"
id="react-select-3-input"
readonly=""
inputmode="none"
role="combobox"
tabindex="0"
value=""
/>
@ -139,6 +159,7 @@ exports[`components/kanban/calculations/KanbanCalculationOptions with menu open
</div>
<div
class="CalculationOptions__menu css-1rsmi4x-menu"
id="react-select-3-listbox"
>
<div
class="CalculationOptions__menu-list css-g29tl0-MenuList"
@ -231,8 +252,12 @@ exports[`components/kanban/calculations/KanbanCalculationOptions with menu open
exports[`components/kanban/calculations/KanbanCalculationOptions with submenu open 1`] = `
<div>
<div
class="CalculationOptions css-2b097c-container"
class="CalculationOptions css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-4-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -246,15 +271,21 @@ exports[`components/kanban/calculations/KanbanCalculationOptions with submenu op
class="CalculationOptions__value-container CalculationOptions__value-container--has-value css-1mxrbau-ValueContainer"
>
<div
class="CalculationOptions__single-value css-1brck82-singleValue"
class="CalculationOptions__single-value css-1qlwihv-singleValue"
>
Count
</div>
<input
aria-autocomplete="list"
class="css-wmatm6-dummyInput-DummyInput"
aria-controls="react-select-4-listbox"
aria-expanded="true"
aria-haspopup="true"
aria-owns="react-select-4-listbox"
aria-readonly="true"
class="css-mohuvp-dummyInput-DummyInput"
id="react-select-4-input"
readonly=""
inputmode="none"
role="combobox"
tabindex="0"
value=""
/>
@ -294,6 +325,7 @@ exports[`components/kanban/calculations/KanbanCalculationOptions with submenu op
</div>
<div
class="CalculationOptions__menu css-1rsmi4x-menu"
id="react-select-4-listbox"
>
<div
class="CalculationOptions__menu-list css-g29tl0-MenuList"

View File

@ -93,7 +93,7 @@ describe('components/properties/multiSelect', () => {
userEvent.click(screen.getByTestId(nonEditableMultiSelectTestId))
expect(screen.getByRole('textbox', {name: /value selector/i})).toBeInTheDocument()
expect(screen.getByRole('combobox', {name: /value selector/i})).toBeInTheDocument()
})
it('can select a option', async () => {
@ -118,7 +118,7 @@ describe('components/properties/multiSelect', () => {
userEvent.click(screen.getByTestId(nonEditableMultiSelectTestId))
userEvent.type(screen.getByRole('textbox', {name: /value selector/i}), 'b{enter}')
userEvent.type(screen.getByRole('combobox', {name: /value selector/i}), 'b{enter}')
expect(onChange).toHaveBeenCalledWith(['multi-option-1', 'multi-option-2'])
})
@ -175,7 +175,7 @@ describe('components/properties/multiSelect', () => {
userEvent.click(screen.getByTestId(nonEditableMultiSelectTestId))
userEvent.type(screen.getByRole('textbox', {name: /value selector/i}), 'new-value{enter}')
userEvent.type(screen.getByRole('combobox', {name: /value selector/i}), 'new-value{enter}')
const selectedValues = propertyTemplate.options.filter((option: IPropertyOption) => propertyValue.includes(option.id))

View File

@ -186,7 +186,7 @@ describe('components/properties/select', () => {
))
userEvent.click(screen.getByTestId(nonEditableSelectTestId))
userEvent.type(screen.getByRole('textbox', {name: /value selector/i}), `${newOption}{enter}`)
userEvent.type(screen.getByRole('combobox', {name: /value selector/i}), `${newOption}{enter}`)
expect(onCreate).toHaveBeenCalledWith(newOption)
})

View File

@ -3,8 +3,12 @@
exports[`components/properties/user not readonly 1`] = `
<div>
<div
class="UserProperty css-2b097c-container"
class="UserProperty css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-3-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -15,10 +19,10 @@ exports[`components/properties/user not readonly 1`] = `
class="react-select__control css-18140j1-Control"
>
<div
class="react-select__value-container react-select__value-container--has-value css-o7cxt9-ValueContainer"
class="react-select__value-container react-select__value-container--has-value css-433wy7-ValueContainer"
>
<div
class="react-select__single-value css-14cfm31-singleValue"
class="react-select__single-value css-1lixa2z-singleValue"
>
<div
class="UserProperty-item"
@ -27,28 +31,27 @@ exports[`components/properties/user not readonly 1`] = `
</div>
</div>
<div
class="css-1shkodo-Input"
class="react-select__input-container css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-3-listbox"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-3-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="react-select__input"
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-3-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-3-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -100,8 +103,12 @@ exports[`components/properties/user not readonly 1`] = `
exports[`components/properties/user not readonly not existing user 1`] = `
<div>
<div
class="UserProperty css-2b097c-container"
class="UserProperty css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-2-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -112,36 +119,37 @@ exports[`components/properties/user not readonly not existing user 1`] = `
class="react-select__control css-18140j1-Control"
>
<div
class="react-select__value-container css-o7cxt9-ValueContainer"
class="react-select__value-container css-433wy7-ValueContainer"
>
<div
class="react-select__placeholder css-1wa3eu0-placeholder"
class="react-select__placeholder css-14el2xx-placeholder"
id="react-select-2-placeholder"
>
Empty
</div>
<div
class="css-1shkodo-Input"
class="react-select__input-container css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-2-listbox"
aria-describedby="react-select-2-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-2-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="react-select__input"
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-2-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-2-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -190,8 +198,12 @@ exports[`components/properties/user readonly view 1`] = `
exports[`components/properties/user user dropdown open 1`] = `
<div>
<div
class="UserProperty css-2b097c-container"
class="UserProperty css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-4-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -211,10 +223,10 @@ exports[`components/properties/user user dropdown open 1`] = `
class="react-select__control react-select__control--is-focused react-select__control--menu-is-open css-18140j1-Control"
>
<div
class="react-select__value-container react-select__value-container--has-value css-o7cxt9-ValueContainer"
class="react-select__value-container react-select__value-container--has-value css-433wy7-ValueContainer"
>
<div
class="react-select__single-value css-14cfm31-singleValue"
class="react-select__single-value css-1lixa2z-singleValue"
>
<div
class="UserProperty-item"
@ -223,28 +235,27 @@ exports[`components/properties/user user dropdown open 1`] = `
</div>
</div>
<div
class="css-1shkodo-Input"
class="react-select__input-container css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-4-listbox"
aria-expanded="true"
aria-haspopup="true"
aria-owns="react-select-4-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class="react-select__input"
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-4-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-4-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -291,11 +302,13 @@ exports[`components/properties/user user dropdown open 1`] = `
</div>
<div
class="react-select__menu css-10b6da7-menu"
id="react-select-4-listbox"
>
<div
class="react-select__menu-list css-g29tl0-MenuList"
>
<div
aria-disabled="false"
class="react-select__option react-select__option--is-focused react-select__option--is-selected css-10e3bcm-option"
id="react-select-4-option-0"
tabindex="-1"

View File

@ -127,7 +127,7 @@ describe('components/properties/user', () => {
if (container) {
// this is the actual element where the click event triggers
// opening of the dropdown
const userProperty = container.querySelector('.UserProperty > div > div:nth-child(1) > div:nth-child(2) > div > input')
const userProperty = container.querySelector('.UserProperty > div > div:nth-child(1) > div:nth-child(2) > input')
expect(userProperty).not.toBeNull()
act(() => {

View File

@ -44,8 +44,12 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l
class="CompassIcon icon-magnify MagnifyIcon"
/>
<div
class="userSearchInput css-2b097c-container"
class="userSearchInput css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-4-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -56,36 +60,37 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l
class=" css-1wmrr75-Control"
>
<div
class=" css-kpfmlq-ValueContainer"
class=" css-30zlo3-ValueContainer"
>
<div
class=" css-1wa3eu0-placeholder"
class=" css-14el2xx-placeholder"
id="react-select-4-placeholder"
>
Select...
</div>
<div
class="css-1shkodo-Input"
class=" css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-4-listbox"
aria-describedby="react-select-4-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-4-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class=""
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-4-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-4-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -96,7 +101,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l
class=" css-byrije-loadingIndicator"
>
<span
class="css-1yvy2vo-LoadingDot"
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"
@ -263,8 +268,12 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l
class="CompassIcon icon-magnify MagnifyIcon"
/>
<div
class="userSearchInput css-2b097c-container"
class="userSearchInput css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-4-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -275,36 +284,37 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l
class=" css-1wmrr75-Control"
>
<div
class=" css-kpfmlq-ValueContainer"
class=" css-30zlo3-ValueContainer"
>
<div
class=" css-1wa3eu0-placeholder"
class=" css-14el2xx-placeholder"
id="react-select-4-placeholder"
>
Select...
</div>
<div
class="css-1shkodo-Input"
class=" css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-4-listbox"
aria-describedby="react-select-4-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-4-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class=""
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-4-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-4-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -315,7 +325,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Copy l
class=" css-byrije-loadingIndicator"
>
<span
class="css-1yvy2vo-LoadingDot"
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"
@ -482,8 +492,12 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Regene
class="CompassIcon icon-magnify MagnifyIcon"
/>
<div
class="userSearchInput css-2b097c-container"
class="userSearchInput css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-5-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -494,36 +508,37 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Regene
class=" css-1wmrr75-Control"
>
<div
class=" css-kpfmlq-ValueContainer"
class=" css-30zlo3-ValueContainer"
>
<div
class=" css-1wa3eu0-placeholder"
class=" css-14el2xx-placeholder"
id="react-select-5-placeholder"
>
Select...
</div>
<div
class="css-1shkodo-Input"
class=" css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-5-listbox"
aria-describedby="react-select-5-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-5-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class=""
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-5-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-5-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -534,7 +549,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard and click Regene
class=" css-byrije-loadingIndicator"
>
<span
class="css-1yvy2vo-LoadingDot"
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"
@ -724,8 +739,12 @@ exports[`src/components/shareBoard/shareBoard return shareBoard, and click switc
class="CompassIcon icon-magnify MagnifyIcon"
/>
<div
class="userSearchInput css-2b097c-container"
class="userSearchInput css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-6-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -736,36 +755,37 @@ exports[`src/components/shareBoard/shareBoard return shareBoard, and click switc
class=" css-1wmrr75-Control"
>
<div
class=" css-kpfmlq-ValueContainer"
class=" css-30zlo3-ValueContainer"
>
<div
class=" css-1wa3eu0-placeholder"
class=" css-14el2xx-placeholder"
id="react-select-6-placeholder"
>
Select...
</div>
<div
class="css-1shkodo-Input"
class=" css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-6-listbox"
aria-describedby="react-select-6-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-6-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class=""
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-6-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-6-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -776,7 +796,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoard, and click switc
class=" css-byrije-loadingIndicator"
>
<span
class="css-1yvy2vo-LoadingDot"
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"
@ -966,8 +986,12 @@ exports[`src/components/shareBoard/shareBoard return shareBoardComponent and cli
class="CompassIcon icon-magnify MagnifyIcon"
/>
<div
class="userSearchInput css-2b097c-container"
class="userSearchInput css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-7-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -978,36 +1002,37 @@ exports[`src/components/shareBoard/shareBoard return shareBoardComponent and cli
class=" css-1wmrr75-Control"
>
<div
class=" css-kpfmlq-ValueContainer"
class=" css-30zlo3-ValueContainer"
>
<div
class=" css-1wa3eu0-placeholder"
class=" css-14el2xx-placeholder"
id="react-select-7-placeholder"
>
Select...
</div>
<div
class="css-1shkodo-Input"
class=" css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-7-listbox"
aria-describedby="react-select-7-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-7-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class=""
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-7-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-7-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -1018,7 +1043,7 @@ exports[`src/components/shareBoard/shareBoard return shareBoardComponent and cli
class=" css-byrije-loadingIndicator"
>
<span
class="css-1yvy2vo-LoadingDot"
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"
@ -1208,8 +1233,12 @@ exports[`src/components/shareBoard/shareBoard should match snapshot 1`] = `
class="CompassIcon icon-magnify MagnifyIcon"
/>
<div
class="userSearchInput css-2b097c-container"
class="userSearchInput css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-2-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -1220,36 +1249,37 @@ exports[`src/components/shareBoard/shareBoard should match snapshot 1`] = `
class=" css-1wmrr75-Control"
>
<div
class=" css-kpfmlq-ValueContainer"
class=" css-30zlo3-ValueContainer"
>
<div
class=" css-1wa3eu0-placeholder"
class=" css-14el2xx-placeholder"
id="react-select-2-placeholder"
>
Select...
</div>
<div
class="css-1shkodo-Input"
class=" css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-2-listbox"
aria-describedby="react-select-2-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-2-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class=""
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-2-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-2-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -1260,7 +1290,7 @@ exports[`src/components/shareBoard/shareBoard should match snapshot 1`] = `
class=" css-byrije-loadingIndicator"
>
<span
class="css-1yvy2vo-LoadingDot"
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"
@ -1427,8 +1457,12 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class="CompassIcon icon-magnify MagnifyIcon"
/>
<div
class="userSearchInput css-2b097c-container"
class="userSearchInput css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-3-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -1439,36 +1473,37 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class=" css-1wmrr75-Control"
>
<div
class=" css-kpfmlq-ValueContainer"
class=" css-30zlo3-ValueContainer"
>
<div
class=" css-1wa3eu0-placeholder"
class=" css-14el2xx-placeholder"
id="react-select-3-placeholder"
>
Select...
</div>
<div
class="css-1shkodo-Input"
class=" css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-3-listbox"
aria-describedby="react-select-3-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-3-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class=""
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-3-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-3-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -1479,7 +1514,7 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class=" css-byrije-loadingIndicator"
>
<span
class="css-1yvy2vo-LoadingDot"
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"
@ -1646,8 +1681,12 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class="CompassIcon icon-magnify MagnifyIcon"
/>
<div
class="userSearchInput css-2b097c-container"
class="userSearchInput css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-9-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -1658,36 +1697,37 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class=" css-1wmrr75-Control"
>
<div
class=" css-kpfmlq-ValueContainer"
class=" css-30zlo3-ValueContainer"
>
<div
class=" css-1wa3eu0-placeholder"
class=" css-14el2xx-placeholder"
id="react-select-9-placeholder"
>
Select...
</div>
<div
class="css-1shkodo-Input"
class=" css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-9-listbox"
aria-describedby="react-select-9-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-9-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class=""
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-9-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-9-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -1698,7 +1738,7 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class=" css-byrije-loadingIndicator"
>
<span
class="css-1yvy2vo-LoadingDot"
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"
@ -1865,8 +1905,12 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class="CompassIcon icon-magnify MagnifyIcon"
/>
<div
class="userSearchInput css-2b097c-container"
class="userSearchInput css-b62m3t-container"
>
<span
class="css-1f43avz-a11yText-A11yText"
id="react-select-8-live-region"
/>
<span
aria-atomic="false"
aria-live="polite"
@ -1877,36 +1921,37 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class=" css-1wmrr75-Control"
>
<div
class=" css-kpfmlq-ValueContainer"
class=" css-30zlo3-ValueContainer"
>
<div
class=" css-1wa3eu0-placeholder"
class=" css-14el2xx-placeholder"
id="react-select-8-placeholder"
>
Select...
</div>
<div
class="css-1shkodo-Input"
class=" css-ox1y69-Input"
data-value=""
>
<div
<input
aria-autocomplete="list"
aria-controls="react-select-8-listbox"
aria-describedby="react-select-8-placeholder"
aria-expanded="false"
aria-haspopup="true"
aria-owns="react-select-8-listbox"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
class=""
style="display: inline-block;"
>
<input
aria-autocomplete="list"
autocapitalize="none"
autocomplete="off"
autocorrect="off"
id="react-select-8-input"
spellcheck="false"
style="box-sizing: content-box; width: 2px; border: 0px; opacity: 1; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
<div
style="position: absolute; top: 0px; left: 0px; visibility: hidden; height: 0px; overflow: scroll; white-space: pre; font-family: -webkit-small-control; letter-spacing: normal; text-transform: none;"
/>
</div>
id="react-select-8-input"
role="combobox"
spellcheck="false"
style="opacity: 1; width: 100%; grid-area: 1 / 2; min-width: 2px; border: 0px; margin: 0px; outline: 0; padding: 0px;"
tabindex="0"
type="text"
value=""
/>
</div>
</div>
<div
@ -1917,7 +1962,7 @@ exports[`src/components/shareBoard/shareBoard should match snapshot with sharing
class=" css-byrije-loadingIndicator"
>
<span
class="css-1yvy2vo-LoadingDot"
class="css-1xtdfmb-LoadingDot"
/>
<span
class="css-zoievk-LoadingDot"

View File

@ -263,7 +263,7 @@ export default function ShareBoardDialog(props: Props): JSX.Element {
value={selectedUser}
className={'userSearchInput'}
cacheOptions={true}
loadOptions={(inputValue) => client.searchTeamUsers(inputValue)}
loadOptions={(inputValue: string) => client.searchTeamUsers(inputValue)}
components={{DropdownIndicator: () => null, IndicatorSeparator: () => null}}
defaultOptions={true}
getOptionValue={(u) => u.id}

View File

@ -12,7 +12,8 @@ import {RootState} from './index'
export const initialLoad = createAsyncThunk(
'initialLoad',
async () => {
const [team, teams, boards, boardsMemberships, boardTemplates] = await Promise.all([
const [me, team, teams, boards, boardsMemberships, boardTemplates] = await Promise.all([
client.getMe(),
client.getTeam(),
client.getTeams(),
client.getBoards(),
@ -20,6 +21,11 @@ export const initialLoad = createAsyncThunk(
client.getTeamTemplates(),
])
// if no me, normally user not logged in
if (!me) {
throw new Error(ErrorId.NotLoggedIn)
}
// if no team, either bad id, or user doesn't have access
if (!team) {
throw new Error(ErrorId.TeamUndefined)

View File

@ -2,7 +2,8 @@
// See LICENSE.txt for license information.
import React from 'react'
import {useIntl} from 'react-intl'
import {ActionMeta, FormatOptionLabelMeta, ValueType} from 'react-select'
import {ActionMeta, OnChangeValue} from 'react-select'
import {FormatOptionLabelMeta} from 'react-select/base'
import CreatableSelect from 'react-select/creatable'
import {CSSObject} from '@emotion/serialize'
@ -37,7 +38,7 @@ type Props = {
type LabelProps = {
option: IPropertyOption
meta: FormatOptionLabelMeta<IPropertyOption, true | false>
meta: FormatOptionLabelMeta<IPropertyOption>
onChangeColor: (option: IPropertyOption, color: string) => void
onDeleteOption: (option: IPropertyOption) => void
onDeleteValue?: (value: IPropertyOption) => void
@ -163,7 +164,7 @@ function ValueSelector(props: Props): JSX.Element {
isMulti={props.isMulti}
isClearable={true}
styles={valueSelectorStyle}
formatOptionLabel={(option: IPropertyOption, meta: FormatOptionLabelMeta<IPropertyOption, true | false>) => (
formatOptionLabel={(option: IPropertyOption, meta: FormatOptionLabelMeta<IPropertyOption>) => (
<ValueSelectorLabel
option={option}
meta={meta}
@ -178,7 +179,7 @@ function ValueSelector(props: Props): JSX.Element {
options={props.options}
getOptionLabel={(o: IPropertyOption) => o.value}
getOptionValue={(o: IPropertyOption) => o.id}
onChange={(value: ValueType<IPropertyOption, true | false>, action: ActionMeta<IPropertyOption>): void => {
onChange={(value: OnChangeValue<IPropertyOption, true | false>, action: ActionMeta<IPropertyOption>): void => {
if (action.action === 'select-option') {
if (Array.isArray(value)) {
props.onChange((value as IPropertyOption[]).map((option) => option.id))