-
Notifications
You must be signed in to change notification settings - Fork 54
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore(ARCH-482): remove reakit from design-system (#4751)
Let's remove it and assume we can support accessibility if we own the code. add tests to enforce some check around accessibility
- Loading branch information
1 parent
6efd543
commit 9a0732e
Showing
316 changed files
with
6,715 additions
and
2,636 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
--- | ||
'@talend/scripts-core': major | ||
'@talend/scripts-config-jest': major | ||
--- | ||
|
||
- fix: enforce timer at the end of all tests. | ||
- feat: mock ally.js has it uses unsupported dom method from jsdom. | ||
- feat: add jest-axe configuration | ||
|
||
|
||
To support floating-ui/react following issue we have decided to add an afterAll to let floating-ui finish stuff | ||
https://github.com/floating-ui/floating-ui/issues/1908 | ||
|
||
|
||
Breaking changes: | ||
|
||
you may have tests where you ask for jest.useFakeTimer without go back to real at some point. This is a side effect and it is not compatible with our change to support floating-ui. | ||
|
||
```diff | ||
jest.useFakeTimers() | ||
render(<Tooltip><button></Tooltip>) | ||
+jest.useRealTimers() | ||
``` | ||
|
||
This will fix an error said your test is still pending after 5000 ms. | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@talend/scripts-config-storybook-lib': patch | ||
--- | ||
|
||
fix: add keys on all items in the decorators | ||
fix: improve build performance copy/pasted from #4931 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
--- | ||
'@talend/design-system': major | ||
--- | ||
|
||
chore: remove reakit | ||
|
||
* Rewrite components without reakit | ||
* use `@floating-ui/react` for tooltip, popover | ||
* export all types and components from the root | ||
|
||
Breaking changes: | ||
* HTML structure output may have changed | ||
* Some passed props from our component to reakit and not documented as a usage as been removed. If you need a different usage let us knwow, now we own the code | ||
* Tabs props API has been completly changed | ||
|
||
Components changed: | ||
* Accordion (useId) | ||
* Clickable (rewrite) | ||
* Combobox (add as primitive) | ||
* Disclosure (add as primitive) | ||
* Divider (rewrite) | ||
* Drawer (rewrite using `react-transition-group`) | ||
* Dropdown (rewrite using `@floating-ui/react`) | ||
* Form/Affix/Button (typings) | ||
* Form/Affix/Select (useId) | ||
* Form/Field/Datalist (useId) | ||
* Form/Field/InputFile (useId) | ||
* Form/Field/InputToggleSwitch (rewrite) | ||
* Form/Primitives/Checkbox (rewrite) | ||
* Form/Primitives/Field (useId) | ||
* Form/Primitives/Radio (useId) | ||
* Modal (rewrite Dialog as primitive) | ||
* Popover (rewrite using `@floating-ui/react`) | ||
* Switch (rewrite) | ||
* Tabs (rewrite + props changed) | ||
* Tooltip (rewrite using `@floating-ui/react` + API Change) | ||
* VisuallyHidden (rewrite) | ||
|
||
|
||
**Migration Guide** | ||
|
||
* Checkbox component | ||
|
||
Checkbox has two versions now : controlled one and uncontrolled one. | ||
To use controlled version, import Checkbox component and provide `checked` and `onChange` props. | ||
To use uncontrolled version, import UncontrolledCheckbox component and optionally provide `defaultChecked` prop. | ||
|
||
We also change way to import it to be less verbose. | ||
|
||
Old use | ||
``` | ||
import { Form } from '@talend/design-system'; | ||
(...) | ||
<Form.Checkbox (...) /> | ||
``` | ||
New use | ||
``` | ||
import { Checkbox, UncontrolledCheckbox } from '@talend/design-system'; | ||
(...) | ||
<Checkbox checked={isChecked} onChange={changeHandler} (...) /> | ||
<UncontrolledCheckbox defaultChecked={isChecked} (...) /> | ||
``` | ||
* ToggleSwitch component | ||
ToggleSwitch has two versions now : controlled one and uncontrolled one. | ||
To use controlled version, import ToggleSwitch component and provide `checked` and `onChange` props. | ||
To use uncontrolled version, import UncontrolledToggleSwitch component and optionally provide `defaultChecked` prop. | ||
We also change way to import it to be less verbose. | ||
Old use | ||
``` | ||
import { Form } from '@talend/design-system'; | ||
(...) | ||
<Form.ToggleSwitch (...) /> | ||
``` | ||
New use | ||
``` | ||
import { ToggleSwitch, UncontrolledToggleSwitch } from '@talend/design-system'; | ||
(...) | ||
<ToggleSwitch checked={isChecked} onChange={changeHandler} (...) /> | ||
<UncontrolledToggleSwitch defaultChecked={isChecked} (...) /> | ||
``` | ||
* Switch component | ||
`onChange` prop's signature change from | ||
``` | ||
(event: React.MouseEvent<HTMLButtonElement>, value: string) => void | ||
``` | ||
to | ||
``` | ||
(value: string) => void | ||
``` | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@talend/react-components': minor | ||
'@talend/design-system': minor | ||
--- | ||
|
||
feat: upgrade react-is |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@talend/design-system': patch | ||
--- | ||
|
||
fix: some lint errors |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
--- | ||
'@talend/scripts-config-jest': minor | ||
--- | ||
|
||
feat: add api to set a fetch MockResponse | ||
feat: add jest-axe integration |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,5 +9,7 @@ | |
{ | ||
"pattern": "fork/**" | ||
} | ||
] | ||
], | ||
"typescript.validate.enable": true, | ||
"javascript.validate.enable": true | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.