Skip to content

feat(templates): let Timeline Minimal draw its projects in the wide column - #593

Open
DemchaAV wants to merge 1 commit into
feature/cv-constructor-layerfrom
feat/timeline-projects-column
Open

feat(templates): let Timeline Minimal draw its projects in the wide column#593
DemchaAV wants to merge 1 commit into
feature/cv-constructor-layerfrom
feat/timeline-projects-column

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

TimelineMinimal draws projects in the narrow sidebar beside education and skills. That
suits 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

TimelineMinimal.create(
        TimelineMinimal.Options.builder()
                .projectsColumn(TimelineMinimal.Column.MAIN)
                .build());

create(Options) and create(BrandTheme, Options) join the existing factories, following
the NordicClean.Options pattern already in the package — record, defaults(), nested
builder, nested enum. Both reject a null Options, as the four sibling presets carrying
one 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.

Column names two of Slot's constants with a different subject, so its Javadoc says
which 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

Default unchanged The block is built once and placed in one list or the other. Measured at a pixel budget of 0, timeline_minimal moves nothing
MAIN places Projects after Professional Experience Asserted structurally, see below
Pagination against the main column width Falls out: the block joins main, and mainMetrics.paginate measures against that width
Nothing lost Every project counted, plus the work history, sidebar blocks and an unclaimed section
Separate visual test for the variant New parity row + timeline_minimal_projects_main-page-0.png

Tests

Placement is read off the node names the preset gives its blocks
(CvV2TimelineMinimalSidebarprojects vs ...Mainprojects), not off reading order. Order is
only 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.Options example in using-templates.md and the
preset-options paragraph in authoring-presets.md; CvTemplates' Javadoc pointed callers
wanting a variant at create(BrandTheme) only.

…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.
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