refactor(templates): extract the theme layer to templates.core (CvTheme → BrandTheme)#248
Merged
Merged
Conversation
…me -> BrandTheme) Move the cv.v2 theme records — CvTheme, CvPalette, CvTypography, CvSpacing, CvDecoration — into a family-neutral com.demcha.compose.document.templates.core.theme package, renamed BrandTheme / Palette / Typography / Spacing / Decoration, so no template family owns the shared theme layer. Repoint every cv.v2 / coverletter.v2 caller. Render is byte-identical (1607 tests green, zero snapshot updates); the rename is a deliberate binary break on the 2.0 line (japicmp is report-only here), captured in the japicmp report. Markdown docs still naming CvTheme are updated in the Stage-1 docs refresh.
afd13a2 to
b115afc
Compare
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
The shared theme layer (palette / typography / spacing / decoration) lives inside
cv.v2, andcoverletter.v2reaches into it — so CV is the de-facto owner of tokensthat are not CV-specific. To let invoice, proposal, and any future family build on the
same theme without depending on
cv, the theme records move to a family-neutraltemplates.core. Renaming public records is a binary break, so this lands on the 2.0line.
What changed
cv.v2.theme.{CvTheme, CvPalette, CvTypography, CvSpacing, CvDecoration}→templates.core.theme.{BrandTheme, Palette, Typography, Spacing, Decoration}.cv.v2,coverletter.v2, examples and tests (82 files).core.theme.DecorationTest.Lane: templates (canonical). Target:
2.0-dev.Deferred to the Stage-1 docs refresh: markdown docs that still name
CvTheme(api-stability §4, package-map,
cv/v2/AUTHORS.md, ADR-0015, recipes) are updated in afollow-up doc pass — kept out of this diff so the rename stays reviewable. Import order
in repointed files is not re-sorted (no import-order gate; avoids noise here).
Verification
./mvnw test -pl .→Tests run: 1607, Failures: 0, Errors: 0. All snapshot andvisual-parity tests pass with zero snapshot updates → render is byte-identical.
./mvnw -P japicmp verify -pl .→ BUILD SUCCESS; javadoc gate clean. japicmp runsreport-only on the 2.0 line and its report documents the intended break
(
core.theme.*added; CV preset /LetterBodysignatures changeCvTheme→BrandTheme).examplestest-compile +GenerateAllExamples→ every example PDF regenerates.