Conversation
e779920 to
58d31ed
Compare
58d31ed to
d3bf2c7
Compare
d3bf2c7 to
aa95ecd
Compare
| @BlockDataMigrationVersion(migrate.version) | ||
| class RichTextBlockData extends BlockData { | ||
| @BlockField({ type: "json" }) | ||
| @BlockField({ type: "richTextBlock", linkBlock: LinkBlock }) |
There was a problem hiding this comment.
if someone doesn't use our cli package to generate-block-types and accesses the bkock-meta json directly this is incompatible. Should we ignore that?
There was a problem hiding this comment.
I've found five projects that have a custom generate-block-types.ts script, two of them being unmaintained. Should we update the three projects or target next for this? I can work around the duplicate space block in the application.
There was a problem hiding this comment.
@nsams I'd target next and make this a breaking change, what do you think?
There was a problem hiding this comment.
if you don't need it in main the easiest solution if of course next.
There was a problem hiding this comment.
It now targets next. I also started the migration guide.
The block meta didn't say which link block is used for links inside rich text content, so consumers of block-meta.json had no way to resolve the link data embedded in the content. Blocks created with createRichTextBlock now use a new RichTextBlock field kind (instead of Json) for draftContent, which carries the link block. Blocks created with createTipTapRichTextBlock carry it in their existing TipTapRichTextBlock field, next to the child blocks. The generated block types are unchanged: rich text fields are still typed as unknown, but generate-block-types has to know the new field kind. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HpJKNHRbSSBCFdfgLao1zo
aa95ecd to
02b148d
Compare
Add the guide for the breaking changes that are on next so far: the new RichTextBlock field kind in the block meta and the removal of FormMutation. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01HpJKNHRbSSBCFdfgLao1zo
02b148d to
69bef12
Compare
Addresses #6340 (comment): add the rich text blocks' link blocks to the block meta instead of adding a new
referencedBlocksfield toBlock.Rich text blocks created with
createRichTextBlocknow use the newRichTextBlockfield kind (instead ofJson) for theirdraftContentfield, which contains the link block:{ "name": "draftContent", "kind": "RichTextBlock", "nullable": false, "linkBlock": "Link" }Rich text blocks created with
createTipTapRichTextBlockcontain the link block in their existingTipTapRichTextBlockfield, next to the child blocks. It is omitted when links are disabled:{ "name": "tipTapContent", "kind": "TipTapRichTextBlock", "nullable": false, "childBlocks": {}, "linkBlock": "Link" }Since the field kind of
draftContentchanges, this is a breaking change for projects that readblock-meta.jsonthemselves. The changeset is therefore a major one and the branch targetsnext(the base branch of this PR still needs to be changed frommaintonext).The second commit starts the v11 migration guide with the section for this change.
https://claude.ai/code/session_01HpJKNHRbSSBCFdfgLao1zo