Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

[Beta]: The Authored Changes example draws no mark for a pending deletion of a mention or a media block, or for a pending paragraph split or join

Aperta
#5,282 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
3/5
Tempo stimato
1-2 giorni
Idoneità per principianti
65/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
react, typescript
Ambito
frontend, testing

Direzione di ricerca

Start with apps/www/src/app/(app)/examples/plite/_examples/authored-changes.tsx, especially ReviewVoid, ReviewLeaf and ReviewElement, which the issue identifies as the example components involved. Read the related block deletion guidance and run the authored changes browser tests in apps/plite/tests/plite-browser/authored-changes.spec.ts. Done means pending mention and media deletions and paragraph splits or joins have visible marks in the example.

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

Descrizione

bug target:beta

Testing lane

  • Repository: udecode/plate
  • Branch: next
  • Release channel: Beta
  • Exact commit/package version: NOT_ENOUGH_INFO

Summary

On /examples/plite/authored-changes in Suggest, a pending deletion of a mention or a media block, and a pending paragraph split or join, show no mark in the text. The mention and the media block look the same as before, and the split or joined lines look like plain lines. Only the cards under Pending proposals show that anything is pending. A pending deletion of a letter in the same view is drawn struck through on red.

Reproduction

The page has a Sample document menu and two views of one shared document: Accepted content on the left and Proposed content on the right. The right view starts in Suggest, editing as Alice. Pending changes show as cards under Pending proposals.

Repro 1: /examples/plite/authored-changes, Chromium

An agent ran this with Playwright on 2026-10-24.

  1. Open https://beta.platejs.org/examples/plite/authored-changes.
  2. Choose Mentions and media in Sample document. The right view shows A @Alice B, a gray block labeled Preview and CD.
  3. In Proposed content, click just before B and press Backspace. A card Alice · delete appears.
  4. Click the Preview block and press Backspace. A second Alice · delete card appears.
  5. For comparison, click after CD and press Backspace. A third Alice · delete card appears.
  6. Choose Paragraphs, click after A shared in Proposed content and press Enter. A card Alice · structure appears.
  7. Click at the start of Select a phrase and press Backspace. A second Alice · structure card appears.

In headless Chromium, after steps 3 and 4 @Alice and the Preview block look exactly as before: no strike and no red. In step 5 the deleted D is drawn struck through on red. After step 6 the right view shows A shared and draft. as two plain lines. After step 7 draft. and Select a phrase, ... still show as two plain lines, with no mark where they join. Nothing throws. Playwright WebKit gives the same result.

The test script also read the computed style of every element in the right view. The mention and the media block have the same style before and after their deletion: no line-through, and the same background. The only struck elements it found for them are empty spans of zero width. After steps 6 and 7 no element in the view has a strike or a background.

The agent's first run found the same with Backspace at the start of a paragraph in CodeMirror and paragraphs, which joins it to the block before. Today's replay of that step, in both engines, adds a card Alice · structure and shows no mark either.

Expected

Each pending deletion is drawn in the text, as the deleted D is in step 5, so @Alice and the Preview block look deleted. A pending split or join shows a visible mark where the line breaks or joins. This is the expectation in the agent's notes from the first run. In the same view, the example already draws a pending text deletion struck through on red.

Actual

@Alice and the media block look unchanged after their deletion, and the split and joined lines show no mark. A reader can tell that a change is pending only from the cards.

Environment

  • Exact next commit/Beta package version: NOT_ENOUGH_INFO. The page does not show its build. The first run used Beta built from next 87b29efbfa, as the agent's notes say.
  • On 2026-10-24 an agent replayed Repro 1 on the live Beta in headless Chromium 149.0.7827.55 and in Playwright WebKit 26.5 (not Safari), driven by Playwright 1.61.0 on macOS with real mouse and key input. The samples were chosen with Playwright's selectOption. Both engines still show no mark.
  • An agent first found this on 2026-10-21 (PT), at natamox's request, in the Claude desktop app's built-in Chromium 152 on a desktop.
  • On 2026-10-22 (PT) natamox retested the page by hand on top of these finds and reported no further problems.
  • Nobody has tried Safari itself, Firefox or a phone on these samples.

Caveat

From a reading of the code on next (a76732c3be), not checked with a debugger:

  • The stored document holds the marks. The readout in the recording shows mention{delete}, media{delete}, paragraph{split} and paragraph{join}.
  • The example's ReviewVoid (apps/www/src/app/(app)/examples/plite/_examples/authored-changes.tsx:182-201) draws the mention and the media block with fixed classes and does not read their authored marks. ReviewLeaf (:204-219) styles text by the kind of its marks, so the empty text inside a deleted mention or media block gets the deletion style, but that text has zero width. The default case of ReviewElement (:291-293) draws a paragraph as a plain div and does not read a split or join mark.
  • In a related case, the guide leaves drawing a deletion to the block's component: "Deleting a block that owns a content root in a propose view strikes the block ... so style the root as deleted in the block's component." So this reads as a gap in the example's components rather than in Plite.
  • The media deletion test in apps/plite/tests/plite-browser/authored-changes.spec.ts:496-503 checks the stored marks and the media text, not how the media block is drawn.

Evidence

  • Repro 1: headless Chromium recording, 32 seconds, with an English step panel beside the page. A readout box at the bottom left, drawn by the test script, shows the count of uncaught page errors, the stored document with each node's pending marks, and the pending cards. At 0:02 the sample switches to Mentions and media. At 0:05.2 Backspace before B adds the card Alice · delete, and the readout shows mention{delete}, while @Alice keeps its blue background with no strike. At 0:08.4 Backspace on the Preview block adds a second card, and the readout shows media{delete}, while the block stays gray with no strike. At 0:11.6 Backspace after CD adds a third card, and D turns red and struck through. At 0:14.8 the sample switches to Paragraphs, and Enter after A shared splits the line, adds the card Alice · structure and shows paragraph{split} in the readout, with no mark on the page. At 0:19.8 Backspace at the start of Select a phrase adds a second Alice · structure card and shows paragraph{join}, and the lines still look plain. The error count stays 0. The result shows from 0:23 to the end.
Repro 1 — Chromium, /examples/plite/authored-changes

https://github.com/user-attachments/assets/07ab0df4-34e9-455f-a36d-416baa1aead6

Related

  • #5274: Typing in a preview view of the Authored Changes example throws on every key.
  • #5275: In Preview proposed, a click past the end of a line with a pending insertion throws and the caret stays.
  • #5276: After deleting the only media block in Suggest, typing throws and inserts nothing.
  • #5277: In Suggest, typing or deleting in a code block throws a schema error and records nothing.
Lingua principale
TypeScript
Stelle
16.6k
Fork
993
Merge medio
20h 1m
PR unite (30g)
60

Preparare l'ambiente

Questo progetto non fornisce container di sviluppo, Dockerfile né guida per i contributori, quindi l'ambiente è a tuo carico: parti dal suo README e consulta la nostra guida al primo contributo per i passaggi generali.

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 udecode/plate

Tutte le issue di udecode/plate

Issue simili

Altre issue su TypeScript

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.