feat(templates): let Timeline Minimal draw its projects in the wide column - #593
Open
DemchaAV wants to merge 1 commit into
Open
feat(templates): let Timeline Minimal draw its projects in the wide column#593DemchaAV wants to merge 1 commit into
DemchaAV wants to merge 1 commit into
Conversation
…olumn The preset puts projects in the narrow sidebar beside education and skills, which suits a list of short labels and not a CV whose projects carry a paragraph each: twelve such projects take the sidebar three slices where the main column takes one, and every technical line wraps its way there while the wide column ends half empty. TimelineMinimal.Options.builder().projectsColumn(TimelineMinimal.Column.MAIN) moves them under the work history, where a reader meets the career first and the projects that came out of it second. create(Options) and create(BrandTheme, Options) join the existing factories and reject a null Options, as every other preset carrying one does — a null arriving from a caller's configuration is a dropped value, and rendering the stock layout for it hides that until somebody asks why the projects never moved. The block is built once and placed in one list or the other, so the default is the same block in the same column it always was: measured at a pixel budget of zero, the standard baseline does not move. The moved block is measured against the column it lands in, so the wrapping estimate follows it without further work. Column names two of Slot's constants with a different subject, so its Javadoc says which is which: a slot is where the author of the CV put a section, and every preset reads Slot.MAIN; a column is where this preset then draws one. Placement is tested off the node names the preset gives its blocks rather than off reading order. Order is only a proxy — the preset emits one body row per page, so on a document that paginates a later page's sidebar follows an earlier page's main column and the proxy inverts. The names also separate "moved" from "copied", which presence assertions cannot: the projects are counted, so a block drawn in both columns fails. The page-count case uses twelve projects because that is where the sidebar genuinely runs out of column. At nine the default also reports two pages, but for an unrelated reason — its single slice no longer fits under the masthead and is displaced whole, leaving the first page nearly blank — and asserting on that number would measure a different mechanism than this option addresses.
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
TimelineMinimaldraws projects in the narrow sidebar beside education and skills. Thatsuits a list of short labels. It does not suit a CV whose projects carry a paragraph each:
twelve such projects take the sidebar three slices where the main column takes one,
every technical line wraps its way there, and the wide column ends half empty. There was no
way to say otherwise.
What
create(Options)andcreate(BrandTheme, Options)join the existing factories, followingthe
NordicClean.Optionspattern already in the package — record,defaults(), nestedbuilder, nested enum. Both reject a null
Options, as the four sibling presets carryingone do: a null arriving from a caller's configuration is a dropped value, and rendering the
stock layout for it hides that until somebody asks why the projects never moved.
The resulting layout is the one the request asked for — sidebar: Education, Technical
Skills, Additional Information; main: Professional Summary, Professional Experience,
Projects.
Columnnames two ofSlot's constants with a different subject, so its Javadoc sayswhich is which: a slot is where the author put a section, and every preset reads
Slot.MAIN; a column is where this preset then draws one.Acceptance criteria
timeline_minimalmoves nothingMAINplaces Projects after Professional Experiencemain, andmainMetrics.paginatemeasures against that widthtimeline_minimal_projects_main-page-0.pngTests
Placement is read off the node names the preset gives its blocks
(
CvV2TimelineMinimalSidebarprojectsvs...Mainprojects), not off reading order. Order isonly a proxy: the preset emits one body row per page, so once the document paginates a later
page's sidebar follows an earlier page's main column and the proxy inverts. The names also
separate moved from copied — presence assertions cannot, and every placement test would
have passed with the block drawn in both columns.
Three sabotages — option ignored, block left in the sidebar, null accepted — all go red.
One correction worth naming. I first wrote the page-count case at nine projects, having
measured that the default needs two pages there. That number is real but the mechanism is
not the one the feature addresses: at nine the preset computes a single slice that no
longer fits under the masthead and is displaced whole, leaving the first page nearly blank.
The sidebar genuinely runs out of column at twelve, so the fixture is twelve and the
comment says why nine is the wrong evidence. (The nearly-blank page at nine is a pre-existing
estimator behaviour in the default path, not something this change introduces.)
Full reactor gate green, 943 tests.
Docs: the option joins the
NordicClean.Optionsexample inusing-templates.mdand thepreset-options paragraph in
authoring-presets.md;CvTemplates' Javadoc pointed callerswanting a variant at
create(BrandTheme)only.