Skip to content

feat(studio): typed fields in Studio (RFC-0041 step 5) - #98

Merged
Madraka merged 1 commit into
mainfrom
feat/fields-studio
Oct 23, 2026
Merged

Madraka merged 1 commit into
mainfrom
feat/fields-studio

Conversation

@Madraka

@Madraka Madraka commented Oct 23, 2026

Copy link
Copy Markdown
Contributor

Step 5 of RFC-0041's rollout (ADR-0043), built on #94–#97.

EntryFieldsForm (a packages/ui block; every word is a prop)

  • One Kumo control per type:
    • text: Input or InputArea;
    • number;
    • boolean: Switch;
    • date and datetime: DateTimeField, with a new dateOnly prop; a datetime keeps its value's zone;
    • url;
    • select: Select, or Checkbox.Group when multiple;
    • rich text and image: render props.
  • Labels, help and option labels in the Studio language. A "Needed to publish" badge and errors per field.
  • Translations: non-localized fields are read-only, show the original's value and link to the original. Empty localized fields show the original's value as a placeholder.

Entry editor: a lazy "Fields" SectionCard, shown only when the collection has definitions and saved with the entry. Rich text uses BodyEditor; images use the asset picker. details.issues are shown on their field.

Collection settings › Fields (lazy)

  • Builder: add or edit a field (the key is derived from the label; per-language labels, help and options), reorder, then save with one PUT /collections/:key.
  • Operation dialogs for rename, change type (only conversions the table allows), languages and remove:
    • a dry-run report with counts, a breakdown per language, samples, a theme warning and a snapshot note;
    • an explicit "Clear n values" opt-in when values can't be converted;
    • run and continue until done, then Revert;
    • a banner with "Continue" when an operation is still running.
  • Read-only without site:settings.

Approvals: readable labels for the field tools and the collection tools. change_field_type and remove_field ask for confirmation first. 13 field error codes are worded through apiErrorText.

i18n: a new lazy namespace, fields. Drafts for the other 18 languages, unreviewed.

Checks

  • Studio: 1240/1240, including 12 new tests.
  • ui: 210/210, including 9 new tests.
  • Design lint (380 files), size check and typecheck pass.
  • Initial load: 389.1 kB gzip, +0.8 kB against the +0 target (budget 420). About 0.5 kB is 20 core strings (tool labels and error codes, which apiErrorText reads from core); the rest is Rolldown regrouping small shared chunks. None of the new modules are in the initial load.
  • Screenshots at 1440 and 390 px of the editor, the translation editor, collection settings, the Add field dialog and a type-change dialog with a real dry run: no console errors, no sideways scroll.

Trade-offs

  • No zone picker for datetime.
  • Operations wait until free edits are saved.
  • A resumed run reopens in a generic progress view.

Changeset: @cloudhal/cli minor (@cloudhal/ui is private).

🤖 Generated with Claude Code

- EntryFieldsForm (packages/ui): one Kumo control per field type, words
  as props, required-to-publish badges, inline issues; translations show
  non-localized values read-only with a link to the original, and empty
  localized values with the original's as a placeholder.
- Entry editor: a lazy Fields card saved with the entry (rich text in
  BodyEditor, images through the asset picker).
- Collection settings: a lazy fields builder (add, edit labels and
  options, reorder, save) and operation dialogs for rename, type,
  languages and remove: dry-run report, explicit "clear" opt-in, run,
  continue, revert, a banner for a running operation. Read-only without
  site:settings.
- Approvals: labels for the field tools; error codes through
  apiErrorText.
- i18n: lazy `fields` namespace, drafts for the other languages.

Studio 1240/1240, ui 210/210, design lint, size; initial load 389.1 kB
gzip (+0.8, budget 420); screenshots at 1440 and 390 px.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Madraka <8898640+Madraka@users.noreply.github.com>
@Madraka
Madraka merged commit d39c01b into main Oct 23, 2026
4 checks passed
@Madraka
Madraka deleted the feat/fields-studio branch October 23, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant