Page MenuHomePhabricator

Empty annotations cannot be deleted
Closed, ResolvedPublic8 Story Points

Description

Empty annotations like <small></small> are converted to meta items. So if you have a bunch of paragraphs like <p>Foo<small></small>bar</p> and delete them all, you end up with a pile of <small></small><small></small>... tags. This is especially bad when this happens in table cells whose row is deleted, because then the <small></small> stuff ends up being foster-parented out of the table.

Event Timeline

Catrope created this task.Apr 19 2015, 9:02 PM
Catrope assigned this task to Esanders.
Catrope raised the priority of this task from to Needs Triage.
Catrope updated the task description. (Show Details)
Catrope added a subscriber: Catrope.
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 19 2015, 9:02 PM

What are the real world examples where these annotations come up?

Could we flag some meta items as 'deletable' for the transaction builder?

What are the real world examples where these annotations come up?

https://office.wikimedia.org/w/index.php?diff=prev&oldid=144735 was where we noticed it.

Jdforrester-WMF triaged this task as Normal priority.Apr 20 2015, 2:22 PM

Change 205291 had a related patch set uploaded (by Esanders):
Add removable flag to meta items

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

Jdforrester-WMF lowered the priority of this task from Normal to Low.Jul 22 2015, 11:49 PM

De-prioritising, now that Parsoid trims empty annotations (at least some of the time).

Deskana removed Esanders as the assignee of this task.Oct 16 2017, 1:04 PM
Deskana added a subscriber: Esanders.

Change 205291 abandoned by Esanders:
ve.dm.MetaItem: Add removable flag, split from internal state

Reason:
Metadata no longer exists, bug has been fixed in Parsoid.

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

Testing this on Beta Cluster just now given the prompt of the old code being abandonned, I confirmed that this is a problem (and possibly it's worse than it was before?):

https://en.wikipedia.beta.wmflabs.org/w/index.php?title=User:Jdforrester_(WMF)/T96528&diff=377705&oldid=377704&diffmode=source

Change 442335 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[VisualEditor/VisualEditor@master] ve.dm.MetaItem: Add removable flag

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

Change 442335 merged by jenkins-bot:
[VisualEditor/VisualEditor@master] ve.dm.MetaItem: Add removable flag

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

Change 513192 had a related patch set uploaded (by Jforrester; owner: Jforrester):
[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (d9ece414a)

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

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

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

ppelberg closed this task as Resolved.Tue, Aug 6, 2:50 AM
ppelberg claimed this task.