mirror of
https://github.com/olehomelchenko/astrolabe.git
synced 2026-08-08 02:02:33 +00:00
Chart Builder: open a snippet in the builder to edit it in place
This commit is contained in:
@@ -284,6 +284,13 @@ export function toggleDatasets(): void {
|
||||
}
|
||||
```
|
||||
|
||||
> **Pre-hydrate variant — open without `init`.** When a modal must open onto state the
|
||||
> caller already loaded (the Chart Builder's _Open in builder_ edit flow — `openChartBuilderForEdit`
|
||||
> hydrates the builder from a snippet first), the opener sets the active modal, snapshots, and
|
||||
> syncs the URL **itself** and **skips the registry `init`** — running `init` would re-derive the
|
||||
> default state and clobber the hydration. Such an opener is the exception, not the rule: ordinary
|
||||
> opens go through `openModal` so `init` is the single place transient state is seeded.
|
||||
|
||||
### Change detection
|
||||
|
||||
```ts
|
||||
|
||||
@@ -495,6 +495,22 @@ call the same functions as the visible control — one code path, two doors.
|
||||
_(Consulted via /council → NN/g #6/#7, Carbon menu-buttons/overflow-menu. This bullet is
|
||||
the contract; cite it, not the source.)_
|
||||
|
||||
**Resolved — content-gated toolbar actions hide; state-gated actions disable.** Two ways a
|
||||
toolbar action can be inapplicable, with opposite affordances. **State-gated** — applicable
|
||||
to this object in principle, just inert right now (Revert with no draft changes, Config in
|
||||
the read-only Published view) → **disabled**: the user can act (edit / switch view) and it
|
||||
lights up. **Content-gated** — inapplicable to _this spec's shape_, and nothing the user can
|
||||
do in the moment changes that (_Extract to Dataset_ needs inline data; _Open in builder_
|
||||
needs a builder-representable spec referencing an existing dataset) → **hidden**. A
|
||||
permanently-disabled control the user cannot enable reads as broken or teasing, not as
|
||||
guidance (NN/g #6 — a disabled state must imply "do X and this becomes available"; Carbon
|
||||
button states). So _Open in builder_ (spec §06) sits in the editor toolbar beside _Extract
|
||||
to Dataset_ and follows its visibility — present only when the active snippet round-trips
|
||||
through the builder and its dataset exists. This refines "disabled is for temporarily
|
||||
unavailable actions" (below) from the unbuilt-feature case to the per-spec case.
|
||||
_(Consulted via /council → NN/g #4/#6, Carbon button usage/states. This bullet is the
|
||||
contract; cite it, not the source.)_
|
||||
|
||||
**Resolved — field→channel assignment: explicit choice, visible armed state.** Clicking a
|
||||
shelf field with no channel armed opens an explicit **channel chooser** (the channels that
|
||||
accept the field; an occupied one is labelled with what it replaces) — never a silent
|
||||
|
||||
Reference in New Issue
Block a user