Page MenuHomePhabricator

Avoid generating <maplink> HTML when text=""
Open, LowPublic

Description

From Wikivoyage report, should maplink with text="" be an HTML noop? Wikivoyage uses this approach to add masks and other elements to the map without creating UI artifacts.

<maplink text="" zoom="13" longitude="-122.3995" latitude="37.8103"/>

Here's an example of what it looks like on this page:

Screen Shot 2016-11-17 at 8.50.11 AM.png (161×469 px, 21 KB)

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald Transcript

I temp-fixed it in Wikivoyage by auto-adding class=no-icon whenever there is no text specified. I am not yet sure we should handle it in php or not.

When no text is specified, either manually or via inclusion in a template is the desired outcome to just have the push pin icon? I'm trying to think of what is the expected behavior in other elements that can have a "text" attribute.

@CKoerner_WMF this is tricky - <maplink text=""> makes no sense for anything except Wikivoyage. In Wikivoyage, it only makes sense if both group is set and content is non-empty (because WV has a special group handling capability that we cannot enable for any other wiki):

<maplink text="" group="something">
{ some GeoJSON data }
</maplink>

In all other cases, text="" makes absolutely no sense.
@debt, there is no code patches for this yet - I'm not even sure we need one...

I'm concerned that just having a map icon - without any indication of what it might be - will be confusing to users. If text="" is empty, then can we default it to display the lat/lng of the map next to the map icon? That way, it'll be readily understood that there is a map icon indicating that a map is available - and the major indicator of a map would be the visible lat/lng next to the map icon.

Screen Shot 2016-11-18 at 10.02.54 AM.png (30×205 px, 10 KB)

Moving off the sprint board - the Discovery team won't be able to finish this work at this time.

Mholloway lowered the priority of this task from High to Low.Oct 2 2018, 3:14 PM
Mholloway moved this task from Unsorted to General on the Maps (Kartographer) board.