Page MenuHomePhabricator

Add ability to add caption to maps in VE
Closed, ResolvedPublic5 Estimated Story Points

Description

Currently, users can only add captions in wikitext but not in VE. We will add the option to add a caption to maps with a text input in Visual Editor.

NOTE: The decision was not to prioritize the work needed to use the VE text input currently used in image captions. The input could be updated to this in future work but not as part of this ticket.

Requirements

  • Add simple text input field which accepts wikitext formatting
  • Add help icon and help text
Mock and specs

See epic: T318834

Content

Caption

This caption will display below the map in the frame (same as image captions). Adding a caption forces the map to have a frame.

Wikitext formatting can be used here, for example for bolding, links, or references.

Technical implementation

Goes into the attribute <mapframe text="…">

Result

Screenshot from 2022-10-19 11-08-53.png (988×1 px, 466 KB)

Event Timeline

lilients_WMDE set the point value for this task to 5.Sep 28 2022, 2:33 PM
Esanders added a subscriber: Esanders.

(screenshot file not attached)

Change 836871 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/Kartographer@master] [WIP] Add ability to add caption to maps in VE

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

  • Use the same caption input as the image insert dialog in VE titled "Media settings"

The wikitext editor used in media settings contains many elements that we might not need in the caption (e.g. tables or templates). I checked and it is possible to exclude single elements or simply define a small set of functions we want to have. @ECohen_WMDE Let me know if you want to exclude some. We can have a look together at the options (it is a pretty long list).

Change 837143 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/Kartographer@master] [WIP] Replacing text input area with wikitext editor in map options dialog

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

The wikitext editor used in media settings contains many elements that we might not need in the caption (e.g. tables or templates). I checked and it is possible to exclude single elements or simply define a small set of functions we want to have. @ECohen_WMDE Let me know if you want to exclude some. We can have a look together at the options (it is a pretty long list).

Thanks @lilients_WMDE would be great to have a look at the list. Does it already exist somewhere where you can just link to it?

I took a look at the image caption version and it looks like it includes everything. Everything seems like it could be relevant other than some items in the insert menu. Is this what you are referring to? @lilients_WMDE

For insert I think the most relevant to include are Templates and Invisible comments. The rest could be hidden.

Out of curiosity I tested this and you can actually put a map in the caption of map. 😂️

Screenshot from 2022-10-05 15-38-07.png (458×666 px, 82 KB)

But seriously. Looking at what VisualEditor allows I think the only relevant things are templates, images (yes, actually, e.g. for creating a legend), and references.

Change 836871 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Add ability to add caption to maps in VE

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

We are pausing this ticket until T318813 is solved.

Change 845549 had a related patch set uploaded (by Svantje Lilienthal; author: Svantje Lilienthal):

[mediawiki/extensions/Kartographer@master] Add ability to add caption to maps in VE

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

lilients_WMDE updated the task description. (Show Details)
lilients_WMDE moved this task from Tech Review to Demo on the WMDE-TechWish-Sprint-2022-10-26 board.

Change 845549 merged by jenkins-bot:

[mediawiki/extensions/Kartographer@master] Add ability to add caption to maps in VE

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