feat(cv-v2): migrate Executive preset#61
Merged
Conversation
Ports the legacy Executive CV preset (ExecutiveSlateCvTemplate) onto the v2 layered architecture. The new preset is a thin orchestrator: * CvTheme.executive() factory wires CvPalette.executive() (mid-slate ink, soft muted slate, V1 muted-rule grey) + CvTypography.executive() (Poppins headline, Lato body, 24/9.1/10.8/9.5/9.5/9.0/9.5, 1.25 line spacing) + CvSpacing.executive() (8pt page-flow, 1.1pt rule). * PRIMARY_NAME (deep slate rgb(24,35,51)) and ACCENT (warm bronze rgb(172,112,55)) stay preset-local as fifth/sixth tokens — no other v2 preset shares them today. * Header is preset-local inline DSL: Headline.uppercaseLeftAligned with the Poppins slate name style, an inline meta paragraph (address | phone), an inline link row (email + custom links, with bronze underlined link style and ' | ' separators), and a full-width muted rule. V1 splits meta and links across two rows — no existing contact widget has that exact shape, so inline DSL beats a one-off widget variant. * Module bodies reuse SectionHeader.flat (uppercase bronze title) + SectionDispatcher.renderBody, so the preset gets paragraph / skills / rows / entries dispatch for free. * 0 copies of the dropped style() wrapper, 0 local markdown helpers, 0 changes to shared widgets or theme records (only additive new factories on CvPalette / CvTypography / CvSpacing / CvTheme). Tests: * CvV2VisualParityTest now exercises 10 presets (added Executive), 10/10 pass at the existing 50k pixel-diff budget against fresh baselines under visual-baselines/cv-v2-layered/. * ExecutiveSmokeTest covers stable identity + default-factory and custom-theme render paths. * Full canonical suite: 936/936 (was 932 — +1 parameterized parity case + 3 smoke tests).
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 Executive CV preset (
ExecutiveSlateCvTemplate) onto the v2 layered architecture. The new preset is a thin orchestrator that reusesHeadline,SectionHeader.flat, andSectionDispatcher; the only preset-local piece is the inline header block (V1 splits meta and links across two rows — no existing contact widget has that exact shape).Visual signature (preserved from V1)
address | phone.email | label1 | label2with bronze (rgb(172,112,55)) underlined links + ' | ' separators.Theme — additive only
CvPalette.executive()— mid-slate ink, soft muted slate, V1 muted-rule grey.CvTypography.executive()— Poppins headline + Lato body, sizes 24/9.1/10.8/9.5/9.5/9.0/9.5, line-spacing 1.25.CvSpacing.executive()— 8pt page-flow, 1.1pt accent rule, 2pt paragraph top.CvTheme.executive()— wires the three above +CvDecoration.classic().PRIMARY_NAMEandACCENTstay preset-local (fifth/sixth tokens; same pattern as NordicClean / EditorialBlue).Test plan
./mvnw test -Dtest=com.demcha.compose.document.templates.cv.v2.presets.ExecutiveSmokeTest -pl .— 3/3./mvnw test -Dtest=com.demcha.compose.document.templates.cv.v2.presets.CvV2VisualParityTest -Dgraphcompose.visual.approve=true -pl .— first-time baseline approval (10/10)./mvnw test -Dtest=com.demcha.compose.document.templates.cv.v2.presets.CvV2VisualParityTest -pl .— 10/10 without approve (baselines locked in)./mvnw test -pl .— 936/936 full canonical suiteexamples/target/generated-pdfs/templates/cv/cv-executive-v2.pdfFiles
CvPalette.java,CvTypography.java,CvSpacing.java,CvTheme.java,CvV2VisualParityTest.javapresets/Executive.java,presets/ExecutiveSmokeTest.java, twocv-v2-layered/executive-page-*.pngbaselines,examples/.../CvExecutiveExample.java