Preserve block identity when editing from the block's start

Aperta
#550 3 commenti 1 reazione 0 assegnatari Vedi su GitHub

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
45/100
Tipo di issue
Bug
Chiarezza
Abbastanza chiara
Stato di attività
Tranquilla
Stack tecnologico
typescript
Ambito
frontend

Direzione di ricerca

The issue names no files, tests, or entry points. Reproduce the Enter and Backspace steps in a block with remembered identity, then trace the editor behavior that changes the block ID at the start of content. Done means the original block ID remains stable in both cases, including nested lists, with regression coverage added where the behavior is implemented.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

bug:P3

Describe the bug
At Mintter block Identity is really important. Specially because we let users create references to content inside blocks using its ID. I Notice that when I press Enter or Backspace in front of any block with content. I understand block identity might not be relevant to most use cases, but I find this could be a problem when you rely on content being accessible by a particular block ID.

To Reproduce

  1. write some content in a block and remember the block id
  2. move the cursor to the beginning of the block
  3. press Enter or Backspace (backspace if you are not on the first block of the document or of a nested list)
  4. see the blockID changed to the current block content.

Here's a video showing how the ID of the block changes when I press Enter in front of a block

https://github.com/TypeCellOS/BlockNote/assets/725120/cf5ba519-131a-4533-aed4-6471fa17331f

And here's what happens when pressing Backspace in front of a block

https://github.com/TypeCellOS/BlockNote/assets/725120/670d314a-7053-4ae0-a5db-fdfd33258ebd

How to solve this

I did some work to solve this on our side, and if this is relevant to the library I can share the solution with it.

Lingua principale
TypeScript
Stelle
10.2k
Fork
772
Merge medio
3g 11h
PR unite (30g)
17

Guida per i contributori

Apri la guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di TypeCellOS/BlockNote

Tutte le issue di TypeCellOS/BlockNote

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.