Page MenuHomePhabricator

Adding content to an empty table cell written in inline form results in the serialised wikitext being in the one-cell-per-line format
Closed, ResolvedPublic

Description

Intention:
Add a value to an empty cell in a table using VE

Steps to Reproduce:

  1. You need a page with a table with at least one empty cell (e.g. https://en.wikipedia.beta.wmflabs.org/wiki/User:ESanders_(WMF)/sandbox/T65356)
  2. Open page for VE editing
  3. Double click on the empty cell, then add some text
  4. Show the wikitext diff in the save dialog

Actual Results:
In addition to the entered text a line-break is added

Expected Results:
No additional line-break

Reproducible: Always

Note that this does not happen for cells which already contains a value


Version: unspecified
Severity: normal

Event Timeline

bzimport raised the priority of this task from to Needs Triage.Nov 22 2014, 3:03 AM
bzimport set Reference to bz63356.

Created attachment 14994
Screenshot

Screenshot showing the result to the source of editing a filled and an empty cell using VE.

Attached:

Screenshot_from_2014-04-01_12:12:32.png (339×1 px, 15 KB)

  • Bug 73215 has been marked as a duplicate of this bug. ***

Hmm, the difference seems to be that if you click once on the empty cell and start typing, VE doesn't wrap the text in a <p>,

<td data-parsoid="{&quot;stx_v&quot;:&quot;row&quot;,&quot;autoInsertedEnd&quot;:true,&quot;dsr&quot;:[38,41,2,0]}">haha</td>

However, doubling clicking and then typing does,

<td data-parsoid="{&quot;stx_v&quot;:&quot;row&quot;,&quot;autoInsertedEnd&quot;:true,&quot;dsr&quot;:[38,41,2,0]}"> <p>haha</p></td>

Serializing the paragraph introduces a newline which would break the row syntax, so Parsoid switches the other format. I suppose we could be smarter about the p/td nl constraints, or VE maybe avoid introducing the paragraph to begin with?

Jdforrester-WMF set the point value for this task to 1.

Change 667411 had a related patch set uploaded (by Esanders; owner: Esanders):
[VisualEditor/VisualEditor@master] Use wrapper paragraphs in empty branch nodes

https://gerrit.wikimedia.org/r/667411

Esanders removed the point value for this task.
Esanders moved this task from Incoming to Code Review on the Editing-team (Kanban Board) board.

Change 667411 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] Use wrapper paragraphs in empty branch nodes

https://gerrit.wikimedia.org/r/667411

Change 670606 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (145cf95d8)

https://gerrit.wikimedia.org/r/670606

Change 670606 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (145cf95d8)

https://gerrit.wikimedia.org/r/670606