Page MenuHomePhabricator

Display mapframe for geocoordinate statements on client
Open, Needs TriagePublic

Description

When a coordinate is included into a Wiki page via [[https://www.mediawiki.org/wiki/Extension:Wikibase_Client/Lua#mw.wikibase.entity:formatStatements|mw.wikibase.entity:formatStatements]] or the #statements parser function, it should be displayed using a [[https://www.mediawiki.org/wiki/Help:Extension:Kartographer#%3Cmapframe%3E_usage|Kartographer <mapframe>]] if available.

Event Timeline

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?

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)

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

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 :)

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?

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.

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

Aklapper removed Tpt as the assignee of this task.Jul 2 2021, 5:12 AM
Aklapper added a subscriber: Tpt.

Removing task assignee due to inactivity, as this open task has been assigned for more than two years (see emails sent to assignee on May26 and Jun17, and T270544). Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be very welcome!

(See https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator.)