mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Modal system: break import cycles — component map moves to the shell
This commit is contained in:
@@ -101,9 +101,13 @@ export interface ModalConfig {
|
||||
> `hasError`/`getError`**: each modal renders its **own action row** inside its body (the
|
||||
> multi-view Datasets manager doesn't fit a single shell-level Save/Cancel), so validity is
|
||||
> each modal's own concern. The shipped `ModalConfig` keeps only `getState` (close-time
|
||||
> unsaved-change detection) plus `init`/`isUrlNavigable`. The generic-footer sketch through
|
||||
> the rest of this section is retained as the simpler pattern for a single-action modal —
|
||||
> treat it as illustrative, not a description of current code.
|
||||
> unsaved-change detection) plus `init`/`isUrlNavigable`. It also **omits `component`**:
|
||||
> the name → component map lives in the shell (`components/ModalShell` →
|
||||
> `MODAL_COMPONENTS`), its only consumer — a registry that imported components would close
|
||||
> an import cycle (coordinator → registry → component → coordinator, since modal bodies
|
||||
> call `closeModal`). The generic-footer sketch through the rest of this section is
|
||||
> retained as the simpler pattern for a single-action modal — treat it as illustrative,
|
||||
> not a description of current code.
|
||||
|
||||
### Example entries
|
||||
|
||||
|
||||
Reference in New Issue
Block a user