feat(record-form): richtext field type #99

Merged
pienter merged 4 commits from task/pienter-ui__rich-text-field__richtext-field-type into main 2026-09-19 22:35:41 +00:00
Owner

Stacked on the RichText component PR.

  • { type: 'richtext'; placeholder? } in RecordFormField, rendered by RecordFields like the other built-ins, also inside a BlockEditor block and in view mode.
  • Loaded with defineAsyncComponent behind a Skeleton: the editor is its own chunk (about 123 kB gzip) and a form without a rich text field never fetches it.
  • A rich text field spans the full Panel row, like a textarea (record-layout.css).
  • docs/cms/backend-contract.md documents the value: the HTML allow-list, bare href schemes, empty is '', the backend sanitises.
  • Playground (separate chore(examples) commit): blog body and page section body are rich text with formatted fixtures; the mock API requires a blog body; CMS_PLAYGROUND.md no longer excludes rich text.

Checks: typecheck, lint, format, package tests (54), playground tests (86), both builds green. Create, edit, view, BlockEditor sections, a validation issue and the unsaved-changes guard exercised in Chrome.

Not verified: the automatic focus move to an invalid rich text field, mobile layouts, clicking links in view mode. Known: a brief layout shift while the chunk loads.

Stacked on the RichText component PR. - `{ type: 'richtext'; placeholder? }` in `RecordFormField`, rendered by `RecordFields` like the other built-ins, also inside a BlockEditor block and in view mode. - Loaded with `defineAsyncComponent` behind a Skeleton: the editor is its own chunk (about 123 kB gzip) and a form without a rich text field never fetches it. - A rich text field spans the full Panel row, like a textarea (`record-layout.css`). - `docs/cms/backend-contract.md` documents the value: the HTML allow-list, bare `href` schemes, empty is `''`, the backend sanitises. - Playground (separate `chore(examples)` commit): blog `body` and page section `body` are rich text with formatted fixtures; the mock API requires a blog body; `CMS_PLAYGROUND.md` no longer excludes rich text. Checks: typecheck, lint, format, package tests (54), playground tests (86), both builds green. Create, edit, view, BlockEditor sections, a validation issue and the unsaved-changes guard exercised in Chrome. Not verified: the automatic focus move to an invalid rich text field, mobile layouts, clicking links in view mode. Known: a brief layout shift while the chunk loads.
`{ type: 'richtext' }` renders RichText with the same label, hint, error,
busy and read-only handling as the other built-ins, also inside a
BlockEditor block. RecordFields loads it with `defineAsyncComponent` behind
a Skeleton, so a form without a rich text field never fetches Tiptap. A
rich text field spans the full Panel row like a textarea.

The backend contract documents the value: an HTML string limited to the
formatting set, bare `href` links, sanitised by the backend.
chore(examples): rich text bodies for blog posts and page sections
All checks were successful
ci / lint (pull_request) Successful in 49s
ci / typecheck (pull_request) Successful in 24s
ci / format (pull_request) Successful in 25s
ci / release (pull_request) Has been skipped
992e2d5785
Blog `body` and section `body` become `richtext` fields with formatted
fixtures, and the mock API requires a blog body so the field has a
validation issue to show. CMS_PLAYGROUND.md no longer excludes rich text.
pienter changed target branch from task/pienter-ui__rich-text-field__rich-text-component to main 2026-09-19 22:30:12 +00:00
Merge branch 'main' into task/pienter-ui__rich-text-field__richtext-field-type
All checks were successful
ci / lint (pull_request) Successful in 49s
ci / typecheck (pull_request) Successful in 42s
ci / format (pull_request) Successful in 40s
ci / release (pull_request) Has been skipped
e99a4869e1
docs(changelog): move richtext field type entry back under Unreleased
All checks were successful
ci / typecheck (pull_request) Successful in 30s
ci / lint (pull_request) Successful in 33s
ci / format (pull_request) Successful in 35s
ci / release (pull_request) Has been skipped
0d2f13ed1c
pienter deleted branch task/pienter-ui__rich-text-field__richtext-field-type 2026-09-19 22:35:41 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
pienter/ui!99
No description provided.