diff --git a/.changeset/34228-print-section-per-block.md b/.changeset/34228-print-section-per-block.md new file mode 100644 index 00000000000..86c7e994d97 --- /dev/null +++ b/.changeset/34228-print-section-per-block.md @@ -0,0 +1,10 @@ +--- +'@objectstack/skills': patch +--- + +docs(ui, skills): a print page whose sections may break between sheets authors one `record:details` block per section + +Clause-②: no +Metadata-protocol: none + +`skills/objectstack-ui/rules/pages.md`, § Print pages: one sentence after the page-break hints says that where sections may break between sheets, the author writes one `record:details` block per section, because `avoidBreakInside` keeps each block whole on one sheet when it fits (the qualifier the spec describe carries: a block taller than one sheet still breaks inside itself) and a multi-section block moves to the next sheet whole. The file pays for it within its token ceiling, which is not raised. It drops the sentence that said the console's print rendering was still to follow and that `os validate` warns the layout is not applied, which no longer holds: the console applies every `print` key. It also drops the words ", in full" from "must draw all it declares", which they only repeated; the "draws a window of its rows" refusal still covers a block that draws part of its rows. And § Routing model drops "regardless of which app you came from" after "one global `/docs/` route resolves any doc": the same paragraph already says the viewer is platform-level and the URL has no package or app prefix. The docs page `content/docs/ui/print-pages.mdx` carries the same guidance under its key table. `avoidBreakInside` keeps its meaning; no schema or runtime change. diff --git a/content/docs/ui/print-pages.mdx b/content/docs/ui/print-pages.mdx index 7b53d421ace..a7713ec256f 100644 --- a/content/docs/ui/print-pages.mdx +++ b/content/docs/ui/print-pages.mdx @@ -74,6 +74,10 @@ panels are hidden, and the page runs onto as many sheets as it needs. | `repeatTableHeaders` | A table's column headings repeated on every sheet it runs onto; on when omitted | | `avoidBreakInside` | `break-inside: avoid` on each block of a region | +On a print page whose sections may break between sheets, author one `record:details` block +per section: `avoidBreakInside` keeps each block whole on one sheet when it fits, so a block +holding several sections moves to the next sheet as one piece. + Blocks print whole: - `record:line_items` loads at most its row cap (`limit`, 500 when unset). On a print page, diff --git a/skills/objectstack-ui/rules/pages.md b/skills/objectstack-ui/rules/pages.md index 7012d54bc84..92ddc1595f8 100644 --- a/skills/objectstack-ui/rules/pages.md +++ b/skills/objectstack-ui/rules/pages.md @@ -76,10 +76,12 @@ page and a `slotted` / `html` / `react` page. `repeatFooter` repeat the page's own `header` / `footer` region on every sheet (refused without that region; off = printed once); `pageNumbers` prints sheet number and count; the page-break hints `repeatTableHeaders` (on by default) -and `avoidBreakInside` (keep each block whole). +and `avoidBreakInside` (keep each block whole on one sheet when it fits). +Where sections may break between sheets, author one `record:details` block +per section: a multi-section block moves to the next sheet whole. -Every block, at any depth, must draw all it declares, in full, the same at -any width: the containers `page:section` / `page:card` / +Every block, at any depth, must draw all it declares, the same at any +width: the containers `page:section` / `page:card` / `page:footer`, the field blocks `record:details` / `record:highlights`, the all-lines child table `record:line_items`, `element:text` / `element:image` / `element:divider` / `element:definition-list` / `element:repeater`, and the @@ -92,9 +94,8 @@ to print** (`record:path`, tabs, buttons, inputs, forms — values print through `record:details`), or it is **outside the vocabulary** (`flex`, `object-chart`, a plugin widget), so nothing answers for how it prints. -Validated today; the console's print rendering that applies it follows, so -`os validate` warns the layout is not yet applied. List export has no `'pdf'`; -a list prints as shown via the view's `allowPrinting`. +List export has no `'pdf'`; a list prints as shown via the view's +`allowPrinting`. ```typescript @@ -347,7 +348,7 @@ behind the screen is not. ### Routing model — platform-level viewer, opt-in entry The viewer is **platform-level**: one global `/docs/` route -resolves any doc regardless of which app you came from. The URL is +resolves any doc. The URL is **single-coordinate** — no package or app prefix — so a doc has exactly one URL. Do **not** design per-app or per-package doc URLs.