CollaborationExtension registered at runtime installs no sync plugin, so edits never reach the Y.Doc
Mantenedores costumam responder em até 2 dias
Avaliação
- Dificuldade
- 4/5
- Tempo estimado
- 3-5 dias
- Facilidade para iniciantes
- 25/100
- Tipo de issue
- Bug
- Clareza
- Razoavelmente clara
- Status de atividade
- Ativa
- Stack de tecnologia
- react, typescript
Direção de pesquisa
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.
Escrita pelo modelo de indexação a partir do texto da issue.
Descrição
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.
- Linguagem predominante
- TypeScript
- Estrelas
- 10.3k
- Forks
- 778
- Merge médio
- 2d 12h
- PRs com merge (30d)
- 27
Preparar o ambiente
- Sem Dockerfile nem arquivo Docker Compose
- Tem um modelo de pull request
- Ler o guia de contribuição
Primeiros passos
- Leia a issue inteira e depois o guia de contribuição do projeto.
- Comente na issue dizendo que vai assumir — evita que duas pessoas façam o mesmo trabalho.
- Faça um fork do repositório e trabalhe em uma branch.
- Abra um pull request que referencie o número da issue.
Mais de TypeCellOS/BlockNote
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 82/100
TypeCellOS/BlockNote#2949 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
a11y
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
TypeCellOS/BlockNote#2855 ·
Mantenedores costumam responder em até 2 dias
-
a11y
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
TypeCellOS/BlockNote#2829 · 1 comentário ·
Mantenedores costumam responder em até 2 dias
-
Comment thread actions: hover-only controls and unlabeled buttons in ThreadsSidebaTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertaa11y
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 72/100
TypeCellOS/BlockNote#2824 ·
Mantenedores costumam responder em até 2 dias
-
needs-triage
Dificuldade 3/5 1-2 dias Facilidade para iniciantes 58/100
TypeCellOS/BlockNote#3165 ·
Mantenedores costumam responder em até 2 dias
Todas as issues de TypeCellOS/BlockNote
Issues semelhantes
-
area: desktop area: website priority: P2 type: feature
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 62/100
appandflow/stim#3411 · 1 comentário ·
Mantenedores costumam responder em até 1 dia
-
needs triage
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 65/100
rjsf-team/react-jsonschema-form#5485 ·
Mantenedores costumam responder em até 2 dias
-
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 68/100
Mantenedores costumam responder em até 1 dia
-
community first-timers-only good first issue hacktoberfest help wanted low hanging fruit up-for-grabs
Dificuldade 1/5 Menos de uma hora Facilidade para iniciantes 65/100
lingdojo/kana-dojo#32090 · 1 comentário · 5 reações ·
Mantenedores costumam responder em até 1 dia
-
Friction: Org home and org switcher copy still say repositories and connected agents live in the personal accountTalvez já em andamento Um pull request vinculado a esta issue está aberto ou já foi mesclado. Abertafriction
Dificuldade 2/5 1-3 horas Facilidade para iniciantes 80/100
kentcdodds/kody#3265 ·
Mantenedores costumam responder em até 1 dia