♻️(refacto) Drop the initialBlockId workaround of user mentions once BlockNote does

Abierto
#2,887 1 comentario 0 reacciones 0 asignados Ver en GitHub

Los mantenedores suelen responder en 3 días

Nadie ha tomado este issue todavía.

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
54/100
Tipo de issue
Refactorización
Claridad
Bastante claro
Estado de actividad
Activo
Stack tecnológico
django, react, typescript
Área
backend, frontend

Línea de trabajo

Read BlockNote's UniqueID.ts and FixUpSchema.ts references, then inspect replaceInitialBlockId in src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-inline-content/Mention/UserMention/ and its call in useSearchUserMention. Confirm how the backend validates mention anchors and how copied block links behave. Done means BlockNote supplies a UUID for the initial block (or a generation hook), the workaround and call are removed, and existing links remain valid.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

blocknote-side editor frontend

BlockNote gives the fixed id initialBlockId, not a uuid, to the first block of a new collaborative doc and keeps it once the block has content (also set in FixUpSchema.ts):
https://github.com/TypeCellOS/BlockNote/blob/ea5d80358f179d1683abcd2e0e3e9d547bf52eef/packages/core/src/extensions/tiptap-extensions/UniqueID/UniqueID.ts#L190-L216

The backend only accepts a uuid as mention anchor, so the frontend renames this block to a uuid before notifying the mentioned user (replaceInitialBlockId in src/frontend/apps/impress/src/features/docs/doc-editor/components/custom-inline-content/Mention/UserMention/, marked with a TODO); the rename breaks the #initialBlockId block links copied before it. No open BlockNote issue tracks it, the closest is TypeCellOS/BlockNote#475 (closed).

Suggested fix: ask BlockNote to give the initial block a real uuid (or a hook to generate it), then remove replaceInitialBlockId and its call in useSearchUserMention.

Lenguaje dominante
TypeScript
Estrellas
17k
Forks
705
Merge medio
4 d 13 h
PR fusionados (30 d)
47

Preparar el entorno

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de suitenumerique/docs

Todos los issues de suitenumerique/docs

Issues similares

Más issues de TypeScript

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.