Page MenuHomePhabricator

Display coordinates in mobile version
Open, LowPublic

Description

Title coordinates should be displayed in mobile version (inline coordinates are shown already).
These have been disabled since the beginning of the mobile site (circa 2011) due to the fact they were initially shown absolutely positioned at the top of the page which caused them to overlap with the title and edit icon.
It should be noticed that these icons link to the geohack labs tool which is not mobile friendly which may be a blocker for certain wikis.

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes

Change 195495 had a related patch set uploaded (by Bmansurov):
Do not hide coordinates

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

@MSyed, where should I put the coordinates?

These are currently hidden pending design input. They are too prominent in the display and to a lot of people geocoordinates are meaningless (not to mention that the geohack service it points to is not mobile friendly).

Note: The Nearby button in beta has started to explore a more friendly way to surface this.

Change 195495 abandoned by Bmansurov:
Do not hide coordinates

Reason:
No response from the design team. Feel free to reopen when the design team responds in the bug report.

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

@bmansurov @Jdlrobson I agree, lets keep them hidden as they are not mobile-friendly

Man77 added a subscriber: Man77.Apr 27 2015, 5:01 PM
Jdlrobson set Security to None.

I agree, lets keep them hidden as they are not mobile-friendly

Disagree. Coordinates can be used to open a map service and navigate to that target. Especially useful with mobile devices. Maybe there is a way to design a proper Geohack interface for mobile devices?

@Thgoiter I think what Kaity means is in current form it is not useful. I agree we could revisit this if Geohack was displayed nicer on a mobile screen. I've added a blocking task for that.

I found this discussion after investigating where the coordinates link has gone several months ago.

In the past geo-cordinates where hidden under the last subtopic (which was also not too consistent but ok). That worked properly until it was removed.

Now I have to change to classic view first and then have the map opened in a browser tab instead of a map-app which only works on my new Android 5 mobile (more or less) but doesn't on my Android 4.1 mobile.

Please let geoinformation reappear until something else takes place! It helped me find wiki-loves-monuments objects in the past!

I remember, that we already had a coordinates link (I remember it was a globe?). @Jdlrobson What do you think to put the link into the beta mode until GeoHack is mobile friendly?

Jdlrobson triaged this task as Lowest priority.Sep 16 2015, 6:15 PM
ThomasLedl added a comment.EditedJun 22 2016, 1:14 PM

as discussed for german wiki:

.mediawiki div#mw-content-text #coordinates {
    display: block !important;
}
Volker_E added a subscriber: TheDJ.Jun 22 2016, 1:47 PM

@ThomasLedl @TheDJ and myself were talking about the specific needs at Wikimania-Hackathon-2016 from photographer's point of view to find places in need to photograph for Commons while on mobile. Above comment is connected.
Example given was https://de.wikipedia.org/wiki/Liste_der_denkmalgesch%C3%BCtzten_Objekte_in_Hermagor-Pressegger_See.
The direct jump functionality to download KML on mobile is missing for solving the first issue of needing to change over from mobile to desktop version. We didn't come to a satisfyingly clear solution, besides recommending writing a gadget that might be used to build it further later and also show the geocoordinates again while the UX implications on the different platforms stay in the dark.

Ailura added a subscriber: Ailura.Jun 26 2016, 11:45 AM

please reopen this task; expose {{All Coordinates}}-template (at least dewiki with 121725 transclusions) as replacement for coordinates template for mobile version.

(Please write comments to the task in the task and not in the change :))

@Boshomi awesome - I assume there has been some progress?


It looks like these have been moved to the infoboxes? Can you confirm?
If so do we know if this applies to all pages?

@ThomasLedl @TheDJ have you worked on this at the hackathon?

Happy to turn this on again - I'm just keen to ensure we don't break any other wikis in the process and that there is an easy migration for any wikis that do get broken by removing this rule.

Jdlrobson raised the priority of this task from Lowest to Normal.EditedJun 27 2016, 3:43 PM
Jdlrobson added a project: Design.
Jdlrobson added a subscriber: Nirzar.

