Repository navigation
fix(stardust): remove Figma template binding and keep emphasis, tables and image side in reskin - #860
sanyasandal wants to merge 8 commits into
Conversation
Reverts the template binding from #531 (figma/templates.mjs, figma-gate/page-match.mjs, reference/templates.md and their tests). Pages bound to a template lost link lists, card images and section spacing. The figma.geometry fallback is restored; page-sanity stays. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
… reskin - capture-content: record marks (strong em sup sub), br, table cell and the side an image sits on beside its text. - stream-render: rebuild marks, line breaks and data tables; table header and stripe fills (palette.tableHeaderBg|tableStripeBg); place a split image on its side and refuse split when the image is not beside its text; lone image-top card keeps its intro text; new `overlay` layout for media-band (text on image under palette.overlay); mobile heading sizes (type.mobile.*). - figma rules: a kit heading text style must be mapped, curated or absent. - page-sanity: report a stretched image. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
|
claude: approved on 977c8ba The PR changes only stardust. It reverts the Figma page-template binding added in #531, which deletes templates.md, figma/templates.mjs, figma-gate/page-match.mjs and their tests. It also adds reskin rendering fixes: inline marks and br, data tables with header and stripe fills, the side an image sits on in a split, a lone card, a Checks:
The PR changes how Redundant lines: none. I asked ask-baseline about the new contract lines: the stream fields Test drive: no eval run. The skill prose change is mostly a removal and the behaviour change lives in scripts that their unit tests cover. Manifests are unchanged, so installation isn't affected. |
|
codex: denied on 977c8ba The new table renderer can shift values beneath the wrong headers when a source cell is empty, corrupting the table’s meaning. Validation, release checks, lint, 217 repository tests and installation in all four clients passed. The Claude reskin-content-fidelity eval loaded reskin, but both runs stopped at placeholder URLs. Baseline probing identified no fully redundant additions. |
| if (!cols.has(cell.col)) cols.set(cell.col, { th: false, nodes: [] }); | ||
| const c = cols.get(cell.col); c.th ||= !!cell.header; c.nodes.push(n); | ||
| } | ||
| return `<table class="table">${[...rows.values()].map((cols) => `<tr>${[...cols.values()].map((c) => `<${c.th ? 'th' : 'td'}>${streamHtml(c.nodes, ctx)}</${c.th ? 'th' : 'td'}>`).join('')}</tr>`).join('')}</table>`; |
There was a problem hiding this comment.
codex: Preserve empty cells when reconstructing rows. Capture emits no node for an empty cell, and iterating cols.values() discards gaps in cell.col. I reproduced a source table with headers Item / Retail / Wholesale and row Widget / [empty] / $10: the rendered row contains only two cells, placing the wholesale price under Retail. Preserve the source cell positions and table width, and add a capture-to-render regression test with empty cells. 📷 Wholesale price incorrectly displayed under Retail (table-empty-cell.png in findings-codex)
…t on mobile Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…hs, header rows, lists never cards - A split's data table and everything after it render full width below the image and text (.split-below). - capture-content records each cell's width as a percent of its table (cell.w); the renderer keeps it with table-layout: fixed. - A table with no header cells and more than one row takes its first row as the header. - findRepeat skips a run made only of list items, so a list before a lone card stays one list. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…es a third The card image was inset by the card padding and capped at 360px high, and a single card took half the width. The leading image now bleeds to the card edges (the card padding negated per side), and one card defaults to 3 columns. On mobile the card padding drops to 24px when no token sets it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…ding and small print - Optional roles palette.linkFg|linkHoverFg|focusRing set link rest, hover and focus. - A list of only in-page #id links renders as a row of bold links, stacked on mobile. - A #top link renders right-aligned with an up arrow. - Short table rows are filled to the widest row; type.table and layout.tableCellPadding set cells. - In a split whose image follows only headings, the headings span above the image and text. - capture-content flags small print (below 90% of body size); type.small sizes it. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…t a panel, contained band image Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
…; warn a card mapped outside cards A gate fix could change a slot back to a mapping that --check had refused, and the render and deploy went ahead, because neither ran checkMapping. Now a render or --deploy-map of a page with a --check problem exits 1 and writes nothing. Problems on other pages do not block it. --check, render and --deploy-map also warn on stderr, without failing, when a slot's last image sits above a sub-heading and copy (a card) and the slot's layout is not cards. The deployed block follows the module, not the layout. Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
What and why
Removes the template binding added in #531 and fixes rendering defects found on a migrated page, generically.
Template binding removed. Pages bound to templates lost their structure: link lists, card images and section spacing broke. This reverts the template commits (
reference/templates.md,figma/templates.mjs,figma-gate/page-match.mjsand their tests). The revert restores the earlierfigma.geometryfallback. Thepage-sanitycheck stays.Rendering fixes:
capture-contentnow recordsmarks(strong em sup sub) andbron stream nodes, andstream-renderrebuilds them. Bold, superscript and forced line breaks now survive.capture-contentrecordscell({table,row,col,header?,w?}) andstream-renderrebuilds a real<table>.wis the cell's width in % of its table; the first row keeps it, withtable-layout: fixed, so the source's 50/50 or 33/33/33 columns survive. A table with no header cells and more than one row takes its first row as the header. New optional rolespalette.tableHeaderBgandpalette.tableStripeBgset the header and even-row fills.splitslot, and everything after it, renders full width below the image and its text (.split-below), as on the source page.capture-contentrecords an image'ssidebeside its text. Asplitputs the image on that side.--checkrefusessplitwhen the source image is not beside its text (an image-top card).splitstarts level with the image, and a closing button sits level with the image bottom. On mobile the image goes first. This matches both the source page and the Figma "Teaser / Text + Image" variants.cardsslot with no repeating run keeps its intro text and renders the last image and what follows it as one card.overlay(withmedia-band). The text sits on the image under apalette.overlayscrim, with no panel box.--checkrequiresmedia-band; render warns whenpalette.overlayis missing.type.mobile.display|h2|h3|h4, emitted under 640px.curatefails when the kit names a heading text style (H2,Mobile/H2) thattype.h2–h4/type.mobile.h2–h4don't map, curate or mark absent.palette.linkFg|linkHoverFg|focusRingset the inline link color, its hover color and a keyboard focus ring. On a dark band or an overlay, links keep the band's text color.#idlink renders as a row of bold links (.page-nav), stacked on mobile.#toplink renders right-aligned and bold with an up arrow, in the link hover color.type.tableandlayout.tableCellPaddingset cell text and padding.splitwhose image follows only headings, the headings span the full width above the image and its text, as on the source page.capture-contentflags a paragraph or list item set below 90% of the body copy size assmall(references, abbreviations, footnotes). The renderer sizes it with the new optional roletype.small, or 0.75em.figma-gate/type-csssets a role's font to the:rootfont stack that leads with that family (var(--heading-font-family)), so the donor's fallbacks apply. Before, a serif such as Lexia fell back to sans-serif.capture-contentrecordsalign: "center"on a section whose headings, paragraphs and list items are all centred. The renderer addsalign-center: centred text and a centred narrow panel.capture-contentrecords, on an image with text over it,backdrop(barewhen the text sits straight on the image,panelwhen a box behind the text paints),bleed(the image spans the viewport) andheight.--checkrefusesmedia-bandwithoutoverlayover a bare backdrop, so the text no longer gets a grey panel the source doesn't have.media-bandimage withbleed: falserenders inside the panel at its source height (from 900px), not full-bleed. Withoverlaythe scrim covers only that image.New stream fields:
marks,br,cell,side,small,backdrop,bleed,height, and sectionalign(documented incontent-model.md). No new scripts, hooks, MCP servers or network endpoints.How I checked it
node plugins/stardust/skills/reskin/scripts/test/<name>.test.mjsfor every reskin test: 42 of 42 pass.rgba(63, 68, 68, 0.75)scrim, header and even-row fills as set.capture-content(39 slots), rendered it withstream-renderand compared screenshots with the source at 1440 and 375 px: the split teaser's table goes full width below with 50/50 columns, the 3-column tables keep 33/33/33, and the follow-up section is the paragraphs, one list, then one card a third wide with its image filling the top; the resources cards' images fill their tops too.#4f5555, hover#d0006f, focus#830051, small 12/20, table 14/21 with 16px padding). Read the computed styles at 1440 and 375 px: section nav in a row (a column on mobile), 5 back-to-top links in#d0006faligned right, references at 12/20, every row of the 3-column table 3 cells wide, split headings above the image in 3 sections.align, imagebackdrop/bleed/height(capture),align-center, the bare-backdrop--checkand the contained band image (render) were written first and seen failing.align: center, imagebackdrop: bare,bleed: false,height: 389; the hero image recordsbare,bleed: true.checkMappingrefusesmedia-bandfor the CTA. Rendered it asmedia-band overlayat 1440 and 375 px: the image sits contained at 1200×389, the heading and button centred, with no panel box.npm run validate: passed.node scripts/check-release-configs.mjs: 0 broken.npm run lint:stardust: passed (script-help, site-names, browser-front-door, manifests).node scripts/check-skills.mjs --tokens plugins/stardust: reskin SKILL.md 4949 of 5000.node plugins/stardust/evals/lint/prose-delta.mjs: -82 lines, -649 words across skill docs.deploy/da-media-upload,deploy/deploy-batchanddynamics/dynamics-planbecause the checkout path contains a space, andreplica/measureon an image rendition width (360 vs 400).Checklist
npm run validatepasseshumanlabel is set, if a person and not an agent wrote this