Skip to content

docs(examples): publish the PPTX twins in the showcase#443

Merged
DemchaAV merged 2 commits into
developfrom
docs/pptx-twin-showcase
Jul 25, 2026
Merged

docs(examples): publish the PPTX twins in the showcase#443
DemchaAV merged 2 commits into
developfrom
docs/pptx-twin-showcase

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

The showcase could not surface a deck at all: ShowcaseSync selected artifacts with endsWith(".pdf"), and a manifest entry carried a single pdf field. So the flagships that render both formats advertised only half their output — on the release where PowerPoint output is the headline.

This turned out to be more than the "regenerate the manifest" the release plan assumed. Making a deck visible needed deck discovery, a manifest field, and a card action.

What changed

  • ShowcaseSync picks up a same-named .pptx beside a PDF, publishes it under web/showcase/pptx/, and carries it as an optional pptx field. The deck reuses the PDF's thumbnail — both backends draw the same resolved layout, so a separate render would be the same picture, and POI has no page rasteriser to make one.
  • The card gains a Get PPTX action only when the example actually rendered one, so the 82 PDF-only cards are untouched rather than carrying a dead link.
  • Three new twin flagships (BusinessReportPptxExample, FinancialReportPptxExample, MasterShowcasePptxExample) plus FlagshipPptxTwinNativeShapeTest and their committed .pptx assets. They came from a branch predating the removal of the no-arg buildPptx() and now name their destination like every other example.
  • A duplicate tag chip, fixed at the source. Every entry passes its group as a tag while withCategory prepends the same value, so 37 cards rendered the chip twice. Deduplicating inside withCategory covers all of them and cannot be reintroduced from a call site — a first pass that patched 4 call sites was reverted once the regenerated manifest showed the scale.

Five flagships now ship both formats: business-report, engine-deck, financial-report, master-showcase, and twin-output — the last of which had no showcase card at all until now.

Verified in the running site, not inferred

  • 5 of 87 cards carry the action; PDF-only cards show exactly View PDF + View Code.
  • The deck fetches 200, application/vnd.openxmlformats-officedocument.presentationml.presentation, 56 698 bytes, PK signature.
  • 0 cards with duplicate tags (was 3 visible, 34 more in data). 0 console errors.
  • Every manifest path resolves on disk (all 87 entries × pdf/pptx/screenshot).
  • Full reactor clean verify green — 1522 tests, 0 failures.

Notes for review

  • maven-banner is deliberately absent. It renders a deck with no PDF sibling; cards are PDF-driven and there is nothing to build its preview from.
  • engine-deck-v2 disappears from the manifest. EngineDeckV2Example is not registered in GenerateAllExamples (0 references), so a full run never produces it — the entry was stale, carrying the fallback description "Generated showcase for flagships / default." and a code URL pointing at the package directory. Not a regression here: cut-release.ps1 runs the same two commands, so it would have vanished at the cut. Whether that example should be registered is a separate call.
  • Regeneration churn is excluded on purpose. Re-running the generator rewrites all 87 PDFs (fresh timestamps — a 2-byte delta even on an unrelated barcode example) and re-encodes 24 PNGs. Only the substantive artifacts are committed; the release cut regenerates the rest wholesale.

DemchaAV added 2 commits July 25, 2026 14:11
…aster reports

The 2.1 PPTX backend shipped with one bespoke twin-output hero and the
Engine Deck PPTX. Add editable-PowerPoint twins for three real document
examples so the "one source, two formats" story spans everyday business
documents: BusinessReportPptxExample, FinancialReportPptxExample, and
MasterShowcasePptxExample each reuse their source example's composition and
emit the deck via buildPptx().

Extract a shared document(Path) session factory and a compose(DocumentSession)
method on BusinessReportExample and MasterShowcaseExample (FinancialReport
already had compose()), so the PDF generate() and the PPTX twin build from an
identical session config kept in one place. The report bodies are unchanged —
the large line counts on those two files are the method-extraction re-indent
(review with git diff -w).

FlagshipPptxTwinNativeShapeTest opens each rendered deck with Apache POI and
asserts native shapes dominate with only the genuinely un-vectorizable regions
rasterising (a clip-masked composite, a photo, two barcodes). The twins are
registered in GenerateAllExamples (exercised by the generate-every-example
smoke test) and linked from the examples gallery with committed .pptx previews.
The showcase could not surface a deck at all. ShowcaseSync selected artifacts
with endsWith(".pdf") and a manifest entry carried a single `pdf` field, so the
flagships that render both formats advertised only half their output — on the
release that makes PowerPoint output the headline.

Teach the sync to pick up a same-named .pptx sitting beside a PDF, publish it
under web/showcase/pptx/, and carry it as an optional `pptx` field. The card
gains a Get PPTX action only when the example actually rendered one, so the 82
PDF-only cards are untouched rather than carrying a dead link. The deck reuses
the PDF's thumbnail: both backends draw the same resolved layout, so a separate
render would be the same picture, and POI has no page rasterizer to make one.

Five flagships now ship both formats — business-report, engine-deck,
financial-report, master-showcase and twin-output, the last of which had no
showcase card at all until now. maven-banner renders a deck with no PDF sibling;
cards are PDF-driven and there is nothing to build its preview from, so it stays
out.

Fix a duplicate tag chip while regenerating: every entry passes its group as a
tag and withCategory prepends the same value, so 37 cards rendered the chip
twice. Deduplicating inside withCategory covers all of them and cannot be
reintroduced from a call site.

The three new twin examples came from a branch predating the removal of the
no-arg buildPptx(); they now name their destination like every other example.

Verified: full reactor clean verify green (1522 tests, 0 failures). Checked in
the running site — 5 of 87 cards carry the action, PDF-only cards show exactly
View PDF + View Code, the deck serves 200 with the OOXML content type and a PK
signature, no card renders a duplicate tag, and every manifest path resolves on
disk. Regeneration churn (every PDF re-renders with a fresh timestamp, 24 PNGs
re-encode) is deliberately left out; the release cut regenerates it wholesale.
@DemchaAV
DemchaAV merged commit 9eedf39 into develop Jul 25, 2026
10 checks passed
@DemchaAV
DemchaAV deleted the docs/pptx-twin-showcase branch July 25, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant