Page MenuHomePhabricator

VE should preserve .mw-file-description class in Parsoid HTML
Closed, ResolvedPublic5 Estimated Story PointsPRODUCTION ERROR

Description

Parsoid started adding .mw-file-description class to image links for certain kinds of media wikitext. VE seems to drop them on roundtrip which means Parsoid will treat these images as having been edited and can introduce dirty diffs in some scenarios.

I am being conservative and with an abundance of caution, adding this as a train blocker. If @Arlolra and VE folks think this can wait till tomorrow (or the next train), we can remove this as a blocker.

There is already a fix for this in gerrit @ https://gerrit.wikimedia.org/r/c/mediawiki/extensions/VisualEditor/+/769507 by @Arlolra

Event Timeline

ssastry triaged this task as Medium priority.Mar 9 2022, 8:03 PM
ssastry created this task.
ssastry created this object with edit policy "Custom Policy".
ssastry removed dancy as the assignee of this task.Mar 9 2022, 8:04 PM
ssastry added a subscriber: dancy.

Change 769507 had a related patch set uploaded (by Arlolra; author: Arlolra):

[mediawiki/extensions/VisualEditor@master] Preserve class on media file description links

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

brennen raised the priority of this task from Medium to Unbreak Now!.Mar 9 2022, 8:47 PM

The proposed fix is failing unit tests.

After a bunch of testing, we feel it is safe to roll out train as is since Parsoid's html2wt / selser are doing much better than we feared.

I am going to remove this as a blocker.

ssastry lowered the priority of this task from Unbreak Now! to Medium.Mar 9 2022, 11:03 PM

We will test this separately and if required, we can roll out a VE fix tomorrow before group 2.

A patch to run parserTests with the simulated effects of dropping the class is in https://phabricator.wikimedia.org/P22230

It would be good to have the patch reviewed by the Editing Team and deployed before group 2 rollout tomorrow.

It would be good to have the patch reviewed by the Editing Team and deployed before group 2 rollout tomorrow.

Sounds like we should currently be blocking on this?

No, I'm planning to review the patch in a moment (David and Ed already had a look, and it's a good idea, but we didn't have time yet to carefully read it), and then backport the patch in the next backport window. I think you can proceed with the train deployment as normal.

Cool. We're blocked elsewhere, so the move to all wikis may wait a bit anyway, but we won't treat this as a blocker for T300201. Thanks!

Change 769507 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Preserve classes on media wrapper links

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

Change 769558 had a related patch set uploaded (by Bartosz Dziewoński; author: Arlolra):

[mediawiki/extensions/VisualEditor@wmf/1.38.0-wmf.25] Preserve classes on media wrapper links

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

Change 769558 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@wmf/1.38.0-wmf.25] Preserve classes on media wrapper links

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

Mentioned in SAL (#wikimedia-operations) [2022-03-10T21:33:35Z] <rzl@deploy1002> Synchronized php-1.38.0-wmf.25/extensions/VisualEditor/modules/ve-mw: Backport: [[gerrit:769558|Preserve classes on media wrapper links (T292657 T303469)]] (duration: 00m 49s)

No, I'm planning to review the patch in a moment (David and Ed already had a look, and it's a good idea, but we didn't have time yet to carefully read it), and then backport the patch in the next backport window

Thanks for taking care of that @matmarex

Arlolra claimed this task.