Skip to content

refactor(examples): render invoice/proposal examples via the layered presets#270

Merged
DemchaAV merged 1 commit into
2.0-devfrom
feat/examples-off-builtins-v2
Jun 29, 2026
Merged

refactor(examples): render invoice/proposal examples via the layered presets#270
DemchaAV merged 1 commit into
2.0-devfrom
feat/examples-off-builtins-v2

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

Stage-2 stood up the layered invoice/v2 (ModernInvoice) and proposal/v2 (ModernProposal) families (#257/#264/#269). This PR moves the example + demo-test consumers off the cinematic builtins InvoiceTemplateV2 / ProposalTemplateV2, so those builtins keep no example consumer — only their own unit tests, which retire with them in the 2.0 cleanup.

What

  • InvoiceCinematicFileExample / ProposalCinematicFileExample — render ModernInvoice / ModernProposal on a BrandTheme (same class names + output paths invoice-cinematic.pdf / proposal-cinematic.pdf, so showcase/README keys are unchanged). The proposal output now includes its header — ModernProposal fixes the builtin's dropped-header bug.
  • HttpStreamingExample / LayoutSnapshotRegressionExample — swap the invoice fixture to ModernInvoice; the snapshot baseline lives in the generated (gitignored) dir and regenerates.
  • HttpStreamingDemoTest / LayoutSnapshotRegressionDemoTest — follow their examples onto ModernInvoice (assertions unchanged: stream-not-closed / size-parity; deterministic-snapshot / structural-diff).

No engine (src/main) change.

Intentionally left (out of scope)

  • CustomBusinessThemeExample + CustomBusinessThemeDemoTest — demo the 2.0-removed BusinessTheme; ModernInvoice's accent is preset-local so a custom BrandTheme can't fully vary it. Deferred to the Phase-3 cleanup (delete with BusinessTheme).
  • The builtins' own tests (InvoiceTemplateV2Test / ProposalTemplateV2Test / *DemoTest) — retire with the builtins in 2.0.
  • Doc repointing — a separate coherent pass (getting-started / first-document / recipes + the interlinked which-template-system "Recommended" matrix), so the docs don't go inconsistent piecemeal.

MasterShowcaseExample and CinematicProposalFileExample were false positives (prose-only / hand-authored) — untouched.

Tests

./mvnw verify javadoc:javadoc -pl . → BUILD SUCCESS, 1625 tests, 0 failures; javadoc clean. All 4 migrated examples render valid PDFs (proposal-cinematic now shows its header).

…presets

Migrate the example + demo-test consumers of builtins.InvoiceTemplateV2 /
ProposalTemplateV2 to the layered ModernInvoice / ModernProposal presets,
so the cinematic builtins keep no example consumer — only their own unit
tests, which retire with them in 2.0.

- InvoiceCinematicFileExample / ProposalCinematicFileExample: render
  ModernInvoice / ModernProposal on a BrandTheme (same filenames + output
  paths). The proposal output now includes its header — ModernProposal
  fixes the builtin's dropped-header bug.
- HttpStreamingExample / LayoutSnapshotRegressionExample: swap the invoice
  fixture to ModernInvoice; the snapshot baseline (generated dir) regenerates.
- HttpStreamingDemoTest / LayoutSnapshotRegressionDemoTest: follow their
  examples onto ModernInvoice.

No engine change. CustomBusinessThemeExample (demos the 2.0-removed
BusinessTheme) and the builtins' own tests are intentionally left for the
2.0 cleanup; the template-doc repointing is a separate coherent pass.
@DemchaAV DemchaAV merged commit 6ed8b5d into 2.0-dev Jun 29, 2026
11 checks passed
@DemchaAV DemchaAV deleted the feat/examples-off-builtins-v2 branch June 29, 2026 16:22
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