From 6386d9dfd414dc95042492da252349eff4f70b21 Mon Sep 17 00:00:00 2001 From: Claude Date: Sun, 13 Sep 2026 21:23:23 +0000 Subject: [PATCH] docs(fields): blank line before `## Field Schema` on four field pages MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `date.mdx`, `rich-text.mdx`, `text.mdx` and `textarea.mdx` each placed a self-closing `SchemaExample` tag immediately before `## Field Schema`, with no blank line between them. `packages/plugin-markdown`'s `MarkdownImpl` (react-markdown; the chain `apps/console`'s `DocPage` uses) follows CommonMark's HTML-block rule — an HTML block ends only at a blank line — so the tag's block swallowed the heading and no `field-schema` anchor was rendered, while `extractToc` still listed one. The `#field-schema` ToC link therefore resolved to nothing. `@mdx-js/mdx` (the compiler `fumadocs-mdx` uses for `apps/site`) closes a self-closing MDX JSX flow element immediately, so it never swallowed the heading; its emitted id lists are byte-identical before and after this change. The renderer that disagreed is the one reading CommonMark correctly, so the fix is in the docs, not in either renderer. Measured on this base over 223 files (`content/docs/**/*.{md,mdx}` plus `packages/*/README.md`, frontmatter stripped): the rendered-vs-`extractToc` divergence set was exactly these four files and is now empty; rendered headings 2984 -> 2988; the 22 field pages that already carried the blank line emitted `field-schema` throughout, as the lit control. Co-Authored-By: Claude Opus 5 Claude-Session: https://claude.ai/code/session_01FhBNJcLRZLe8M87VcUgpKr --- content/docs/fields/date.mdx | 1 + content/docs/fields/rich-text.mdx | 1 + content/docs/fields/text.mdx | 1 + content/docs/fields/textarea.mdx | 1 + 4 files changed, 4 insertions(+) diff --git a/content/docs/fields/date.mdx b/content/docs/fields/date.mdx index 66c87a37dc..d05784db74 100644 --- a/content/docs/fields/date.mdx +++ b/content/docs/fields/date.mdx @@ -12,6 +12,7 @@ The Date Field component provides a date picker for selecting dates and optional ## With Default Value + ## Field Schema A date field is authored as `DateFieldMetadata` (`@object-ui/types`), which is the diff --git a/content/docs/fields/rich-text.mdx b/content/docs/fields/rich-text.mdx index 8bfe7787d0..ec35faf913 100644 --- a/content/docs/fields/rich-text.mdx +++ b/content/docs/fields/rich-text.mdx @@ -12,6 +12,7 @@ The Rich Text Field component edits formatted text content with markdown or HTML ## HTML Editor + ## Field Schema `markdown`, `html` and `richtext` are three field types served by one widget, and each diff --git a/content/docs/fields/text.mdx b/content/docs/fields/text.mdx index 3d6f6f77cd..0ea89390e8 100644 --- a/content/docs/fields/text.mdx +++ b/content/docs/fields/text.mdx @@ -20,6 +20,7 @@ The Text Field component provides a single-line text input for collecting basic ## Read-Only + ## Field Schema A text field is authored as `TextFieldMetadata` (`@object-ui/types`), which is the diff --git a/content/docs/fields/textarea.mdx b/content/docs/fields/textarea.mdx index 201ce05999..6b2e86af63 100644 --- a/content/docs/fields/textarea.mdx +++ b/content/docs/fields/textarea.mdx @@ -16,6 +16,7 @@ The TextArea Field component provides a multi-line text input for collecting lon ## Required Field + ## Field Schema A textarea field is authored as `TextareaFieldMetadata` (`@object-ui/types`), which is