@gopherium/godmin 0.31.0 → 0.33.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (88) hide show
  1. package/README.md +19 -10
  2. package/dist/admin-root.d.ts +4 -2
  3. package/dist/admin-root.js +6 -3
  4. package/dist/announcer-heading.d.ts +4 -0
  5. package/dist/announcer-heading.js +25 -0
  6. package/dist/base.css +42 -17
  7. package/dist/breakpoints.d.ts +1 -1
  8. package/dist/breakpoints.js +1 -1
  9. package/dist/bulk-run.d.ts +10 -0
  10. package/dist/bulk-run.js +76 -11
  11. package/dist/bulk.d.ts +3 -0
  12. package/dist/confirm-dialog.d.ts +14 -14
  13. package/dist/confirm-dialog.js +9 -28
  14. package/dist/dialog-open.d.ts +77 -0
  15. package/dist/dialog-open.js +231 -0
  16. package/dist/drilldown-item.d.ts +5 -2
  17. package/dist/drilldown-item.js +14 -2
  18. package/dist/filter-offer.d.ts +5 -5
  19. package/dist/filter-offer.js +9 -9
  20. package/dist/focus-back.js +12 -2
  21. package/dist/form-dialog.d.ts +14 -16
  22. package/dist/form-dialog.js +54 -13
  23. package/dist/frame.d.ts +8 -4
  24. package/dist/frame.js +16 -6
  25. package/dist/index.d.ts +13 -13
  26. package/dist/index.js +7 -8
  27. package/dist/list-chrome/es-ES.d.ts +1 -1
  28. package/dist/list-chrome/es-ES.js +11 -8
  29. package/dist/list-chrome/fr-FR.d.ts +1 -1
  30. package/dist/list-chrome/fr-FR.js +10 -1
  31. package/dist/list-run.js +25 -44
  32. package/dist/navigation-item.d.ts +4 -2
  33. package/dist/navigation-item.js +2 -2
  34. package/dist/navigation-screen.js +10 -3
  35. package/dist/navigation.js +5 -1
  36. package/dist/page.d.ts +3 -2
  37. package/dist/page.js +23 -4
  38. package/dist/rejected-field.d.ts +25 -0
  39. package/dist/rejected-field.js +121 -0
  40. package/dist/rename-dialog.d.ts +24 -0
  41. package/dist/rename-dialog.js +16 -0
  42. package/dist/route-not-found.d.ts +5 -0
  43. package/dist/route-not-found.js +12 -0
  44. package/dist/router.d.ts +10 -2
  45. package/dist/router.js +11 -2
  46. package/dist/screen-title.d.ts +52 -0
  47. package/dist/screen-title.js +165 -0
  48. package/dist/stylelint.d.ts +1 -4
  49. package/dist/stylelint.js +4 -7
  50. package/dist/testing.d.ts +2 -2
  51. package/dist/testing.js +3 -3
  52. package/dist/toaster.js +21 -2
  53. package/dist/unsaved-changes-dialog.d.ts +19 -0
  54. package/dist/unsaved-changes-dialog.js +33 -0
  55. package/dist/vite.js +1 -0
  56. package/docs/build-and-versioning.md +199 -11
  57. package/docs/design-system/accessibility.md +23 -12
  58. package/docs/design-system/color.md +1 -1
  59. package/docs/design-system/custom-properties.md +3 -3
  60. package/docs/design-system/dialogs.md +302 -0
  61. package/docs/design-system/frame.md +276 -0
  62. package/docs/design-system/layout.md +25 -17
  63. package/docs/design-system/lists.md +20 -12
  64. package/docs/design-system/loading.md +20 -12
  65. package/docs/design-system/motion.md +41 -46
  66. package/docs/design-system/overview.md +11 -3
  67. package/docs/design-system/radius-and-elevation.md +2 -2
  68. package/docs/design-system/record-pages.md +13 -3
  69. package/docs/design-system/toasts.md +18 -8
  70. package/docs/framing-an-application.md +77 -23
  71. package/docs/lists.md +372 -452
  72. package/docs/loading-and-feedback.md +11 -6
  73. package/docs/overview.md +9 -4
  74. package/docs/screens.md +104 -5
  75. package/docs/testing.md +40 -9
  76. package/package.json +27 -27
  77. package/dist/close-while-open.d.ts +0 -6
  78. package/dist/close-while-open.js +0 -21
  79. package/dist/confirm.d.ts +0 -21
  80. package/dist/confirm.js +0 -11
  81. package/dist/dialogs.d.ts +0 -4
  82. package/dist/dialogs.js +0 -3
  83. package/dist/form.d.ts +0 -28
  84. package/dist/form.js +0 -23
  85. package/dist/rename.d.ts +0 -20
  86. package/dist/rename.js +0 -14
  87. package/dist/run-confirm.d.ts +0 -22
  88. package/dist/run-confirm.js +0 -23
