Page MenuHomePhabricator

Fix Flow BadImageRemover and support figure-inline
Closed, ResolvedPublic

Description

This is already wrong because we don't support <figure>, one of the possibilities.

Soon it will be figure or figure-inline (T118520: Use <figure-inline> instead of <span> for inline figures.)

We can just support figure, figure-inline, or span (we should do this fix before T118520 is deployed).

Details

Related Gerrit Patches:

Event Timeline

Restricted Application added a project: Collaboration-Team-Triage. · View Herald TranscriptAug 23 2017, 6:09 PM
Restricted Application added a subscriber: Aklapper. · View Herald Transcript

Change 380890 had a related patch set uploaded (by Catrope; owner: Catrope):
[mediawiki/extensions/Flow@master] BadImageRemover: Update for figure-inline change in Parsoid

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

Change 380890 merged by jenkins-bot:
[mediawiki/extensions/Flow@master] BadImageRemover: Update for figure-inline change in Parsoid

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

@Etonkovidova This is for the bad image remover feature. This is a feature to remove disruptive images, except on pages where they are specifically relevant. When I say "bad" below, I mean on the list. I would recommend you not use any of the existing images for testing, other than the one below. There's a reason they're on the list (which was apparently imported from production).

Instead, you can use https://en.wikipedia.beta.wmflabs.org/wiki/File:Bad_test_image.png , which I've added to the enwiki Beta bad image list.

You can see https://www.mediawiki.org/wiki/Help:Images#Format for the different image formats, and which are inline and not inline.

In addition to regression testing, there's two things you can test here:

  1. As @Catrope mentioned, Parsoid will deploy a change to use <figure-inline> instead of <span>. When that is deployed, you can check that <figure-inline> is used in new Flow posts, and also check that bad inline images (e.g. [[File:Bad_test_image.png|caption]]) are correctly removed.
  2. There is also a separate fix to non-inline images. [[File:Bad_test_image.png|frame|caption]] should now be removed correctly.

Thx, @Mattflaschen-WMF - I checked the suggested test cases with File:Bad_test_image.png - looks good, the bad image will be removed from the view completely.

Just a note: non-Flow pages would display [[File:Bad_test_image.png|frame|caption]] as frame|caption (as a link to the bad image).

Etonkovidova closed this task as Resolved.Oct 2 2017, 9:34 PM