feat(templates): let Sidebar Portrait draw a CV longer than one page - #584
Open
DemchaAV wants to merge 1 commit into
Open
feat(templates): let Sidebar Portrait draw a CV longer than one page#584DemchaAV wants to merge 1 commit into
DemchaAV wants to merge 1 commit into
Conversation
The preset held its body in one flow.addRow. A row is one atomic band that must fit the page it starts on, so the preset capped every block to stay under that bound — two jobs, two degrees, five skills, three languages, two projects — and dropped the rest without a word. A denser CV came out looking finished, one job short. The caps could not simply be deleted either: uncapped content raised AtomicNodeTooLargeException rather than paginating. The body is a column flow now, with the same 0.34 / 0.66 weights and no gap, and all five caps are gone. Both columns continue onto the pages they need, and the page backgrounds keep painting both fills on every page. Two smaller changes come with it. The rule under each main-column section title fills the column instead of drawing a fixed 346pt: that width was 21pt wider than the column's content box on A4 and wider still on a narrower page — a row slot does not check a child's measured width, and a column does. And each section heading is kept with the block it introduces, as in every single-column preset; a body that can break at all can strand its heading at the foot of a page. The portrait geometry stays A4-sized, which now has an edge: below roughly 310pt of page width the sidebar column has no room for the photo and the layout fails instead of drawing it over the main column. SidebarPortraitContentFidelityTest renders a career denser than one page and asserts that each of its four degrees, twelve skills, five languages, five employers and three projects reached the PDF, that both columns carried past the first page, and that they stayed side by side. Visual baseline and the committed preview re-recorded; both now run to two pages.
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
Sidebar Portrait held its whole body in one
flow.addRow. A row is one atomic bandthat must fit the page it starts on, so the preset capped every block to stay under
that bound — two jobs, two degrees, five skills, three languages, two projects — and
dropped the rest without a word. A denser CV came out looking finished, one job short,
and the reader had no way to know. The caps could not simply be deleted either:
uncapped content raised
AtomicNodeTooLargeExceptionrather than paginating.What
The body is
addColumnFlownow, with the same 0.34 / 0.66 weights and no gap, and allfive caps are gone. Both columns continue onto the pages they need, and the page
backgrounds keep painting both fills on every page.
Two smaller changes ride along. The rule under each main-column section title is
line.fill()instead of a fixed 346pt: that width was 21pt wider than the column'scontent box on A4 (324.88pt) and wider still on a narrower page — a row slot does not
check a child's measured width, and a column does, which is how it surfaced. And each
section heading is kept with the block it introduces, as in every single-column preset;
a body that can break at all can strand its heading at the foot of a page. Neither moves
a pixel of the canonical render — the baseline is byte-identical across both.
The portrait geometry stays as designed, which puts a floor under the page width: below
about 310pt the sidebar column has no room left for the photo and the layout now says
so. The same page previously rendered with the portrait laid over the main column,
because the row slot skipped the check.
Tests
SidebarPortraitContentFidelityTest(new,qa) renders a career denser than one page —five jobs, four degrees, twelve skills, five languages, three projects — and asserts that
each one of them reached the PDF text, that both columns (not only the main one) carried
past the first page, and that they stayed side by side rather than stacking. Re-adding
any cap turns it red.
Visual baseline for
sidebar_portraitre-recorded (two pages now), committed previewassets/readme/examples/cv-sidebar-portrait-v2.pdfregenerated, and the full examplescatalogue (105 documents) still generates. Full reactor gate green — qa 875 — japicmp
clean against both baselines, javadoc 0 warnings.
MonogramSidebarandMintEditorialstill carry their caps; they follow one preset perPR.
MonogramSidebaris a direct swap (oneaddRowframe);MintEditorialhand-slicesitself into
PageOne/PageTworows, so that one is a rework rather than a swap.Two things this surfaces are left as separate work: continuation pages have no top safe
area (page 2 starts its first line a few points from the trimmed edge, because the
column's top padding applies once per section, not once per page), and the canonical
layout-snapshot JSON for this preset is read by no test and still records the old row
layout.