diff --git a/.planning/STATE.md b/.planning/STATE.md index 31e1d8e..a1fa812 100644 --- a/.planning/STATE.md +++ b/.planning/STATE.md @@ -31,7 +31,7 @@ See: .planning/PROJECT.md (updated 2026-09-16) Phase: 15 (Journal plugin) — EXECUTING Plan: 4 of 4 Status: Ready for phase verification -Last activity: 2026-10-07 — Completed quick task 261007-p4y: toggle sizing and settings controller links +Last activity: 2026-10-07 — Completed quick task 261007-qgx: record heading from translatable (mltext) fields Progress: [██████████] 100% @@ -653,6 +653,7 @@ Recent decisions affecting current work: | 16 | Default icon shouldn't be a square but a sun. | 2026-10-06 | 4a94380 | — | | 261007-p4y | Switch toggle pixel sizing; settings entries linking to admin controllers; translate Locales moved to Settings | 2026-10-07 | 0b09acd | [261007-p4y-toggle-proportions-and-settings-controll](./quick/261007-p4y-toggle-proportions-and-settings-controll/) | | 18 | cabana list: join to-many relation column values with ", " | 2026-10-07 | fa25b4e | — | +| 261007-qgx | Admin record heading, crumb and title from the first text or mltext field (default locale) | 2026-10-07 | a714bb4 | [261007-qgx-admin-record-heading-uses-translatable-m](./quick/261007-qgx-admin-record-heading-uses-translatable-m/) | ## Deferred Items diff --git a/.planning/quick/261007-qgx-admin-record-heading-uses-translatable-m/261007-qgx-PLAN.md b/.planning/quick/261007-qgx-admin-record-heading-uses-translatable-m/261007-qgx-PLAN.md new file mode 100644 index 0000000..5a775d4 --- /dev/null +++ b/.planning/quick/261007-qgx-admin-record-heading-uses-translatable-m/261007-qgx-PLAN.md @@ -0,0 +1,33 @@ +--- +quick_id: 261007-qgx +mode: quick +--- + +# Quick 261007-qgx: admin record heading uses translatable (mltext) fields + +The admin record heading, breadcrumb record crumb and document title read the +first `text` field only, so records whose name field is `mltext` (journal Post +title, Category name) fall back to "Edit record". + +## Task 1: shared recordDisplayName helper + +- files: admin/src/components/form/formState.ts, admin/src/views/FormView.vue, admin/src/views/PreviewView.vue +- action: add `recordDisplayName(fields, values, enabledLocales)`: first field + of type `text` or an ML type (`isMLFieldType`) in schema order; plain values + as today (string/number, trimmed); ML values use the default (first enabled) + locale, else the first non-empty locale, else ''. Both views use it with + `schemaEnabledLocales(schema.meta)`. +- done: plain `text` behaviour unchanged; an mltext first field names the record. + +## Task 2: tests + +- files: admin/tests/form/formState.test.ts, admin/tests/form/FormView.test.ts, admin/tests/form/PreviewView.test.ts +- action: helper cases (plain, default locale filled, default empty + other + filled, all empty, non-text first field skipped); FormView and PreviewView + show the default-locale value as heading and record crumb for an mltext field. +- verify: `npm test`, `vue-tsc --noEmit`. + +## Task 3: ship + +- rebuild the embedded admin shell (`npm run build` → modules/boardwalk/dist), + `go vet ./... && go test ./...`, tag and push v0.1.12. diff --git a/.planning/quick/261007-qgx-admin-record-heading-uses-translatable-m/261007-qgx-SUMMARY.md b/.planning/quick/261007-qgx-admin-record-heading-uses-translatable-m/261007-qgx-SUMMARY.md new file mode 100644 index 0000000..e1a2e7a --- /dev/null +++ b/.planning/quick/261007-qgx-admin-record-heading-uses-translatable-m/261007-qgx-SUMMARY.md @@ -0,0 +1,18 @@ +--- +quick_id: 261007-qgx +status: complete +commits: [a714bb4, b6b194e] +--- + +# Quick 261007-qgx: admin record heading uses translatable (mltext) fields + +- `recordDisplayName(fields, values, enabledLocales)` in + `admin/src/components/form/formState.ts`: the first `text` or ML field in + schema order names the record; an ML value reads the default (first enabled) + locale, then the first non-empty locale, else '' (the generic message stays). +- FormView and PreviewView both use it with `schemaEnabledLocales(schema.meta)`; + plain `text` behaviour is unchanged. +- Tests: five helper cases in `formState.test.ts`; FormView and PreviewView + cases for an mltext first field (heading and record crumb). Both view tests + fail without the fix. Admin suite 1090/1090, `go vet` and `go test ./...` green. +- Embedded admin shell rebuilt (`modules/boardwalk/dist`), shipped as v0.1.12.