Page MenuHomePhabricator

Display mapframe for geocoordinate statements on client
Open, Needs TriagePublic

Description

When a coordinate is included into a Wiki page via mw.wikibase.entity:formatStatements or the #statements parser function, it should be displayed using a Kartographer <mapframe> if available.

Event Timeline

hoo created this task.Dec 1 2018, 4:23 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptDec 1 2018, 4:23 PM

Change 450399 had a related patch set uploaded (by Hoo man; owner: Tpt):
[mediawiki/extensions/Wikibase@master] Use Kartographer's <maplink> for Wikitext globe coordinates formatting

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

Change 450399 merged by jenkins-bot:
[mediawiki/extensions/Wikibase@master] Use Kartographer's <maplink> for Wikitext globe coordinates formatting

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

Do we expect any significant breakage in existing usage when this change goes out?

Tpt added a comment.Feb 7 2019, 6:45 PM

The feature is behind a configuration variable disabled by default. This change uses <maplink> instead of <mapframe> so the output is still a textual display of the coordinates, but now with a link that opens a Kartographer map. So, nothing should break except if some modules parses the output (but hopefully they all use #property for that)

Ok great. Thanks!

\o/ @Tpt I think we should prepare an announcement for that. I'll draft something then you can correct me :)

Tpt added a comment.EditedMar 4 2019, 8:22 PM

The deployment have been done.

There is a small bug that may affect some Lua modules: calls mw.wikibase.entity:formatStatements().value using Lua may need to be passed to frame:preprocess to be properly display the <maplink> table. I have already fixed Module:Databox that was affected.

I have done a quick lookup on frwiki, cawiki and enwiki and I have not found any other module making use of it with globe coordinates. So I hope it is fine

\o/
Then I simply added a line to Tech News and to the Wikidata weekly. Feel free to edit if I wrote something inaccurate :)

Johan added a subscriber: Johan.Mar 7 2019, 12:44 PM

I've edited to make it fit with the normal Tech News style; please make sure the information is still correct. (:

Is there an example of it live in action? If yes, please add it to the task description (for easy visibility) and maybe also the Tech News items? Thanks!

nothing should break except if some modules parses the output (but hopefully they all use #property for that)

Wondering if that's the case in T218051: Raw <mapframe> code displayed in an infobox template when mapframe is not enabled on that wiki?

Zache added a subscriber: Zache.Mar 18 2019, 7:53 AM

Is there example page for Lua/wikicode somewhere?

There is a small bug that may affect some Lua modules: calls mw.wikibase.entity:formatStatements().value using Lua may need to be passed to frame:preprocess to be properly display the <maplink> table. I have already fixed Module:Databox that was affected.

The same happens for the {{#statements:…}} parser function. IMO this is a huge problems and should be fixed fast. I've created T220122: Displaying mapframes for geocoordinate on client requires preprocessing by the user for this.

Pikne added a subscriber: Pikne.Jun 8 2019, 5:12 PM

It seems that maplink being used without "zoom" parameter is causing problems, see T225350.