mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Docs: new-entity persistence stack, modal size tiers, spec anchor stability, test harness notes
This commit is contained in:
@@ -610,12 +610,16 @@ share the open/close/snapshot/URL logic rather than reimplementing it.
|
||||
|
||||
1. Add the name to the `ModalName` union.
|
||||
2. Add one `MODAL_REGISTRY` entry (title, component; `getState`/`hasError`/
|
||||
`getError` if it edits; `isUrlNavigable` + `init(arg)` if navigable).
|
||||
`getError` if it edits; `isUrlNavigable` + `init(arg)` if navigable;
|
||||
`dismissOnBackdrop: false` if it holds in-progress work).
|
||||
3. Write the body component; it reads/writes its feature store (e.g.
|
||||
`useDatasetStore`, `useChartBuilderStore`) via a narrow selector.
|
||||
4. If navigable, add its hash form to the URL sync and restore logic.
|
||||
5. If it has a keyboard shortcut or workflow trigger, wire that to
|
||||
4. If it isn't a small form, add its name to the **size-tier mapping in
|
||||
`ModalShell`** (`isLarge`/`isXLarge`) — the one shell edit a new modal can
|
||||
need; without it the modal renders at the small-form size.
|
||||
5. If navigable, add its hash form to the URL sync and restore logic.
|
||||
6. If it has a keyboard shortcut or workflow trigger, wire that to
|
||||
`openModal(name, arg)` — never to `activeModal` directly.
|
||||
|
||||
No edits to the shell render, the close logic, or the change-detection code are
|
||||
needed: those are generic and driven entirely by the registry.
|
||||
The shell render, close logic, and change detection need no edits: those are
|
||||
generic and driven entirely by the registry.
|
||||
|
||||
Reference in New Issue
Block a user