feat(xl-multi-column): migrate columns onto the container block API - #2998
feat(xl-multi-column): migrate columns onto the container block API#2998nperez0111 wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
@blocknote/ariakit
@blocknote/code-block
@blocknote/core
@blocknote/diagram-block
@blocknote/mantine
@blocknote/math-block
@blocknote/react
@blocknote/server-util
@blocknote/shadcn
@blocknote/xl-ai
@blocknote/xl-docx-exporter
@blocknote/xl-email-exporter
@blocknote/xl-multi-column
@blocknote/xl-odt-exporter
@blocknote/xl-pdf-exporter
commit: |
|
Part 2 of 3 of the container blocks stack (1: core API, 2: multi-column migration ← you are here, 3: docs & examples). Stacked on #2997.
What this does
Migrates
@blocknote/xl-multi-columnfrom hand-written ProseMirror nodes onto the container block API from the previous PR, and deletes the legacy compatibility shims that PR carried for it.column/columnListare now regularcreateBlockSpeccontainer blocks (pm-nodes/Column.tsandpm-nodes/ColumnList.tsdeleted):columnList:children: { allow: ["column"], min: 2, whenEmptied: "unwrap" }column:placement: "containerOnly", so it can only ever live inside acolumnListmeta.draggable: false, matching the previous side-menu behaviorfixColumnList.tsdeleted along with every// Legacyshim from the previous PR (blockToNode, internal HTML serializer,UniqueIDtypes,Exporter.isContainerBlock,containerUI,fragmentToBlocks,fixContainer).ColumnResizeExtension(widths are no longer a schema prop concern of core).Behavior notes
data-children-ofmarkers on the children hosts,data-widthnow handled by the resize extension).insertBlockswith a partialcolumnList(missing columns/children) now auto-fills from the container config instead of throwing, matching every other container block.Testing
fixColumnLists.test.ts→fixContainer.test.ts(same scenarios against the generic repair), newenter.test.tsandcolumnResize.test.ts.tests/src/end-to-end/multicolumn) extended for the migrated behavior; full suite green.