CollaborationExtension registered at runtime installs no sync plugin, so edits never reach the Y.Doc
Los mantenedores suelen responder en 2 días
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 25/100
- Tipo de issue
- Error
- Claridad
- Bastante claro
- Estado de actividad
- Activo
- Stack tecnológico
- react, typescript
Línea de trabajo
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.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
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.
- Lenguaje dominante
- TypeScript
- Estrellas
- 10.3k
- Forks
- 778
- Merge medio
- 2 d 12 h
- PR fusionados (30 d)
- 27
Preparar el entorno
- Sin Dockerfile ni archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de TypeCellOS/BlockNote
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
TypeCellOS/BlockNote#2949 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
a11y
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
TypeCellOS/BlockNote#2855 ·
Los mantenedores suelen responder en 2 días
-
a11y
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
TypeCellOS/BlockNote#2829 · 1 comentario ·
Los mantenedores suelen responder en 2 días
-
Comment thread actions: hover-only controls and unlabeled buttons in ThreadsSidebaPosiblemente ocupada Un pull request vinculado a esta issue está abierto o ya se fusionó. Abiertoa11y
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
TypeCellOS/BlockNote#2824 ·
Los mantenedores suelen responder en 2 días
-
needs-triage
Dificultad 3/5 1-2 días Aptitud para principiantes 58/100
TypeCellOS/BlockNote#3165 ·
Los mantenedores suelen responder en 2 días
Todos los issues de TypeCellOS/BlockNote
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100
NousResearch/hermes-agent#136483 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
Los mantenedores suelen responder en 1 día
-
Tool errors containing cycles or BigInt crash getErrorMessage and replace the original failureAbiertofactory-active factory-automatic task-bug-reproduction-success task-identify-harness-labels-done task-identify-issue-type-done
Dificultad 2/5 1-3 horas Aptitud para principiantes 62/100
vercel/ai#22796 · 2 comentarios ·
Los mantenedores suelen responder en 1 día
-
[Bug]: Web chat input doesn't regain focus after a reply finishesPosiblemente ocupada @GaijinSystems la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
zeroclaw-labs/zeroclaw#11658 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 75/100
babylonlabs-io/babylon-toolkit#2711 ·
Los mantenedores suelen responder en 1 día