Page MenuHomePhabricator

Bug: Lead paragraph move transform fails to work on some pages with coordinates
Closed, ResolvedPublic

Description

Per our slack conversation the lead paragraph doesn't appear at the top of many location pages.

e.g. https://en.m.wikipedia.org/wiki/Spain#/

Screen Shot 2020-01-10 at 9.52.45 AM.png (1×1 px, 178 KB)

Expected: the infobox should appear after the first paragraph.

This appears due to a p tag outputted by Template:Coords

<p><span style="font-size: small;"><span id="coordinates"><a href="/wiki/Geographic_coordinate_system" title="Geographic coordinate system">Coordinates</a>: <span class="nourlexpansion"><a class="external text mw-kartographer-link mw-kartographer-maplink" href="#/geohacklink/0"><span class="geo-default"><span class="geo-dms" title="Maps, aerial photos, and other data for this location"><span class="latitude">40°N</span> <span class="longitude">4°W</span></span></span><span class="geo-multi-punct"> / </span><span class="geo-nondefault"><span class="geo-dec" title="Maps, aerial photos, and other data for this location">40°N 4°W</span><span style="display:none"> / <span class="geo">40; -4</span></span></span></a></span></span></span>


</p>

QA steps

  • Visit Belgium on production (https://en.m.wikipedia.org/wiki/Belgium ) on mobile device. Confirm that the infobox is the first element on the screen (This confirms the bug exists in production and assumes we are testing before the change has rolled out)
  • Visit the same page on beta cluster https://en.m.wikipedia.beta.wmflabs.org/wiki/Belgium and confirm the page begins with text about Belgium.
  • Do the same for the production and beta cluster versions of Denmark and Slovakia.

QA Results

ACStatusDetails
1T242447#5839365
2T242447#5839365
3T242447#5839365

Event Timeline

ovasileva triaged this task as Medium priority.Jan 13 2020, 11:39 AM

Change 567442 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Coordinates templates may include trailing whitespace

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

Change 567442 merged by jenkins-bot:
[mediawiki/extensions/MobileFrontend@master] Coordinates templates may include trailing whitespace

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

Edtadros subscribed.

Test Result

Status: ✅ PASS
OS: macOS Catalina
Browser: Chrome
Device: MBP
Emulated Device: iPhoneX

Test Artifact(s):

QA steps

Visit Belgium on production (https://en.m.wikipedia.org/wiki/Belgium ) on mobile device. Confirm that the infobox is the first element on the screen (This confirms the bug exists in production and assumes we are testing before the change has rolled out)
Visit the same page on beta cluster https://en.m.wikipedia.beta.wmflabs.org/wiki/Belgium and confirm the page begins with text about Belgium.
Do the same for the production and beta cluster versions of Denmark and Slovakia.

✅ AC1: Belgium

prodbeta
en.m.wikipedia.org_wiki_Belgium(iPhone X).png (2×1 px, 552 KB)
en.m.wikipedia.beta.wmflabs.org_wiki_Belgium(iPhone X).png (2×1 px, 502 KB)

✅ AC2: Denmark

prodbeta
en.m.wikipedia.org_wiki_Denmark(iPhone X).png (2×1 px, 497 KB)
en.m.wikipedia.beta.wmflabs.org_wiki_Denmark(iPhone X).png (2×1 px, 465 KB)

✅ AC3: Slovakia

prodbeta
en.m.wikipedia.org_wiki_Slovakia(iPhone X).png (2×1 px, 448 KB)
en.m.wikipedia.beta.wmflabs.org_wiki_Slovakia(iPhone X).png (2×1 px, 430 KB)