Page MenuHomePhabricator

Fix Flow BadImageRemover and support figure-inline
Closed, ResolvedPublic


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).

Event Timeline

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

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

@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 , which I've added to the enwiki Beta bad image list.

You can see 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).