Skip to content

print page ② of objectstack#8346: render a page that declares print — the print CSS mapping, the 13 printable blocks on paper, and the record page's "print" action (browser print preview) #11958

Description

@objectstack-fleet

Filed by the domain:spec seat 3 of objectstack-ai/objectstack (seat post objectstack-ai/objectstack#18883, session_01RPo7FUd6bSnAfkWMAKi848). This is card ② of the split that objectstack-ai/objectstack#8346's ruling of record 6051470224 orders (letter B′, maintainer 「8346 B′」). ⛔ Not a claim.

The ruling (verbatim, the clauses this card carries)

The template is a page. … The page gains an optional print declaration: paper size and orientation, margins, header and footer blocks, page numbering, page-break hints, mapped to print CSS (@page, repeated table heads, break-inside). A printable block subset is defined and linted …
Preview is the page itself in the console, plus the browser's print preview; no new visual designer …
M1, zero server: the print declaration, the printable subset and its lint, and a "print" action on the record page that opens the browser's print preview of the bound page.
② objectui, the print CSS mapping, the printable blocks, the record page's print action (domain:ui)

What card ① fixed (objectstack-ai/objectstack#22158, PR objectstack-ai/objectstack#22193)

  • PageSchema.print (PagePrintSchema) is closed, with no defaults:

    • paperSize (A4 | A5 | Letter | Legal; A4 when omitted) and orientation (portrait | landscape; portrait when omitted), mapped to @page { size };
    • margins { top, right, bottom, left } in millimetres, mapped to @page margin;
    • repeatHeader / repeatFooter, under which the page's own header / footer region repeats on every sheet;
    • pageNumbers, mapped to a @page margin box with counter(page) / counter(pages);
    • repeatTableHeaders (on when omitted), mapped to thead { display: table-header-group };
    • avoidBreakInside, mapped to break-inside: avoid on every block.

    Every key's describe names this card as its consumer. The liveness ledger carries them as planned, naming this card, and they move to live when this card's renderer reads them.

  • print is accepted only on record, home and app pages with regions. The parse refuses it on slotted / html / jsx / react pages and on list / utility pages.

  • PRINTABLE_PAGE_COMPONENT_TYPES (13) and PRINT_REFUSED_PAGE_COMPONENT_TYPES (39, each with its reason) are exported from @objectstack/spec/ui. The lint rule print-page-block-unprintable refuses every other block inside a print page at os validate / os build and the page save door.

What this card does (objectui)

  1. Print CSS from page.print: @page size, orientation, margins and page-number boxes; repeated header and footer regions; repeated table heads; break-inside. The page renders on screen exactly as before; print only adds the print stylesheet.
  2. The 13 printable blocks print whole. Read the subset from the spec's exported set; do not keep a second list.
    • Known gap (from the contract review of ①): record:line_items prints every line only up to its renderer cap, 500 unless limit is set. Under print, lift the cap, or make the truncation visible on paper. A silent partial table is the failure the subset exists to prevent.
  3. The record page's "print" action opens the browser's print preview of the bound print page (M1, zero server).
  4. objectui's leftover sentence "PDF export … declined as NOT PLANNED" is rewritten the way ① rewrote LIST_VIEW_EXPORT_PDF_RETIRED. It appears in types/src/objectql.ts, ListView.tsx, ReportViewer.tsx and the app-shell styles.css (measured by ①'s dev).

Unlock

objectui consumes @objectstack/spec as a published package, so this card is workable once an installable @objectstack/spec exports PagePrintSchema and PRINTABLE_PAGE_COMPONENT_TYPES. That means the v18 pre line (next dist-tag), or a stable release. The card is filed pm:on-hold for that reason.

Restart-when: an installable @objectstack/spec (npm, any dist-tag) exports PagePrintSchema and PRINTABLE_PAGE_COMPONENT_TYPES

Reader who acts: the objectui domain:ui execution seat, once restarted. domain:ui is named by the ruling, and priority:p2 / target:v18 are inherited from the parent.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    domain:uiobjectui ui stream: fix lands on the published library or apps — objectui execution seatenhancementNew feature or requestpm:on-holdpriority:p2target:v18

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions