Skip to content

feat(cv-v2): markdown cleanup, widget extraction, drop preset style wrapper#60

Merged
DemchaAV merged 1 commit into
developfrom
feature/cv-v2-markdown-cleanup
May 26, 2026
Merged

feat(cv-v2): markdown cleanup, widget extraction, drop preset style wrapper#60
DemchaAV merged 1 commit into
developfrom
feature/cv-v2-markdown-cleanup

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Summary

  • Route v2 preset rich-text through MarkdownInline / RichParagraphRenderer — no preset touches the engine MarkDownParser directly anymore.
  • Extract shared body renderers (EntryCompactRenderer, ProjectRenderer, LabelValueRenderer, SkillLineRenderer, SkillTableRenderer) and shared widgets (FlowSectionHeader, Masthead, ProfileBand, SectionModule, CardWidget) so v2 presets stay thin orchestrators.
  • Drop the duplicated private static DocumentTextStyle style(...) wrapper from 5 presets (BlueBanner, ClassicSerif, CompactMono, EditorialBlue, NordicClean). All call sites use CvTextStyles.of(...) directly; unused FontName imports are removed.
  • Inline single-use isEducation / isProjects helpers in EditorialBlue via SectionLookup; replace inline DocumentTextStyle.builder() in BlueBanner banner title with CvTextStyles.of for consistency.

Preset size impact (drop-style-wrapper pass)

Preset Before After Δ
BlueBanner 250 241 −9
EditorialBlue 351 338 −13
ClassicSerif 353 346 −7
CompactMono 384 377 −7
NordicClean 510 503 −7
Σ 1848 1805 −43

Test plan

  • ./mvnw test -Dtest=com.demcha.compose.document.templates.cv.v2.presets.CvV2VisualParityTest -pl . — 9/9 pixel baselines unchanged (no -Dgraphcompose.visual.approve)
  • ./mvnw test -Dtest='com.demcha.compose.document.templates.cv.v2.**' -pl . — 82/82 cv/v2 tests
  • ./mvnw test -pl . — 932/932 full canonical suite
  • CI green

…rapper

* Route preset rich-text through MarkdownInline / RichParagraphRenderer
  instead of touching the engine MarkDownParser directly. Presets that
  used .rich(...) now share one adapter.
* Extract shared body renderers (EntryCompactRenderer, ProjectRenderer,
  LabelValueRenderer, SkillLineRenderer, SkillTableRenderer) and shared
  widgets (FlowSectionHeader, Masthead, ProfileBand, SectionModule,
  CardWidget) so v2 presets stay thin orchestrators.
* Drop the duplicated 'private static DocumentTextStyle style(...)'
  wrapper from BlueBanner, ClassicSerif, CompactMono, EditorialBlue,
  NordicClean. All call sites now use CvTextStyles.of(...) directly
  and the unused FontName imports are removed.
* Inline single-use isEducation / isProjects helpers in EditorialBlue
  via SectionLookup, and replace inline DocumentTextStyle.builder()
  for the BlueBanner banner-title with CvTextStyles.of for consistency.

All cv/v2 pixel baselines unchanged: CvV2VisualParityTest passes 9/9
without -Dgraphcompose.visual.approve, smoke tests 24/24, full suite
932/932.
@DemchaAV DemchaAV merged commit ec7a87b into develop May 26, 2026
9 checks passed
@DemchaAV DemchaAV deleted the feature/cv-v2-markdown-cleanup branch May 26, 2026 08:55
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