@@ -33,6 +33,10 @@ hook. Two copies of these fail with no error:
33
33
  [configured transport](https://docs.gopherium.org/authentication/react-integration/#one-setting-for-the-whole-module)
34
34
  that half the app cannot see.
35
35
 
36
+ `godminDedupe` lists godmin itself too, since two workspace packages
37
+ of your app can install it twice, and a `useToaster` in one copy then
38
+ finds no `Toaster` from the other.
39
+
36
40
  The config handles this twice:
37
41
 
38
42
  - `godminDedupe` makes Vite resolve each listed package once.
@@ -50,13 +54,19 @@ In one app with eight preloads it cut the blank page from 1.9s to
50
54
  nothing was queueing. It costs nothing at runtime, so leave it on
51
55
  and let it matter as your bundle grows.
52
56
 
57
+ godmin marks only its stylesheets as having side effects, so your
58
+ bundler leaves out every part you do not import, such as the dialogs
59
+ on a screen that opens none.
60
+
53
61
  On a bundler that is not Vite or Rollup, the underlying functions
54
62
  `duplicateCopies` and `hoistStylesheet` are exported so you can wire
55
63
  both checks into whatever hooks it offers.
56
64
 
57
65
  ## Lint your stylesheets
58
66
 
59
- `@wordpress/theme` ships three stylelint rules. This turns them on:
67
+ `@wordpress/theme-build-tools` ships three stylelint rules. Add it
68
+ to your `devDependencies`, next to `stylelint`. Then this turns the
69
+ rules on:
60
70
 
61
71
  ```js
62
72
  export default { extends: ['@gopherium/godmin/stylelint'] }
@@ -64,13 +74,14 @@ export default { extends: ['@gopherium/godmin/stylelint'] }
64
74
 
65
75
  They catch design tokens that do not exist (a typo renders nothing,
66
76
  with no error), redefined `--wpds-` properties, and hand-typed
67
- fallback values.
77
+ fallback values. The rule on tokens that do not exist reads its list
78
+ from the `@wordpress/theme` your app installs.
68
79
 
69
80
  ## Design system versions
70
81
 
71
82
  Each godmin release supports one design system window, written out
72
83
  in full in its peer ranges as the first version it accepts and the
73
- first one it refuses, such as `>=0.25.0 <0.26.0`. The window moves
84
+ first one it rejects, such as `>=0.26.0 <0.27.0`. The window moves
74
85
  forward with the design system and never widens, so no release
75
86
  accepts two incompatible generations at once.
76
87
 
@@ -87,19 +98,196 @@ in the peer ranges of godmin's `package.json`.
87
98
 
88
99
  `@wordpress/i18n` is a required peer, because the main entry
89
100
  translates godmin's own words. `@wordpress/date` is an optional peer,
90
- needed only by `@gopherium/godmin/dates`. `@wordpress/components` is
91
- an optional peer too, needed only by `@gopherium/godmin/dialogs`, in
92
- the window `>=43.0.0 <44.0.0`. Install each one next to godmin when
93
- you use its entry. Load the components stylesheet once in your
94
- application, `@wordpress/components/build-style/style.css`, as
95
- DataViews already asks. godmin never imports it. Their windows are in
96
- the same peer ranges.
101
+ needed only by `@gopherium/godmin/dates`. Install it next to godmin
102
+ when you use that entry. Its window is in the same peer ranges.
103
+ godmin never imports `@wordpress/components`.
104
+
105
+ `@wordpress/theme-build-tools` is an optional peer too, needed only
106
+ by `@gopherium/godmin/stylelint`. Its window is in the same peer
107
+ ranges.
97
108
 
98
109
  `@wordpress/dataviews` is an optional peer as well, in the window
99
- `>=21.0.0 <22.0.0`. No godmin entry imports it, but `offeredView`
110
+ `>=22.0.0 <23.0.0`. No godmin entry imports it, but `offeredView`
100
111
  follows the filter rules of that DataViews release. A list built on
101
112
  another release gets a peer warning when it installs godmin.
102
113
 
114
+ ## Upgrading from godmin 0.32.0
115
+
116
+ godmin 0.33.0 gives the write a busy dialog waits on a time limit, and
117
+ moves to the WordPress packages of 4 November. Change your code in
118
+ these places:
119
+
120
+ - `AdminRoot` takes a required `writeTimeout`, how long in
121
+ milliseconds a busy dialog waits on its write before it gives up.
122
+ Read it from your app's own settings and pass it where you render
123
+ `AdminRoot`, such as
124
+ `<AdminRoot writeTimeout={settings.writeTimeout}>`. godmin sets no
125
+ limit of its own. Pass `Infinity` for no limit. The value may change
126
+ after the first render, such as `Infinity` while your settings still
127
+ load, and each write takes the value in force when it starts. 0, a
128
+ negative number, `NaN` or more than 2147483647 makes `AdminRoot`
129
+ throw as it renders. Once a write runs past it, the dialog stops
130
+ waiting, shows WordPress's words for a write with no answer and
131
+ frees Cancel, the close icon and Escape, as
132
+ [while a write runs](./design-system/dialogs.md#while-a-write-runs)
133
+ says.
134
+ - `onConfirm` and `onSubmit` get an `AbortSignal` as their last
135
+ argument, and the `onSubmit` of `RenameDialog` gets it after the
136
+ name. It fires once the limit runs out. Pass it to the write the
137
+ dialog waits on, such as `fetch(url, { signal })`, so the request
138
+ stops too. The server may still finish a write it already received,
139
+ so make a write safe to send twice. A wrapper around your writes
140
+ that turns a failure into `{ error }` shows its own words even when
141
+ the limit ran out. Have it reject once `signal.aborted` is true, so
142
+ the dialog shows WordPress's words for the time-out. A wrapper that
143
+ rejects gets them already.
144
+ - The write that `useDialogRun` hands out takes the dialog's signal as
145
+ its fourth argument, as `write(items, call, words, signal)`. A call
146
+ still running when the signal fires counts as failed. The run does
147
+ not hand the signal to `call`, so pass it on to each write yourself.
148
+ - `renderAdmin` from `@gopherium/godmin/testing` takes `writeTimeout`
149
+ too, and sets no limit when you leave it out. A test harness of your
150
+ own that renders `AdminRoot` passes one.
151
+ - A test that waits on a write that never ends, such as to read a busy
152
+ dialog, now meets the time-out once the limit runs out. The words
153
+ show, and Escape and Cancel close the dialog again. Leave
154
+ `writeTimeout` out of `renderAdmin`, give your own harness a limit
155
+ longer than the test, or read the busy dialog before the limit runs
156
+ out. A test on fake timers that moves its clock past the limit meets
157
+ the time-out too.
158
+ - Move the `@wordpress` packages your app installs to the releases of
159
+ 4 November: `@wordpress/dataviews` 22, `@wordpress/icons` 20,
160
+ `@wordpress/style-runtime` 0.15, `@wordpress/theme` 4 and
161
+ `@wordpress/ui` 0.26. Move `@wordpress/a11y` to 5.1 or later,
162
+ `@wordpress/date` to 6.1 or later and `@wordpress/i18n` to 7.1 or
163
+ later too, since DataViews 22 and ui 0.26 ask for them.
164
+ [Design system versions](#design-system-versions) gives each window.
165
+ DataViews 22 asks for an action label with no ellipsis, so write
166
+ "Delete" in place of "Delete…".
167
+ - DataViews 22 changes what a test of a list meets. The bulk actions
168
+ sit in `.dataviews-bulk-actions__actions`, and at 782px and below
169
+ they all move into an Actions menu. Sort by is no longer a native
170
+ `select`, and ArrowDown opens its list. The count reads "1 item
171
+ selected", in lowercase. A row checkbox is a `span` with the
172
+ checkbox role, so read its `aria-checked`, not `checked`. An idle
173
+ bulk button carries `aria-disabled="false"`, and the spinner draws
174
+ on a 24 `viewBox`. On screen, the footer drops its select all
175
+ checkbox and reads "N items", or "20 of 45 items" when the list has
176
+ more than one page. A grid gains a Select all row above its cards,
177
+ and the checkbox of a row that takes no bulk action no longer looks
178
+ greyed out. godmin keeps each of these as WordPress draws it.
179
+ - `@gopherium/godmin/stylelint` loads its rules from
180
+ `@wordpress/theme-build-tools`, a new optional peer. Add it to your
181
+ `devDependencies`, next to `stylelint`, as
182
+ [lint your stylesheets](#lint-your-stylesheets) shows.
183
+ - `@wordpress/theme` 4 no longer exports its Vite plugin. An app that
184
+ imports `vite-ds-token-fallbacks` from `@wordpress/theme` imports it
185
+ from `@wordpress/theme-build-tools/vite-plugins/vite-ds-token-fallbacks`
186
+ now, with `@wordpress/theme-build-tools` in its `devDependencies`.
187
+ The old path stops the build.
188
+ - `DrilldownItem` no longer takes `activeProps` or `activeOptions`,
189
+ since a drilldown row is never current. Drop them. A row that points
190
+ at the sub menu already shown is a `NavigationItem`, as
191
+ [sub menus](./framing-an-application.md#sub-menus) says.
192
+ - Back draws its chevron in place of anything inside the `back` link
193
+ you pass, so drop any icon or words you put there. Name it with
194
+ `backLabel`, or with an `aria-label` on the link, as
195
+ [`NavigationScreen`](./screens.md#navigationscreen) says.
196
+
197
+ TypeScript points at each `AdminRoot` without `writeTimeout`, each
198
+ `write` of `useDialogRun` with three arguments, and each `activeProps`
199
+ or `activeOptions` on a `DrilldownItem`. A handler that takes no
200
+ signal still type checks, so find each write a dialog waits on
201
+ yourself. The rest changes what the reader sees, what a test meets and
202
+ what your app installs.
203
+
204
+ ## Upgrading from godmin 0.31.0
205
+
206
+ godmin 0.32.0 draws `ConfirmDialog` on the alert dialog of the design
207
+ system and `FormDialog` on its dialog, a confirm or a form on a list
208
+ becomes a dialog your screen renders, and the dialogs move to the main
209
+ entry. Change your code in these places:
210
+
211
+ - `@gopherium/godmin/dialogs` is gone. Import `ConfirmDialog`,
212
+ `FormDialog`, `DialogAnswer` and their props types from
213
+ `@gopherium/godmin`. godmin no longer has `@wordpress/components` as
214
+ a peer. An app that draws DataViews keeps it, since DataViews needs
215
+ it.
216
+ - `ConfirmDialog` takes the question as `title` and what will happen
217
+ as `description`, in place of `children`. `size` is gone, since a
218
+ confirm has one width and is a card at every width. Pass
219
+ `intent="irreversible"` for an action that cannot be undone, which
220
+ draws its button red.
221
+ - `RunConfirm`, `ConfirmBody`, `RunConfirmProps` and
222
+ `ConfirmBodyProps` are gone. Give the list action a `callback` that
223
+ stores the rows, drop its `RenderModal`, `hideModalHeader` and
224
+ `modalFocusOnMount`, and render a `ConfirmDialog` from your screen
225
+ whose `onConfirm` returns the run, as
226
+ [running an action over the picked rows](./lists.md#running-an-action-over-the-picked-rows)
227
+ shows.
228
+ - `FormBody`, `FormKind`, `RenameBody`, `useCloseWhileOpen`,
229
+ `FormBodyProps` and `RenameBodyProps` are gone. Give the row action a
230
+ `callback` that stores the rows, drop its `RenderModal`,
231
+ `modalHeader`, `modalSize` and `modalFocusOnMount`, and render a
232
+ `FormDialog` or a `RenameDialog` from your screen whose `onSubmit`
233
+ returns the write of `useDialogRun`, as
234
+ [renaming an item](./lists.md#renaming-an-item) shows. Stop closing
235
+ the dialog before its write.
236
+ - A rename keeps Save on with a blank field, and the browser refuses
237
+ the send. A test that read Save off reads that a press on it sends
238
+ nothing.
239
+ - A confirm is now an `alertdialog`. A test that finds it by the role
240
+ `dialog` finds it by `alertdialog`.
241
+ - A confirm has no close button now, even with a `title`. A test that
242
+ pressed its close button presses Cancel instead.
243
+ - `onClose` runs once the card has left the page, not at the press.
244
+ A test that reads the dialog gone, or `onClose` called, right after
245
+ a press waits for it, such as with `waitFor`.
246
+ - Escape and Cancel close nothing while the write runs, and a click on
247
+ the dimmed page never closes a confirm. A test that dismissed a busy
248
+ confirm, or clicked outside one, lets the write end or presses
249
+ Cancel instead. Give a write that can hang a timeout.
250
+ - A promise that rejects, or a handler that throws, leaves the confirm
251
+ open, and the error still goes on to your app. To close it, catch
252
+ the failure inside `onConfirm` and show it in a toast, as
253
+ [a failure from a dialog](./lists.md#a-failure-from-a-dialog) shows.
254
+ - A handler that returns, or a promise that ends with, an object
255
+ whose `error` holds words, or whose `close` is `false`, now keeps
256
+ the confirm open. Turn such an answer into one that closes when your
257
+ app wants it to close.
258
+ - Any object with a `then` method now counts as a promise, so the
259
+ confirm waits for it. Before, it waited only for a real `Promise`
260
+ and closed at once for anything else.
261
+ - A stylesheet that styles `.godmin-modal-body`, its `--copy` and
262
+ `--create` forms, or `.godmin-modal-body__question` styles nothing
263
+ now.
264
+ - `FormDialog` has no `kind` and no `size`. It has one width, it is a
265
+ card at every width, and its footer sets the space above its
266
+ buttons.
267
+ - `FormDialog` closes itself. Return nothing from `onSubmit` to close
268
+ at once, or the write's promise to close when it ends, and stop
269
+ closing it from your handler. Take it away in `onClose`, which runs
270
+ once the card has left the page.
271
+ - A form write that fails shows inside the dialog. Answer `{ error }`
272
+ with words from `onSubmit`, in place of a toast, as
273
+ [a failure from a dialog](./lists.md#a-failure-from-a-dialog) shows.
274
+ A promise that rejects, or a handler that throws, leaves the form
275
+ dialog open, and the error still goes on to your app.
276
+ - Cancel, the close icon, Escape and a click on the dimmed page close
277
+ nothing while a form writes. A test that dismissed a busy form
278
+ dialog lets the write end instead.
279
+ - The close button of a form dialog is now a close icon named "Close"
280
+ beside the title, and Cancel draws an outline.
281
+ - The send button of a form dialog sits in the footer, outside the
282
+ form, and names it. user-event in jsdom finds no send button for
283
+ Enter there, so a test that typed Enter in a field presses the send
284
+ button instead, or runs in a browser.
285
+
286
+ TypeScript points at `children`, `size`, `kind`, `RunConfirm`,
287
+ `ConfirmBody`, `FormBody`, `RenameBody`, `useCloseWhileOpen` and each
288
+ import from `@gopherium/godmin/dialogs`. The rest changes what the
289
+ reader sees and when `onClose` runs.
290
+
103
291
  ## Upgrading from godmin 0.27.0
104
292
 
105
293
  godmin 0.28.0 draws toasts as WordPress's new admin draws its
@@ -71,7 +71,11 @@ sidebar moves focus in these cases only:
71
71
  | Opens a page with any other link | Nowhere. The sidebar moves no focus |
72
72
  | Closes the drawer with Escape or its close button | The menu button |
73
73
 
74
- The title of a sidebar screen never takes focus.
74
+ The title of a sidebar screen never takes focus. A move to another
75
+ screen moves no focus either. A screen reader hears the new screen's
76
+ title instead, as
77
+ [what a screen reader hears when the screen changes](./frame.md#what-a-screen-reader-hears-when-the-screen-changes)
78
+ says.
75
79
 
76
80
  Some parts go away, or turn inert, while they hold focus. godmin then
77
81
  moves focus to a part that stays, so the keyboard reader keeps their
@@ -83,10 +87,10 @@ place:
83
87
  the screen does not scroll, as
84
88
  [running an action over the picked rows](../lists.md#running-an-action-over-the-picked-rows)
85
89
  says.
86
- - The table or the footer of a list, with its rows and the busy bulk
87
- action button, which turn inert as a run reloads the list. The list
88
- region takes the focus at once, where WordPress drops it to the
89
- page, and the screen does not scroll either, as
90
+ - The table, the bulk bar or the footer of a list, with its rows and
91
+ the busy bulk action button, which turn inert as a run reloads the
92
+ list. The list region takes the focus at once, where WordPress drops
93
+ it to the page, and the screen does not scroll either, as
90
94
  [after a write of your own](./lists.md#after-a-write-of-your-own)
91
95
  says. While the list reloads, the next Tab from the list region
92
96
  goes to the first control of the list, such as its search field.
@@ -124,8 +128,8 @@ where they are and a screen reader has a control to name, or stays on
124
128
  the region when that control is a primary action.
125
129
 
126
130
  Dialogs move focus as they open and close, as
127
- [a confirm outside a list](../lists.md#a-confirm-outside-a-list) and
128
- [a form dialog](../lists.md#a-form-dialog) explain. When the list
131
+ [keyboard and focus](./dialogs.md#keyboard-and-focus) on the dialogs
132
+ page and [a form dialog](../lists.md#a-form-dialog) explain. When the list
129
133
  drew the row a dialog opened from anew while the dialog was open,
130
134
  `useFocusBack` puts the focus back on that row, or on the list once
131
135
  the row left it, as
@@ -164,10 +168,14 @@ picture such as an icon, is never the name:
164
168
 
165
169
  The current page carries `aria-current="page"`. A sidebar row draws
166
170
  its highlight from that mark, so what the eye sees and what a screen
167
- reader hears always match. A page tab draws its underline from its
171
+ reader hears always match. A drilldown row never carries it, as
172
+ [the sidebar marks](./frame.md#the-sidebar-marks) says. A page tab
173
+ draws its underline from its
168
174
  `current` prop, which sets the same mark. A router link can set the
169
175
  mark on its own too, so [PageTabs](../screens.md#pagetabs) says how
170
- to keep the underline and the mark in step.
176
+ to keep the underline and the mark in step. A breadcrumb never carries
177
+ the mark, and [PageBreadcrumbs](../screens.md#pagebreadcrumbs) says how
178
+ to keep a router link from setting it.
171
179
 
172
180
  Some screen readers stop treating a list with no bullets as a list.
173
181
  So the sidebar rows, the page tabs and a log list keep
@@ -185,15 +193,18 @@ aloud when it changes.
185
193
 
186
194
  | Part | What a screen reader hears | Set up in |
187
195
  | --- | --- | --- |
196
+ | A new screen | Its title, assertively, once the path changes. Nothing on the first load | [What a screen reader hears when the screen changes](./frame.md#what-a-screen-reader-hears-when-the-screen-changes) |
188
197
  | A toast | Its message, politely. Never its action | [What a screen reader hears](./toasts.md#what-a-screen-reader-hears) |
189
198
  | A loading screen | The `label` sentence, from a visually hidden status. The spinner is hidden | [What a screen reader hears](./loading.md#what-a-screen-reader-hears) |
190
199
  | A list that loads | Nothing on its first load, as in WordPress. A table or a grid is marked busy on a later load | [What a screen reader hears](./loading.md#what-a-screen-reader-hears) |
191
200
  | A list after a run | The control the focus went back to. After the pressed row left, the checkbox of the row now in its place, by that row's title. With no checkbox, that row's title or actions menu button, and nothing new when the region keeps the focus | [Where focus goes](#where-focus-goes) |
192
201
  | A count beside a row | The `label` sentence, in place of the bare number | [A count beside a row](../framing-an-application.md#a-count-beside-a-row) |
193
202
  | An `ErrorNotice` | Its message, at once, as an alert | [ErrorNotice](../screens.md#errornotice) |
203
+ | A server message under a field | The server's words, at once, as the focus moves to the first field that fails | [A server message under a field](../screens.md#a-server-message-under-a-field) |
194
204
 
195
205
  Polite means the screen reader first finishes what it is saying. An
196
- alert breaks in at once. Keep `ErrorNotice` for a failure that has to
206
+ alert breaks in at once, and so does an assertive title. Keep
207
+ `ErrorNotice` for a failure that has to
197
208
  stay on screen until the reader acts, as
198
209
  [what goes in a toast](../loading-and-feedback.md#what-goes-in-a-toast)
199
210
  explains. [Announcements](../testing.md#announcements) shows how a
@@ -244,7 +255,7 @@ gives no label a fixed width:
244
255
  - The page tabs keep each label on one line. A tab row too long for
245
256
  its page scrolls and fades the edge it cuts.
246
257
 
247
- In a right-to-left language the chevrons, the sub menu slide and the
248
- fade of the tab row turn around, as
258
+ In a right-to-left language the chevrons, the sub menu slide, the
259
+ phone drawer and the fade of the tab row turn around, as
249
260
  [right-to-left languages](./layout.md#right-to-left-languages)
250
261
  explains.
@@ -62,7 +62,7 @@ The theme provider also checks contrast when it works out colors from a seed. It
62
62
  A raw color is a value written out, such as `#fff`, in place of a token. It stays the same whatever the seeds. `base.css` writes a few on purpose:
63
63
 
64
64
  - A toast paints raw colors too: a see-through black box, white text and a white focus line, the colors of the WordPress snackbar. [Colors, corners and shadow](./toasts.md#colors-corners-and-shadow) gives each value.
65
- - The backdrop is the dark layer behind the open drawer. It is `#000` at 0.5 opacity, as in the new WordPress admin. godmin sets the opacity through `--backdrop-opacity`. The `@wordpress/ui` drawer fades its black backdrop to that value, so the fade in and out still run.
65
+ - The backdrop is the dark layer behind the open drawer. It is `#000` at 0.5 opacity, as in the new WordPress admin. godmin sets the opacity through `--backdrop-opacity`, and fades the backdrop to it and back with the drawer, as [the drawer](./frame.md#the-drawer) times it.
66
66
  - Shadows are black at a low opacity. [Elevation](./radius-and-elevation.md#elevation) lists them.
67
67
  - The `#000` in `--godmin-page-tabs-fade` and `--godmin-page-tabs-fade-both` is a mask. The mask fades the ends of a long row of tabs. It paints nothing.
68
68
 
@@ -16,7 +16,7 @@ to change. The internal ones are not yours to read or change.
16
16
  The canvas is the panel that shows the current screen.
17
17
  [The frame](./layout.md#the-frame) and [the canvas](./layout.md#the-canvas)
18
18
  give the four sizes below, and
19
- [the sidebar slide](./motion.md#the-sidebar-slide) gives the two slide
19
+ [the sidebar slide](./frame.md#the-sidebar-slide) gives the two slide
20
20
  values. This table says where each one is set and what it changes.
21
21
 
22
22
  | Name | Set on | What it changes |
@@ -25,8 +25,8 @@ values. This table says where each one is set and what it changes.
25
25
  | `--godmin-canvas-margin` | `:root` | The space around the canvas |
26
26
  | `--godmin-canvas-gutter` | the canvas | The canvas padding left and right. A `Page` with `list` and no `aside` reaches out by it to the canvas edges. A record page's columns reach out by it too |
27
27
  | `--godmin-canvas-gutter-block` | the canvas | The canvas padding above and below. The band of notices above the screen keeps this space under it. A `Page` with `list` and no `aside` reaches down by it to the canvas bottom. A record page's columns reach down by it too |
28
- | `--godmin-navigation-slide-distance` | `:root` | How far a sidebar screen moves as it slides in |
29
- | `--godmin-navigation-slide-duration` | `:root` | How long that slide takes |
28
+ | `--godmin-navigation-slide-distance` | `:root` | How far a sidebar screen moves as it slides in, on a window `EDGE_BREAKPOINT` wide or wider |
29
+ | `--godmin-navigation-slide-duration` | `:root` | How long that slide takes, on the same windows |
30
30
 
31
31
  ## Where each one is set
32
32