(it's worth noting that geohack (the tool these coordinates link to) is still not mobile friendly - but given the interface is less prominent to the user this may be more acceptable cc @Nirzar ). Surfacing it also might accelerate finding ways to optimise this for mobile.

@Boshomi awesome - I assume there has been some progress?
F4206048
F4206049
It looks like these have been moved to the infoboxes? Can you confirm?
If so do we know if this applies to all pages?

I can't see any coordinates in https://de.m.wikipedia.org/wiki/Samtgemeinde_Brookmerland

ad "have you worked on this at the hackathon?"
No change was done by us during the hackathon.

The {{All Coordinates}}-template worked properly for a few years in the mobile version before it was disabled. This feature is tested in production.

@Boshomi awesome - I assume there has been some progress?
F4206048
F4206049
It looks like these have been moved to the infoboxes? Can you confirm?
If so do we know if this applies to all pages?

I can't see any coordinates in https://de.m.wikipedia.org/wiki/Samtgemeinde_Brookmerland

You can't see anything, as the coordinates are still hidden, sorry for the confusion :)

AleXXw added a subscriber: AleXXw.Jul 2 2016, 5:22 PM

There hasn't been progress for two weeks now.
Has the feature actually been re-enabled but not yet rolled out?
Is there any information missing for re-enabling this feature?

In case the issue is still open:
I'm still trying to figure what happened before coordinates were disabled because the ticket order doesn't make any sense.

There are the tickets
T91481: Display coordinates in mobile version (Mar 4 2015, 7:47 AM)
T91491: Coordinates shown wrongly in mobile app (Mar 4 2015, 10:15 AM)
T103409: Geohack should be mobile friendly (Jun 22 2015, 7:42 PM)

T92963: Fix tool kmlexport (Mar 17 2015, 2:56 PM)
also seems to be part of this confusing issue list.

There are two kinds of geo-coding I'm aware of.
First for single coordinates:
English: {{coord|48.2085|16.373|type:landmark_region:AT|display=inline,title}}
German: {{Coordinate|article=/|NS=48.208493|EW=16.373118|type=landmark|dim=50|region=AT-9}}

Both lead to the geohack which is not user friendly in both Wikis. It is enabled in English mobile but disabled in German mobile. Compare:
https://en.m.wikipedia.org/wiki/St._Stephen%27s_Cathedral,_Vienna
https://de.m.wikipedia.org/wiki/Stephansdom_(Wien)

For showing primary AND secondary coordinates (Example https://de.wikipedia.org/wiki/Liste_der_denkmalgesch%C3%BCtzten_Objekte_in_Hermagor-Pressegger_See on the upper right):
In German Wiki there is a template {{All Coordinates}} offering three (not mobile friendly) links (bing, google, osm)
On mobile the link was shown (hidden, actually) below the last subtopic (usually references) until it was disabled around Mar 4 2015.
The feature wasn't too stable in 2015 but I would consider it stable now.
It looks to me like whether disabling {{All Coordinates}} happened accidentially within the same action to disabling Coordinates or else the other way round.

So the first question for investigation would be: Which ticket lead to disable coordinates in German Wiki? Where is the original request to do that? What was the original problem?
It cannot be T103409 because that ticket was opened three months later.

Or am I missing something very important here?

I understood my conversation with @Nirzar at Wikimania in the following matter:

  • Coordinate stuff is indeed a key feature everyone finds useful.
  • Disabling this feature was wrong and might have happened accidentially.
  • This feature will be re-enabled until a user-friendly geohack will take place.
  • Communication was not good here.
  • All communication has to be reproducable within Phabricator-tickets.
  • Always add the user experience to make clear why this request is so important and leave space for workarounds.

My user experience: I'm interested in history and architecture.
I usually look for POIs, that are not mainstream, and in Wikipedia are usually represented in lists in secondary coordinates.
I also like the "nearby"-function but I would like to teach it some priorization/categorization and not to show areas as points and of course also show secondary coordinates.
That would make me stay within mobile Wikipedia a little bit longer.
Right now I parse Wikipedia articles with a perl-script, generating a kml-file which I then mail myself and open it in my (offline) map-application.
It's some kind of https://en.wikipedia.org/wiki/Geocaching but with buildings. Something any tourist does. Something that's worth sharing with other people.
As far as I know there is currently no way to do such a thing within mobile Wikipedia.

Please let me know how to continue!
lg, Thomas

The feature has been disabled since at least 2011 - which is probably why there is very little history - it was enabled at the birth of the mobile site. Many features were disabled initially due to being broken on mobile and we've incrementally fixed things and turned things on. It has been quite hard porting Wikipedia to mobile!

The most recent status of this that I know of what that it was blocked on T103409 given geohack was not mobile friendly and there were hopes that this would happen. If this is not a blocker anymore for German wiki, any admin can fix this by overriding the css rule that is hiding this in https://de.m.wikipedia.org/wiki/MediaWiki:Mobile.css

The developers we have available for MobileFrontend bugs are very small, the amount of numbers of bugs we have are large, so we are limited in what we can work on and reply to. We certainly haven't got capacity to help make geohack friendly on mobile :/

Jdlrobson updated the task description. (Show Details)Jul 11 2016, 9:36 PM
TheDJ added a comment.EditedJul 12 2016, 9:03 AM

It is enabled in English mobile but disabled in German mobile.

This is not true. Both english and german "title" coordinates (aka coordinates next to the title) are hidden. It's just that on english wikipedia, the common strategy for the coordinates template is to insert both inline AND title level coordinates (Note the display=inline,title). So when the title coordinates in English wikipedia are hidden, there is always an inlined alternative that still lists them. German wikipedia seems to do this much less.

"{{All Coordinates}}" similarly appropriates the usage of the #coordinates ID, to force it into that title position on the desktop as well. Since this position is not used on mobile, and since there is no inline content to fallback to, they disappear completely.

The german wikipedia should think carefully about WHERE to display these links and how to achieve that. This is not something that the foundation is going to do for you.

In my personal opinion, the coordinates template should never be restricted to such a "top" spot, but should also have an appropriate corresponding inline position (visible or not on desktop). Since esp AllCoordinates has never had that however, adding this inline position, might mean that it will show up in unexpected places inside articles, because people never figured the template would show any content at the position of insertion. That part specifically is something the community will have to figure out.

Since esp AllCoordinates has never had that however

de:Vorlage:All Coordinates has a parameter for inline position: pos=inline

However, usage without parameters (i.e. title position) is standard.

As far as I understand from the last comments:

It is crucial that coordinates are displayed in the article on the mobile version in addition to what is shown in the top position and links to the geohack.

  • In the German WP this is true for most Infoboxes (Coordinates are also shown as primary coordinates in the infobox)
  • It is even more true for everything that is shown via {{All Coordinates}}, as this shows all primary and secondary coordinates used in the article. So it is not about {{All Coordinates}}, as this creates only the link to various geo-services, but relies on the primary and secondary coordinates in the article.
    • Secondary coordinates must be there, but can be masked with some text (this is the case e.g. for all the monument lists, e.g. https://de.m.wikipedia.org/wiki/Liste_der_denkmalgesch%C3%BCtzten_Objekte_in_Achau). If the expanded wiki text is used to grep the coordinates, this will not work. Either the pre-expand template code or the generated link have to be parsed for that very purpose.
    • Otherwise it is completely unclear, why secondary coordinates should not work properly on the German WP.

What has to be done in German WP:

  • All Infoboxes dealing with article coordinates must display them also inline (at least in the mobile version)
  • All article coordinates outside infoboxes have to be reworked to be shown also inline (at least in the mobile version). (This might be a bit tricky. It cannot be done by the template, as the template does not know whether it is used inside or outside an infobox).

As far as I understand from the last comment by @TheDJ:

It is crucial that coordinates are displayed in the article on the mobile version in addition to what is shown in the top position and links to the geohack.

  • In the German WP this is true for most Infoboxes (Coordinates are also shown as primary coordinates in the infobox)
  • It is even more true for everything that is shown via {{All Coordinates}}, as this shows all primary and secondary coordinates used in the article. So it is not about {{All Coordinates}}, as this creates only the link to various geo-services, but relies on the primary and secondary coordinates in the article. @Thgoiter pos=inline does not make any differnence.
    • Secondary coordinates must be there, but can be masked with some text (this is the case e.g. for all the monument lists, e.g. https://de.m.wikipedia.org/wiki/Liste_der_denkmalgesch%C3%BCtzten_Objekte_in_Achau). If the expanded wiki text is used to grep the coordinates, this will not work. Either the pre-expand template code or the generated link have to be parsed for that very purpose.
    • Otherwise it is completely unclear, why secondary coordinates should not work properly on the German WP.

What has to be done in German WP:

  • All Infoboxes dealing with article coordinates must display them also inline (at least in the mobile version)
  • All article coordinates outside infoboxes have to be reworked to be shown also inline (at least in the mobile version). (This might be a bit tricky. It cannot be done by the template, as the template does not know whether it is used inside or outside an infobox).

Is this correct? Will it work after these changes as expected?

Two issues:

  • Where should the coordinates be located? I believe it should be under the main image for both mobile and desktop version just like in https://en.wikipedia.org/wiki/St._Stephen%27s_Cathedral,_Vienna
  • How can that be achieved? I'd rather remove the blocking from the css than duplicating coordinates like in English Wiki. Positioning something under the (optional) main image ist however very hard, as positioning the main image is done within Mediawiki. Conclusio: Best place to do that is Mediawiki just like with the main image.

Still open:
I still don't see an explanation why coordinates worked until March 2015. In mobile.css the line with display:none is there ever since and so it is in desktop version. I'm absolutely sure the change in behaviour was March 2015 or one month earlier. Something changed with Javascript then? Do I have access to load.php history?

@TheDJ I'm clear about the risk. Thanks.

@Jdlrobson Can you please provide information on how T103409 became a blocker for that ticket that was created months before? I don't see why this should be a blocker. Was there anybody from German Wiki involved?

@Herzi.Pinki If we really have to work over 120.000 transclusions I would appreciate to do it "right" and not just in a German Wiki context.

@ThomasLedl as I said earlier this has been hidden since the beginning. It has not been discussed in much detail at all. This was a generic recommendation for all wikis based on how it looked in 2011 so yes of course it can be revisited. It has never been discussed in detail by any community members before so it's great you are taking an interest.

I can assure you coordinates never worked pre March 2015. The style to hide it has been present since 2012 and before that was removed on the server side long before.

You can see in this tasks history when geohack became a blocker and why. The mobile site has traditionally never linked to non-mobile optimised interfaces by default as it's goal is to promote good mobile experiences to end users which geohack does not as can be demonstrated in this iPhone screenshot:

@Jdlrobson I don't want to get stuck arguing if it was there or it wasn't. Hearing it wasn't there just makes me angry because I used it a lot.

As said before I absolutely do agree the geohack is not too user-friendly. But it is usable. The need to change to desktop version is definitely less user friendly. That arguing doesn't lead to a solution.

The thing is I actually appreciate the attempts by the mobile team. Clearing out is definitely a good thing.
Getting back to plain html speeding up load times harmonizing layout is definitely the right approach. That is good work!

On the other hand there is of course the need for the basic features. This one is basic.
And I'm not asking for augmented reality or something. I'm just asking to show an existing information. And I'm willing to do my part.

But before implementing a technical workaround using proprietary template boxes for images in 120000 pages I'm asking for the right way to do it!
The design convention and the implementation convention!

  • Where should the coordinates be shown?
  • What technical implementation should be used to be future safe (e.g. showing the map instead of the coordinates) and fast as well?

Is this something that can be clarified within WMF?

I was investigating the situation a bit more and want to sort out things here (also partly contradicting my previous post here):

  • This issue is not about geohack and its mobile unfriendlyness: Geohack is still used for inline coordinates on both the mobile WP:en and the WP:de. Although the unfriendlyness of geohack might be an issue, it is of no relevance here.
  • WP:en and WP:de do display main article coordinates (title coordinates) in some arbitrary 'top' position in the desktop version (slightly different for both), but in both cases (and some other languages I had a look at), this anchor is not shown on the mobile version. There is no difference between WP:en & WP:de regarding this point.
    • WP:en: <span id="coordinates"> moved to <div id="siteSub"> (below heading)
    • WP:de: <div id="coordinates" class="coordinates> (above heading)
  • {{All Coordinates}} is skipped for the same reason as the article (title) coordinate is.
  • {{All Coordinates|pos=inline}} or {{All Coordinates|pos=right}} do work fine also in the mobile version
  • All inline coordinates are left untouched in the mobile version, even if the link to geohack is masked by some text, these coordinates work fine
  • Having a single coordinate in an article will allow to get to the geohack and in turn allow to show all coordinates of that article via the links down in the geohack-box (remember that {{All Coordinates}} is just a shortcut for these links already in the geohack, but circumventing the geohack intermediate page.)
  • It is not an issue of the German WP: al least the following WPs (checked some on St. Stephen's cathedral) do not provide article (title) coordinates in the mobile version: af, bg, da, he, it, ja, ru, sv

The most effective, all-WP solution to that issue would be to show the title coordinates (and {{All Coordinates}}) in some place also on the mobile version. It might be difficult to find the right position but a least a common position will provide common look and feel. Replacing the representation of the coordinates by the real coolest stuff you can imagine, is left to future enhancements. It is not a blocker to not have this fancy stuff right now.

As space is limited (and there is not much sense in typing coordinates from what is shown), an icon for the coordinates will have fixed small size and can link to the appropriate geohack page. Instead of showing the value (if you need the value, you can copy the link). Same for {{All Coordinates}}, which could be reduced to currently three or four icons in a scrollable list or in a drop down box.

As a side aspect: Coordinates are central to WP and should be provided as a standard extension by the Mediawiki SW.

Alternatively we can use the working power of the community to fix this WP by WP. What has to be done?

  • All Infoboxes dealing with coordinates must provide also inline coordinates in the infobox (at least in the mobile version)
  • Coordinates are best handled by Infoboxes (give a central place to change implemenation)
  • {{All Coordinates}} are now written to the plain wiki text, but in most cases (tables of geographical objects like monuments, bridges, trees, …) there is a template providing the table header. {{All Coordinates}} can be moved to these table headers and provide the inline call to {{All Coordinates}}, which should work fine also in the mobile version. Calling {{All Coordinates}} twice is not a problem so there is no need to cleanup.
  • Usage of {{All Coordinates}} in category pages can be implemented differently and automatically on the namespace.
  • Remaining isolated {{All Coordinates}} have to be checked manually.
  • There is also {{Linked Coordinates}}
  • Besides this, all other coordinates not inlined explicitly should be inlined in the mobile version (similar to Dutch solution). This can be done in the coordinates template in a central place. The drawback is that the inlined coordinates will show up at surprising positions (but they will show up).
  • We could think about moving all article (title) coordinates from the bottom of the page up to the top (changing current weak policy). This must be done by a bot. This will allow to show the coordinates again on top, but now on top of the article text without any positioning tricks.

Sorry for the long post, I tried to keep focussed on the real problem and a practicable solution.

Herzi.Pinki added a comment.EditedJul 14 2016, 7:01 PM

see https://de.wikipedia.org/wiki/Benutzer:Herzi_Pinki/minerva.css for an individual workaround (just as a general idea not fully elaborated)

Thanks for all the detailed thought @Herzi.Pinki and your right the geohack is a separate consideration. From what I hear a mobile friendly version may be on the way.

I tried your custom css but it results in this for me so will need a lot more testing:

Something more reliable might be to defer rendering to the mobile extension so that it consistently generates a link at the bottom of the page or as part of the tagline that links to geohack provided the geohack url always takes this form.

Here are some rough ideas that would be relatively simple to implement
as a starting point (disclaimer: I'm not a designer :-)):



Are longitude/latitude coordinates universally understood by the majority of people?

Herzi.Pinki added a comment.EditedJul 14 2016, 7:46 PM

@Jdlrobson, you're right about my css. I was too keen to publish it here. But I keep on working on it.
the general idea behind is to use individual css for those who need coordinates and not to wait until this is solved either way.

Herzi.Pinki added a comment.EditedJul 14 2016, 8:17 PM

I now have a workaround that works for me:
see https://de.wikipedia.org/wiki/Benutzer:Herzi_Pinki/minerva.js & https://de.wikipedia.org/wiki/Benutzer:Herzi_Pinki/minerva.css

.mediawiki div#mw-content-text #coordinates {
    display: block !important;
}

var coords = document.getElementById('coordinates');
var d = document.createElement("div");
d.appendChild(coords);
document.getElementById('section_0').parentNode.appendChild(d);

I would have preferred a css-only solution, but I did not manage it. Maybe someone with css at his/her fingertips can do better.
Feel free to improve.

Zuse added a comment.Sep 17 2016, 5:56 PM

Just to mention my idea here, too.
On mobile we probably do not need a website (geohack) with many links.
At least geo uri https://en.m.wikipedia.org/wiki/Geo_URI_scheme would be nice, as most browsers opens a native map app after clicking them.

Restricted Application added a project: Discovery. · View Herald TranscriptJun 23 2017, 9:44 PM
Jdlrobson moved this task from Backlog to Tracking on the MobileFrontend board.Jul 13 2017, 5:56 PM
RHo added a subscriber: RHo.Jul 21 2017, 1:46 PM
debt moved this task from Backlog to Done on the Maps-Sprint board.
Cirdan added a subscriber: Cirdan.May 9 2018, 5:26 AM
Mholloway edited projects, added Maps (Kartographer); removed Maps.Aug 28 2018, 3:13 PM
MSantos lowered the priority of this task from Normal to Low.Sep 25 2018, 3:14 PM
MSantos moved this task from Unsorted to UI tasks on the Maps (Kartographer) board.
MSantos edited projects, added Maps; removed Maps (Kartographer).
MSantos moved this task from All map-related tasks to Tracking on the Maps board.