Page MenuHomePhabricator

Images used in flow without the |thumb parameter don't show captions as tooltips
Closed, ResolvedPublic

Description

This wikitext [[File:Blume mit Schmetterling und Biene 1uf.JPG|150px|foo bar]] when used in wikitext pages,
results in an image that shows the caption as a mouseover tooltip.

Selection_006.png (173×284 px, 39 KB)

But nothing is shown for the mouseover when it is used in Flow.

e.g. https://www.mediawiki.org/w/index.php?title=Topic:Sm9eagq43pa1pjxg&topic_showPostId=smkph8g0hxe6clus#flow-post-smkph8g0hxe6clus
versus https://sv.wikipedia.org/w/index.php?title=Anv%C3%A4ndare:Quiddity_%28WMF%29/sandl%C3%A5da&oldid=30330104

Event Timeline

Quiddity raised the priority of this task from to Needs Triage.
Quiddity updated the task description. (Show Details)
Quiddity added a subscriber: Quiddity.
Restricted Application added a subscriber: Aklapper. · View Herald Transcript
Catrope triaged this task as Medium priority.Aug 12 2015, 11:44 PM
Catrope added a subscriber: Catrope.

This is probably a Parsoid issue?

For inline images, the caption is found in data-mw, data-mw='{"caption":"foo bar"}'

$ echo "[[File:Blume mit Schmetterling und Biene 1uf.JPG|150px|foo bar]]" | node bin/parse --prefix svwiki

<span typeof="mw:Image" data-parsoid='{"optList":[{"ck":"width","ak":"150px"},{"ck":"caption","ak":"foo bar"}],"dsr":[0,64,null,null]}' data-mw='{"caption":"foo bar"}'><a href="./Fil:Blume_mit_Schmetterling_und_Biene_1uf.JPG" data-parsoid='{"a":{"href":"./Fil:Blume_mit_Schmetterling_und_Biene_1uf.JPG"},"sa":{"href":"File:Blume mit Schmetterling und Biene 1uf.JPG"}}'><img resource="./Fil:Blume_mit_Schmetterling_und_Biene_1uf.JPG" src="//upload.wikimedia.org/wikipedia/commons/thumb/e/ec/Blume_mit_Schmetterling_und_Biene_1uf.JPG/150px-Blume_mit_Schmetterling_und_Biene_1uf.JPG" data-file-width="1658" data-file-height="1122" data-file-type="bitmap" height="102" width="150" data-parsoid='{"a":{"resource":"./Fil:Blume_mit_Schmetterling_und_Biene_1uf.JPG","height":"102","width":"150"},"sa":{"resource":"File:Blume mit Schmetterling und Biene 1uf.JPG"}}'/></a></span>

that's from T50958.

But, I'm guessing, the tooltip is just displaying the alt text, in which case, yes, that's T63566

But, I'm guessing, the tooltip is just displaying the alt text, in which case, yes, that's T63566

Or more likely the "title" attribute on the anchor,
https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes#attr-title

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

[mediawiki/services/parsoid@master] [WIP] Set title for tooltips if caption isn't visible

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

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

[mediawiki/core@master] [WIP] Tooltips

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

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

[mediawiki/core@master] [WIP] Tooltips in galleries

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

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

[mediawiki/extensions/ImageMap@master] Disable test temporarily

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

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

[mediawiki/extensions/ImageMap@master] [WIP] Tooltips

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

Change 792286 merged by jenkins-bot:

[mediawiki/extensions/ImageMap@master] Disable test temporarily

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

Change 791475 merged by jenkins-bot:

[mediawiki/core@master] Clarify tooltips are set if captions aren't visible

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

Change 792288 merged by jenkins-bot:

[mediawiki/extensions/ImageMap@master] Place tooltips if caption isn't visible

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

Change 791696 merged by jenkins-bot:

[mediawiki/core@master] Set tooltips in galleries, despite caption being visible

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

Change 791474 merged by jenkins-bot:

[mediawiki/services/parsoid@master] Set title for tooltips if caption isn't visible

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

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

[mediawiki/vendor@master] Bump parsoid to 0.16.0-a10

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

Change 801428 merged by jenkins-bot:

[mediawiki/vendor@master] Bump parsoid to 0.16.0-a10

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