[ew] Normalize empty block cells in prose2aem for viewport inheritance
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
- 67/100
- Tipo di issue
- Bug
- Chiarezza
- Specificata chiaramente
- Stato di attività
- Attiva
- Stack tecnologico
- javascript
Direzione di ricerca
Start with blocks/shared/prose2aem.js and trace how detached block serialization handles empty ProseMirror paragraphs and trailing-break markers. Add regression coverage for empty and whitespace-only cells, preservation of meaningful content and indexing, and serialization after live editor updates. Done means empty cells serialize as <div></div> while populated variants retain their content and inheritance works.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Parent: #1688
Problem
prose2aem leaves empty paragraph elements inside otherwise empty block cells. Site code using zero child elements to recognize an inheritable empty cell consequently treats it as populated.
Affected component: adobe/da-live/blocks/shared/prose2aem.js.
Reproduction and evidence
Create a block table with meaningful content in one viewport group and empty cells in another group intended to inherit that content.
The editor represents an empty cell with an empty ProseMirror paragraph and trailing-break marker. Actual detached serialization leaves:
<div><p></p></div>
AEM-compatible output for the tested empty cells is:
<div></div>
A consumer checking:
return !el.children.length && !el.textContent?.trim();
does not recognize the serialized cell as empty. In viewport-based blocks this can remove inherited text, icons, offers, and background settings.
Running the actual viewport helper on detached serialized clones confirmed that removing three empty paragraph wrappers restores inherited content while preserving the original populated variant. The initial DA response can have correct empty cells and still regress after live editor serialization.
Expected outcome
- Normalize semantically empty table-cell paragraphs during block serialization so empty cells match AEM output.
- Handle ProseMirror's trailing-break representation and whitespace-only paragraphs without retaining editor-only markup.
- Preserve meaningful text, images, links, nested content, and indexing on content that survives serialization.
- Add regression tests for empty cells and nonempty-cell preservation.
- Verify behavior after live editor updates, not only initial rendering.
This is distinct from adding row/cell scaffolding to an entirely empty block. Defensive consumer changes are optional and should not substitute for serializer parity.
Source
https://github.com/adobe/da-live/blob/main/blocks/shared/prose2aem.js
- Lingua principale
- JavaScript
- Stelle
- 36
- Fork
- 78
- Merge medio
- 2g 17h
- PR unite (30g)
- 71
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di adobe/da-live
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
[EW] Branch name lost when navigating from folder listing to page editForse già presa @dicagno l’ha presa 5 giorni fa. Apertabug ew
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
adobe/da-live#1663 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
ew
Difficoltà 2/5 1-3 ore Idoneità per principianti 68/100
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 69/100
I maintainer di solito rispondono entro 1 giorno
-
customer-feedback ew
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di adobe/da-live
Issue simili
-
maintenance
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
assistant-ui/assistant-ui#10496 · 1 commento · 1 reazione ·
I maintainer di solito rispondono entro 1 giorno
-
ai bug design good first issue
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
neomjs/neo-agent-institution#927 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
gramps-project/gramps-web#1671 ·
I maintainer di solito rispondono entro 1 giorno
-
bug good first issue priority: P2 status: ready
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
RhinoLink-Tech/data-fabric#502 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 75/100
cline/mcp-marketplace#3708 ·