feat(cv-v2): migrate Timeline Minimal preset + extract reusable timeline axis widget#63
Merged
Merged
Conversation
…ine axis widget Ports the legacy Timeline Minimal CV preset onto the v2 layered architecture and extracts the central vertical timeline axis into a reusable shared widget. Preset * CvTheme.timelineMinimal() factory wires CvPalette.timelineMinimal() (all-grey ink/muted/rule/dot scale), CvTypography.timelineMinimal() (Barlow Condensed display + Lato body, 28/7.8/13.5/12.5/7.9/7.5/7.8, 1.2 line spacing), and CvSpacing.timelineMinimal() (compact 3-column layout, 0.8pt header rule). * 3-column body composition: sidebar (Education / Skills / Expertise / Languages) | central timeline axis | main column (Professional Profile / Work Experience), weights 0.74 / 0.12 / 1.74. * Right-aligned contact stack with PNG icons (location / phone / email / LinkedIn / GitHub / fallbacks for Dribbble / Google), reading from /templates/cv/timeline-minimal/icons/ resources. * Replaced github.png and linkedin.png with new SVG-derived (mdi-github, mage-linkedin) PNGs recoloured to #7A7A7A so they match the existing email/location/phone/dribbble/google icons exactly. * Preset-local sectionLines(CvSection) flattens every v2 section subtype to single-line strings so the sidebar can apply per-module truncation limits without breaking the visual flow around the fixed-height timeline axis. TimelineAxisWidget (new shared widget) * Lives in document.templates.widgets so proposals, cover letters and other process-style documents can reuse it. * Renders segmentCount vertical line segments separated by segmentCount - 1 markers (CIRCLE / SQUARE / NONE). * Style record exposes marker, markerSize, markerFillColor, markerStroke, segmentLength, segmentCount, lineColor, lineThickness, and padding — every aspect the v1 inline implementation hard-coded is now a builder knob. * render(host, style, totalHeight) overload solves the multi-page CV request: the widget recomputes segmentLength so the rendered axis matches the supplied total height; callers that need an axis to match a sibling column's height pass the column height in. Tests * CvV2VisualParityTest exercises 12 presets (added timeline_minimal); 12/12 pass at the existing 50k pixel-diff budget against the new visual-baselines/cv-v2-layered/timeline_minimal-page-0.png baseline. * TimelineMinimalSmokeTest covers stable identity + default-factory and custom-theme render paths.
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.
Summary
Ports the legacy Timeline Minimal CV preset onto the v2 layered architecture and extracts the central vertical timeline axis into a reusable shared widget.
Visual signature (preserved from V1)
#7A7A7Amuted grey.New shared widget —
TimelineAxisWidgetLives in
document.templates.widgetsso proposals, cover letters and process/step documents can reuse it. Every aspect the v1 inline implementation hard-coded is now aStyle.builder()knob:marker—CIRCLE,SQUARE,NONEmarkerSize— diameter / side lengthmarkerFillColor/markerStrokesegmentCount/segmentLengthlineColor/lineThicknesspaddingPlus the
render(host, style, totalHeight)overload solves the multi-page CV request: the widget recomputessegmentLengthso the rendered axis matches the supplied total height; callers that need an axis to match a sibling column's height pass the column height in.Theme additions — additive
CvPalette.timelineMinimal()— all-grey scale (ink 74, muted 122, rule 195, banner/dot 170).CvTypography.timelineMinimal()— Barlow Condensed + Lato, 28/7.8/13.5/12.5/7.9/7.5/7.8, 1.2 line spacing.CvSpacing.timelineMinimal()— pageFlow 12, 0.8pt header rule.CvTheme.timelineMinimal()factory.Icons
github.pngreplaced withmdi--github.svg→ recoloured to#7A7A7A.linkedin.pngreplaced withmage--linkedin.svg→ recoloured to#7A7A7A.email.png,phone.png,location.png,dribbble.png,google.pngunchanged.Preset-local helpers
sectionLines(CvSection)flattens every v2 section subtype to single-line strings so the sidebar can apply per-module truncation limits without breaking the visual flow around the fixed-height timeline axis.excerpt(text, maxChars)for visual fit.Test plan
./mvnw test -Dtest=com.demcha.compose.document.templates.cv.v2.presets.TimelineMinimalSmokeTest -pl .— 3/3./mvnw test -Dtest=com.demcha.compose.document.templates.cv.v2.presets.CvV2VisualParityTest -Dgraphcompose.visual.approve=true -pl .— 12/12 first-time baseline approval./mvnw test -Dtest=com.demcha.compose.document.templates.cv.v2.presets.CvV2VisualParityTest -pl .— 12/12 without approveexamples/target/generated-pdfs/templates/cv/cv-timeline-minimal-v2.pdfFiles
presets/TimelineMinimal.java(639 lines),widgets/TimelineAxisWidget.java(266 lines, shared),presets/TimelineMinimalSmokeTest.java,cv-v2-layered/timeline_minimal-page-0.pngbaseline,examples/.../CvTimelineMinimalExample.java.