refactor(templates): extract shared widgets to templates.core.widgets#251
Merged
Conversation
Move the family-neutral widgets — CardWidget, TableWidget, TimelineAxisWidget — and the Divider / AccentStrip / Spacer decoration primitives into com.demcha.compose.document.templates.core.widgets so any template family can reuse them, and retire the now-empty templates.widgets and templates.decorations packages. Repoint the cv.v2 / coverletter.v2 callers and relocate the widget and decoration test mirrors. Pure move — render byte-identical (1612 tests, zero snapshot updates); a deliberate binary break on the 2.0 line (japicmp report-only).
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 family-neutral visual widgets (
CardWidget,TableWidget,TimelineAxisWidget)and the decoration primitives (
Divider,AccentStrip,Spacer) lived in thetop-level
templates.widgets/templates.decorationspackages. Moving them intotemplates.core.widgetsfinishes the neutral core so invoice / proposal can reuse themalongside the theme / text / identity layers. A package move of public types is a binary
break, so this lands on the 2.0 line.
What changed
core.widgets:CardWidget,TableWidget,TimelineAxisWidget,AccentStrip,Divider,Spacer. Addedcore/widgets/package-info.java.templates.widgetsandtemplates.decorationspackages(removed their
package-info).cv.v2/coverletter.v2callers and relocated the fourwidget / decoration test mirrors to
core.widgets.Lane: templates (canonical). Target:
2.0-dev.Deferred: the decoration primitives are currently unused by
cv.v2(it hand-rollsinline spacer/strip nodes); wiring everyone to the shared helpers (the dedupe) and adding
dedicated
CardWidget/TimelineAxisWidgettests are Stage-2 follow-ups, done wheninvoice / proposal land a real consumer.
.mddoc renames ride the docs refresh.Verification
./mvnw -P japicmp verify -pl .→Tests run: 1612, Failures: 0, Errors: 0— zerosnapshot updates → render byte-identical; javadoc gate clean; japicmp report-only.
./mvnw javadoc:javadoc -pl .→ BUILD SUCCESS (the strict report gate CI runs — caughtand fixed a dangling package
{@link}incv/v2/widgets/package-info.java).examplestest-compile +GenerateAllExamples→ every example PDF regenerates.