Page MenuHomePhabricator

Empty annotations cannot be deleted
Closed, ResolvedPublic8 Estimated 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 assigned this task to Esanders.
Catrope raised the priority of this task from to Needs Triage.
Catrope updated the task description. (Show Details)
Catrope subscribed.

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.

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 Medium to Low.Jul 22 2015, 11:49 PM

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

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 claimed this task.