refactor(examples): render invoice/proposal examples via the layered presets#270
Merged
Conversation
…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.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
Stage-2 stood up the layered
invoice/v2(ModernInvoice) andproposal/v2(ModernProposal) families (#257/#264/#269). This PR moves the example + demo-test consumers off the cinematic builtinsInvoiceTemplateV2/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— renderModernInvoice/ModernProposalon aBrandTheme(same class names + output pathsinvoice-cinematic.pdf/proposal-cinematic.pdf, so showcase/README keys are unchanged). The proposal output now includes its header —ModernProposalfixes the builtin's dropped-header bug.HttpStreamingExample/LayoutSnapshotRegressionExample— swap the invoice fixture toModernInvoice; the snapshot baseline lives in the generated (gitignored) dir and regenerates.HttpStreamingDemoTest/LayoutSnapshotRegressionDemoTest— follow their examples ontoModernInvoice(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-removedBusinessTheme;ModernInvoice's accent is preset-local so a customBrandThemecan't fully vary it. Deferred to the Phase-3 cleanup (delete withBusinessTheme).InvoiceTemplateV2Test/ProposalTemplateV2Test/*DemoTest) — retire with the builtins in 2.0.which-template-system"Recommended" matrix), so the docs don't go inconsistent piecemeal.MasterShowcaseExampleandCinematicProposalFileExamplewere 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).