Commit e606408
Luke Bowerman
Dialog Improvements (#1427)
* Major refactor of Dialog, DialogManager, Drawer & useDrawer
- `Dialog`
- now supports all previous `DialogManager` composition capabilities
- can be used in either an "uncontrolled" or "controlled" manner
- _temporarily_ supports optional `content` prop until existing call sites can be updated. `content` will become **required** in next significant release.
- `DialogManager` is deprecated and all existing use cases should be replaced with `Dialog`
- All internal use of `DialogManager` replaced with `Dialog`
- `useDrawer` is nearly a direct pass-through to `useDrawer` with the key exception being `Surface` override
- `Drawer` is nearly a direct pass-through to `Dialog` via `useDrawer` and `DialogRender`
- `useDialog` - all of the power of `Dialog` in a hook!
* Harden test-suite
* Improve storybook examples, rationalize mocks a bit more
* Improve snapshot cropping for Portal components
* Extract DrawerSurface more clearly, fix shadow
* Update DialogSurface references
* Move DOM-mapping of props to useDialog hook
ª Allow button to look "active" based on `aria-expanded` (use this within Dialog)
* Test coverage for "legacy" Dialog user
* Make interface work for "legacy" dialog prop interface as well as
* Keep typing on `controlledIsOpen` consistent
Co-authored-by: mdodgelooker1 parent ae5d49a commit e606408
File tree
55 files changed
+1380
-1242
lines changed- packages
- components-theme-editor/src
- components
- snapshots
- Dialog
- Drawer
- src
- Button
- __snapshots__
- Dialog
- Layout/__snapshots__
- __snapshots__
- stories
- Drawer
- stories
- Link
- __snapshots__
- Portal
- __mocks__
- storybook-config/src
- storybook/src/Dialog
- www/src
- MDX/Pre
- documentation/components/dialogs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
55 files changed
+1380
-1242
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
12 | | - | |
13 | 12 | | |
14 | 13 | | |
| 14 | + | |
| 15 | + | |
15 | 16 | | |
16 | 17 | | |
| 18 | + | |
17 | 19 | | |
18 | | - | |
19 | 20 | | |
20 | 21 | | |
21 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
22 | 37 | | |
23 | 38 | | |
24 | 39 | | |
25 | | - | |
26 | 40 | | |
27 | | - | |
28 | | - | |
29 | 41 | | |
30 | | - | |
31 | | - | |
32 | 42 | | |
33 | 43 | | |
34 | 44 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
24 | 24 | | |
25 | 25 | | |
26 | 26 | | |
27 | | - | |
| 27 | + | |
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
44 | | - | |
| 44 | + | |
45 | 45 | | |
46 | 46 | | |
47 | 47 | | |
| |||
53 | 53 | | |
54 | 54 | | |
55 | 55 | | |
56 | | - | |
| 56 | + | |
57 | 57 | | |
Loading
Loading
Loading
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
41 | 41 | | |
42 | 42 | | |
43 | 43 | | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| 42 | + | |
42 | 43 | | |
43 | 44 | | |
44 | 45 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
67 | 67 | | |
68 | 68 | | |
69 | 69 | | |
| 70 | + | |
70 | 71 | | |
71 | 72 | | |
72 | 73 | | |
| |||
0 commit comments