fix(templates): keep Panel's full-width Profile card header with its body#429
Merged
Merged
Conversation
…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.
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
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, fromthe shared
renderModuleBody— could strand at a page bottom if a long summary splitthe card. #427 wired the other single-column presets to keep-with-next but left this
one, because
renderModuleBodyis shared with Panel's side-column cards, wheremarking the whole card would be wrong (it would bind a card to the next card).
What changed
renderModuleBodywraps the header (title + accent strip) in a nestedkeepWithNextsubsection whose spacing matches the card, so the header stays withthe 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 verify→ BUILD SUCCESS. Panel's visual-parity baseline isunchanged (all 16
CvV2VisualParityTestcases green — the header subsection doesnot 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.