Skip to content

fix(templates): keep Panel's full-width Profile card header with its body#429

Merged
DemchaAV merged 1 commit into
developfrom
fix/panel-profile-header-keep-with-next
Jul 22, 2026
Merged

fix(templates): keep Panel's full-width Profile card header with its body#429
DemchaAV merged 1 commit into
developfrom
fix/panel-profile-header-keep-with-next

Conversation

@DemchaAV

Copy link
Copy Markdown
Owner

Why

Panel renders its full-width Profile card in the single-column page flow via a
splittable CardWidget. Its header — the module title paragraph + accent strip, from
the shared renderModuleBody — could strand at a page bottom if a long summary split
the card. #427 wired the other single-column presets to keep-with-next but left this
one, because renderModuleBody is shared with Panel's side-column cards, where
marking the whole card would be wrong (it would bind a card to the next card).

What changed

  • renderModuleBody wraps the header (title + accent strip) in a nested
    keepWithNext subsection whose spacing matches the card, so the header stays with
    the body's first line. In the full-width Profile card (page flow) the header
    relocates with its body across a page break; in the side cards (fixed Row columns)
    keep-with-next is inert, so those cards are untouched. Reuses SectionNode.keepWithNext
    — no new API, and the subsection is transparent and spacing-matched, so placement is
    unchanged.

Verification

Full reactor clean verifyBUILD SUCCESS. Panel's visual-parity baseline is
unchanged (all 16 CvV2VisualParityTest cases green — the header subsection does
not shift any pixel). +1 test PresetHeaderKeepWithNextTest.panelKeepsCardHeaderSubsectionNotCard:
every module header subsection is keep-with-next, and the card sections that wrap
header and body are not.

Lane: templates (Panel preset). Follows #427 / #428 — completes the single-column
keep-with-next coverage.

…body

Panel renders its full-width Profile card in the single-column page flow via a
splittable CardWidget; its header (module title + accent strip, from the shared
renderModuleBody) could strand at a page bottom if a long summary split the card. The
other single-column presets were wired for this already, but renderModuleBody is
shared with Panel's side-column cards, where marking the whole card would be wrong.

Wrap the header (title + accent strip) in a nested keep-with-next subsection whose
spacing matches the card, so the header stays with the body's first line. In the
full-width Profile card (page flow) the header relocates with its body; in the side
cards (fixed Row columns) keep-with-next is inert, so those cards are byte-identical.
Reuses SectionNode.keepWithNext — no new API.
@DemchaAV
DemchaAV merged commit 1d8ed1d into develop Jul 22, 2026
12 checks passed
@DemchaAV
DemchaAV deleted the fix/panel-profile-header-keep-with-next branch July 22, 2026 21:57
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