Page MenuHomePhabricator

Fake slugs appearing under each individual images in a gallery
Closed, ResolvedPublic

Description

I don't have the exact steps to replicate this one for now. But most times its happening when I am adding a gallery after another block node such as a map and I am trying to hover over the gallery while the other block node is still selected.

Screen Shot 2018-07-25 at 1.31.00 PM.png (556×1 px, 184 KB)

Screen Shot 2018-07-25 at 4.53.13 PM.png (531×1 px, 132 KB)

Event Timeline

The slugs in these positions are not a bug, since you indeed can add text there. The slugs only do not work because of the blue focus highlight preventing you from clicking them, or otherwise directly editing the captions (T190224). But if you could click them, they would work correctly.

I guess the real problem is that the highlight doesn't properly cover the gallery.

@matmarex: Actually I can't even add any text there even if I click on them directly. There is just no cursor to insert anything.
See this screenshot without the blue highlight preventing it.

Screen Shot 2018-07-26 at 2.10.35 PM.png (442×904 px, 86 KB)

I've been searching for any other tasks about slugs in image captions, and found T94708 by @Esanders. The two-line brief there can be charitably interpreted to be about the same problem you're reporting ;) (except about normal images, rather than images in galleries, back when their captions were not editable inline), but to be honest I'm not sure if that's what it really is saying.

However, I still think this is the correct behavior. The slug does its job – it inserts an empty paragraph. This can be verified in debug mode (&debug=1) by enabling "Show transactions" or "Show model"→"Update on changes" in the debug toolbar below the editor. But it is still in the middle of a focusable node, so the cursor is not allowed to be put there.

(Again, the real bug is whatever is allowing you to click the slugs, by not making the highlight cover the gallery.)

However! why do we even have slugs there instead of just the actual empty paragraphs? I think that's another question for @Esanders. And the same goes for normal, non-gallery images, which will have a slug in the space for the caption if you insert them with no caption. Slugs are pretty awful for user experience, maybe we can get rid of them here.

Change 449648 had a related patch set uploaded (by Bartosz Dziewoński; owner: Bartosz Dziewoński):
[mediawiki/extensions/VisualEditor@master] Always generate empty wrapper paragraph inside image captions (slugs begone!)

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

matmarex renamed this task from [Regression ?] Fake slugs appearing under each individual images in a gallery to Fake slugs appearing under each individual images in a gallery.Aug 1 2018, 3:37 AM
matmarex moved this task from Incoming to In progress on the VisualEditor (Current work) board.

Change 449648 merged by jenkins-bot:
[mediawiki/extensions/VisualEditor@master] Always generate empty wrapper paragraph inside image captions (slugs begone!)

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

Checked and verified that no more slugs appearing in the space for caption and the highlight is covering the entire gallery. Same for non gallery images.

Deskana triaged this task as Medium priority.

(Again, the real bug is whatever is allowing you to click the slugs, by not making the highlight cover the gallery.)

That might have been T203856.