VisualEditor: Coordinates template is displaying in the wrong place
Open, Stalled, LowPublic8 Story Points

Description

Steps to reproduce:

  1. Open any page that contains the {{coord}} template on en.wp See, e.g., https://en.wikipedia.org/wiki/Harton,_North_Yorkshire

Results:

The coordinates template, which should be in the top right corner, displays in the far left—so far to the left that only the last few characters are visible.


Version: unspecified
Severity: normal

Details

Reference
bz65648
bzimport raised the priority of this task from to Needs Triage.
bzimport set Reference to bz65648.

The above example is still basically the same. Possibly different, is that the template only moves to the far-left *after* I mouseover the template. (Firefox and Chrome).

However, at other articles, it moves to different places.
e.g. https://en.wikipedia.org/wiki/Happy_Valley,_Victoria after I mouseover the link, it moves downwards by ~1cm, so that it overlaps the infobox.
e.g.2. https://en.wikipedia.org/wiki/Happy_Valley,_South_Australia after I mouseover the template, it moves to the far-left, but also far-down the page (underneath the ==References== section).

Jdforrester-WMF changed the task status from Open to Stalled.Feb 2 2015, 7:24 PM

Cannot reproduce the problem anymore on https://en.wikipedia.org/wiki/Harton,_North_Yorkshire?veaction=edit even after hovering over the Coord template and clicking it. Same for Quiddity's other two links. Coord stays on the right where it belongs in Firefox 36 on Fedora 21.

Should this task be closed as resolved / declined?

Elitre added a comment.Mar 6 2015, 2:37 PM

I tried as well, and what happens for me in FF and Chrome is that the template moves completely to the right and there is no margin between the E and the scrollbar.

Today in (try here: https://en.wikipedia.org/wiki/Burpengary_Creek?veaction=edit ) it is on the far right, so far right that there is no margin between the final character and the scrollbar, as Elitre described. However, it's also one line too low, which means that it makes the last few words of the first paragraph very difficult to read.

Yes, this is because we give the document padding instead of margin to make the margins clickable.

Deskana set the point value for this task to 8.Dec 13 2017, 12:19 PM
Deskana moved this task from To Triage to Backlog on the VisualEditor board.
Deskana triaged this task as Low priority.
matmarex added a subscriber: matmarex.

Just for reference, since this task doesn't have a screenshot, here's how it currently looks:

VisualEditor does its best attempt to position the template where requested by the CSS (position: absolute; top: 0; right: 0;), but for boring technical reasons ("stacking contexts") it can't escape the editing surface:

English Wikipedia should migrate the {{Coord}} template to use the <indicator> parser tag to position it in the top-right corner (see https://www.mediawiki.org/wiki/Help:Page_status_indicators). Many other templates there already use it, for example everything derived from {{Top icon}}. VisualEditor will display such templates as if they were invisible (like e.g. {{Use British English}}), with a greyed-out puzzle icon and template name.

Just for reference, since this task doesn't have a screenshot, here's how it currently looks:

VisualEditor does its best attempt to position the template where requested by the CSS (position: absolute; top: 0; right: 0;), but for boring technical reasons ("stacking contexts") it can't escape the editing surface:

English Wikipedia should migrate the {{Coord}} template to use the <indicator> parser tag to position it in the top-right corner (see https://www.mediawiki.org/wiki/Help:Page_status_indicators). Many other templates there already use it, for example everything derived from {{Top icon}}. VisualEditor will display such templates as if they were invisible (like e.g. {{Use British English}}), with a greyed-out puzzle icon and template name.

So, are we saying that the solution here is a simple recommendation to the community, or is there anything we technically would need to implement on our side? TY.

Yes, the best solution here is for the English Wikipedia community to change {{Coord}} in that way. On its face this looks like a simple change, but this is a widely-used and complicated template, so some care will no doubt be needed. Any gadgets or tools depending on the output of this template may also need to be updated (e.g. the map popup). I don't think it is feasible to solve this on the VE side (and we won't need to do anything if the template is changed).

@Whatamidoing-WMF is this something you'd like to look into?

More precisely, updating that scary template is something that I think a technically competent person, e.g., @Jc86035 @MaxSem @TheDJ or @JJMC89, should look into. :-)

I don't know Lua, but I think something like this might do it. See Module talk:Coordinates#Convert to indicator.

TheDJ added a comment.Mar 25 2018, 2:41 PM

this will move the coordinates from below the H2 line to above it.. I expect resistance :)

Jc86035 added a comment.EditedMar 25 2018, 2:45 PM

If resistance would be an issue (and I think that's not unlikely), I think it would be better to wait for Community Tech to convert the module to use Kartographer, since GeoHack would then not be needed for coordinates on Earth. Then any visual change as a result of changing the GeoHack styling would affect far fewer pages.

TheDJ added a comment.Mar 25 2018, 3:18 PM

For now https://en.wikipedia.org/w/index.php?title=MediaWiki:Monobook.css&diff=832362097&oldid=813457383 and https://en.wikipedia.org/w/index.php?title=MediaWiki:Vector.css&diff=832362332&oldid=813450031 less problematic, without the need to resort to moving it.

@Jc86035 BTW. it can already use Kartographer (some wiki's do, and i think en.wp even has a sandbox version of it). But i'm not wasting my precious free time on weeks of discussion with the princesses to convince them to switch.

this will move the coordinates from below the H2 line to above it.. I expect resistance :)

You can still keep the position: absolute; ... for <span id="coordinates"> if preserving the exact positioning is required, even when it's in an indicator.

TheDJ added a comment.Mar 26 2018, 2:44 PM

this will move the coordinates from below the H2 line to above it.. I expect resistance :)

You can still keep the position: absolute; ... for <span id="coordinates"> if preserving the exact positioning is required, even when it's in an indicator.

Good point, i'll see about experimenting with that somewhere this week.

Just FYI to Chris!