CollaborationExtension registered at runtime installs no sync plugin, so edits never reach the Y.Doc
維護者通常 1 天內回覆
評估
- 難度
- 4/5
- 預估耗時
- 3-5 天
- 新手友好度
- 25/100
- Issue 類型
- 缺陷
- 描述清晰度
- 基本清楚
- 活躍度
- 活躍
- 技術堆疊
- react, typescript
研究方向
Start in ExtensionManager.replaceExtension, which installs the plugins of the extension passed in but skips its nested blockNoteExtensions; CollaborationExtension is where YSync, YCursor and YUndo live. Reproduce by creating an editor without the collaboration option and registering CollaborationExtension at runtime, then check whether the Y.XmlFragment changes after typing. Done means nested extensions are installed on runtime registration, or registration throws when they cannot be.
由索引模型根據 Issue 內容生成。
描述
Version: BlockNote 0.55 (@blocknote/core, @blocknote/react)
What happens
Collaboration registered on an editor that already exists doesn't sync. The editor becomes editable, typing works locally, and nothing is written to the Y.XmlFragment, so edits are silently lost.
We create a read-only editor without collaboration (fed a static snapshot, no provider). When the user switches to editing, we attach collaboration to that same editor instead of remounting it, which keeps scroll position and node views stable.
Cause (from reading the source)
ExtensionManager.replaceExtension installs the ProseMirror plugins of the extension it is given, but not those of that extension's nested blockNoteExtensions. For CollaborationExtension, the nested ones carry the actual plugins: YSync, YCursor, YUndo and the rest. So none of them are installed.
Workaround
Registering the sub-extensions flat works, in this order (the cursor plugin reads the sync plugin's state in its init):
- YSync
- YCursor
- YUndo
- ForkYDoc
- RelativePositionMapping
- SchemaMigration
FixUpSchemaExtension is not exported, so it can't be registered that way.
Repro
- Create an editor without the
collaborationoption. - Register
CollaborationExtensionat runtime, with aY.XmlFragmentand a provider. - Type in the editor.
- The fragment stays empty, and other clients see nothing.
Expected
Either nested blockNoteExtensions are installed when an extension is registered at runtime, or registering an extension whose nested extensions can't be installed throws instead of failing silently. A documented way to attach collaboration to an existing editor would also help.
- 主要語言
- TypeScript
- 星號
- 10.3k
- 分支
- 777
- 平均合併
- 2 天 10 小時
- 30 天內合併 PR
- 39
環境準備
- 沒有 Dockerfile 或 Docker Compose 檔案
- 有 Pull Request 範本
- 閱讀貢獻指南
從這裡開始
- 先讀完整個 Issue,再讀專案的貢獻指南。
- 在 Issue 下留言說明你要接手 —— 這能避免兩個人做同樣的事。
- Fork 儲存庫,在一個分支上完成修改。
- 送出 Pull Request,並在描述裡引用這個 Issue 編號。
TypeCellOS/BlockNote 的其他 Issue
-
難度 2/5 1-3 小時 新手友好度 82/100
TypeCellOS/BlockNote#2949 · 1 則留言 ·
維護者通常 1 天內回覆
-
a11y
難度 2/5 1-3 小時 新手友好度 68/100
TypeCellOS/BlockNote#2855 ·
維護者通常 1 天內回覆
-
a11y
難度 2/5 1-3 小時 新手友好度 62/100
TypeCellOS/BlockNote#2829 · 1 則留言 ·
維護者通常 1 天內回覆
-
Comment thread actions: hover-only controls and unlabeled buttons in ThreadsSideba可能已有人在做 關聯的 PR 仍在進行中或已合併。 未關閉a11y
難度 2/5 1-3 小時 新手友好度 72/100
TypeCellOS/BlockNote#2824 ·
維護者通常 1 天內回覆
-
難度 4/5 3-5 天 新手友好度 45/100
TypeCellOS/BlockNote#3189 · 1 則留言 ·
維護者通常 1 天內回覆
查看 TypeCellOS/BlockNote 的全部 Issue
相似的 Issue
-
ui(ListToolbar): search takes the full row on a phone instead of sharing it with the result count未關閉
難度 2/5 1-3 小時 新手友好度 64/100
維護者通常 1 天內回覆
-
priority:high
難度 2/5 1-3 小時 新手友好度 72/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 78/100
維護者通常 1 天內回覆
-
難度 2/5 1-3 小時 新手友好度 65/100
immich-app/immich#32426 ·
維護者通常 1 天內回覆
-
documentation good first issue hacktoberfest help wanted
難度 2/5 1-3 小時 新手友好度 78/100
libredb/libredb-studio#1756 ·
維護者通常 1 天內回覆