Page MenuHomePhabricator

Identify editing-client DOM transformations that Parsoid needs to account for during DOM diffs
Closed, ResolvedPublic1 Story Points

Description

In https://gerrit.wikimedia.org/r/#/c/434847/, VE was removing mw:FallbackId elements.

In https://gerrit.wikimedia.org/r/#/c/436091/, it seems like mw:NumberedLink is added to the "rel" attribute.

We should enumerate all the ones we don't know about and try to deal with this wholesale.

Details

Related Gerrit Patches:

Event Timeline

Arlolra created this task.May 30 2018, 9:40 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptMay 30 2018, 9:40 PM

We already know about <section> wrapper stripping which we account for.

Yes, that bag of worms is in T193500

Arlolra triaged this task as High priority.May 30 2018, 9:43 PM

mw:NumberedLink looks to be from T188429

ssastry renamed this task from DOMDiffing tripped up by manipulations made by VE to Identify editing-client DOM transformations that Parsoid needs to account for during DOM diffs.May 30 2018, 9:52 PM

Ideally, Parsoid shouldn't have to account for these since we cannot be trying to add adaptors based on different editing clients. So, VE should stripping out the mw:NumberedLink changes before sending it back to Parsoid.

It looks like these were still serving a purpose, as when we write to the clipboard we want to (1) add some text ("[1]") to avoid the link being removed and the give some text if pasted into an external editor, but (2) preserve the numbered link status if pasted into VE. As detection of numbered links is based on looking for empty tags, we have to add another attribute to avoid adding text breaking the conversion.

However we can ensure this is only done in clipboard conversion mode, and never sent to Parsoid.

Change 436544 had a related patch set uploaded (by Esanders; owner: Esanders):
[mediawiki/extensions/VisualEditor@master] Fix parsing of external links, now Parsoid adds 'external' classes

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

T144708 is perhaps related

Deskana assigned this task to Esanders.Jun 5 2018, 6:51 PM
Deskana edited projects, added VisualEditor (Current work); removed VisualEditor.
Deskana moved this task from Incoming to Code review on the VisualEditor (Current work) board.

Change 436544 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Fix parsing of external links, now Parsoid adds 'external' classes

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

Deskana closed this task as Resolved.Jun 11 2018, 3:05 PM
Jdforrester-WMF set the point value for this task to 1.Jun 13 2018, 6:27 PM
Vvjjkkii renamed this task from Identify editing-client DOM transformations that Parsoid needs to account for during DOM diffs to 6xbaaaaaaa.Jul 1 2018, 1:07 AM
Vvjjkkii reopened this task as Open.
Vvjjkkii removed Esanders as the assignee of this task.
Vvjjkkii updated the task description. (Show Details)
Vvjjkkii removed the point value for this task.
Vvjjkkii removed subscribers: gerritbot, Aklapper.
CommunityTechBot renamed this task from 6xbaaaaaaa to Identify editing-client DOM transformations that Parsoid needs to account for during DOM diffs.Jul 2 2018, 9:54 AM
CommunityTechBot closed this task as Resolved.
CommunityTechBot assigned this task to Esanders.
CommunityTechBot set the point value for this task to 1.
CommunityTechBot updated the task description. (Show Details)
CommunityTechBot added subscribers: gerritbot, Aklapper.