Skip to content

feat(layout-resolved): carry SDT container key chain through resolved layout#3755

Draft
caio-pizzol wants to merge 3 commits into
caio/it-1188-nested-sdt-container-chainfrom
caio/it-1188-fu2-resolve-sdt-chain
Draft

feat(layout-resolved): carry SDT container key chain through resolved layout#3755
caio-pizzol wants to merge 3 commits into
caio/it-1188-nested-sdt-container-chainfrom
caio/it-1188-fu2-resolve-sdt-chain

Conversation

@caio-pizzol

Copy link
Copy Markdown
Contributor

Second step of #3752, stacked on #3753. Resolved layout now carries the SDT container key chain so the painter (FU3) can group and draw nested content-control chrome.

  • resolveFragmentSdtContainerKey now returns a key for image and drawing fragments (it returned null before), so the boundary pass can keep a control's image/drawing fragments in the same run instead of treating them as gaps.
  • New resolveFragmentSdtContainerKeys derives the full outer-to-inner chain from attrs.sdtContainers (falling back to the single nearest key), exposed as ResolvedPaintItem.sdtContainerKeys.
  • The chain is folded into deriveBlockVersion, so paint reuse invalidates when a block's content-control nesting changes even if its nearest sdt is unchanged. Added a cache-bust unit test for that case.

The actual container chrome on image/drawing fragments and the depth-aware nested boxes land in FU3; editor lock enforcement is unchanged (PM-tree based).

Stacked on #3753 - retarget to main after it merges. Refs #3745.

Verified: type-checked locally (contracts tsc build + layout-resolved DTS build both clean). Unit tests run in CI. Draft until #3753 lands and CI is green.

… layout

resolveFragmentSdtContainerKey now returns a key for image and drawing
fragments (was null), and a new resolveFragmentSdtContainerKeys derives the
full outer-to-inner chain from attrs.sdtContainers, exposed as
ResolvedPaintItem.sdtContainerKeys. The chain is folded into deriveBlockVersion
so paint reuse invalidates when a block's content-control nesting changes even
if its nearest sdt is unchanged. Adds a cache-bust unit test.

Refs #3745
@superdoc-dev superdoc-dev deleted a comment from linear-code Bot Jun 18, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant