Skip to content

feat(cv-v2): migrate Timeline Minimal preset + extract reusable timeline axis widget#63

Merged
DemchaAV merged 1 commit into
developfrom
feature/cv-v2-timeline-minimal-preset
May 27, 2026
Merged

feat(cv-v2): migrate Timeline Minimal preset + extract reusable timeline axis widget#63
DemchaAV merged 1 commit into
developfrom
feature/cv-v2-timeline-minimal-preset

Conversation

@DemchaAV
Copy link
Copy Markdown
Owner

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)

  • Spaced uppercase Barlow Condensed name + uppercase job title (left, 28pt + 9.5pt).
  • Right-aligned contact stack with PNG icons (location · phone · email · LinkedIn · GitHub) in #7A7A7A muted grey.
  • Full-width 0.8pt header rule.
  • 3-column body: sidebar (Education / Skills / Expertise / Languages) | timeline axis (4 segments + 3 circles) | main (Professional Profile / Work Experience), weights 0.74 / 0.12 / 1.74.
  • All-grey palette throughout.

New shared widget — TimelineAxisWidget

Lives in document.templates.widgets so proposals, cover letters and process/step documents can reuse it. Every aspect the v1 inline implementation hard-coded is now a Style.builder() knob:

  • markerCIRCLE, SQUARE, NONE
  • markerSize — diameter / side length
  • markerFillColor / markerStroke
  • segmentCount / segmentLength
  • lineColor / lineThickness
  • padding

Plus the 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.

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.png replaced with mdi--github.svg → recoloured to #7A7A7A.
  • linkedin.png replaced with mage--linkedin.svg → recoloured to #7A7A7A.
  • email.png, phone.png, location.png, dribbble.png, google.png unchanged.

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.
  • Contact stack rendering with PNG icons + fallback glyphs.

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 approve
  • Visual review of examples/target/generated-pdfs/templates/cv/cv-timeline-minimal-v2.pdf
  • CI green

Files

  • 7 modified: 4 theme records, 2 icons (github + linkedin), parity test.
  • 5 new: presets/TimelineMinimal.java (639 lines), widgets/TimelineAxisWidget.java (266 lines, shared), presets/TimelineMinimalSmokeTest.java, cv-v2-layered/timeline_minimal-page-0.png baseline, examples/.../CvTimelineMinimalExample.java.
  • 1125 insertions, 1 deletion.

…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.
@DemchaAV DemchaAV merged commit d7a8537 into develop May 27, 2026
9 checks passed
@DemchaAV DemchaAV deleted the feature/cv-v2-timeline-minimal-preset branch May 27, 2026 07:53
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