Page MenuHomePhabricator

External links without names are not displayed in Wikipedia Android App
Closed, ResolvedPublic

Description

While external links of the form [url name] are correctly displayed links of the form [url] just disappear in Wikipedia Android App.

Test page: https://de.wikipedia.org/wiki/Benutzer:Aschroet/T162116

Expected behavior: External links should be rendered as in the browser, namely [1].

Details

Related Gerrit Patches:

Event Timeline

Aschroet created this task.Apr 4 2017, 7:35 AM
Restricted Application added a subscriber: Aklapper. Ā· View Herald TranscriptApr 4 2017, 7:35 AM
Aschroet updated the task description. (Show Details)Apr 4 2017, 7:36 AM
Aschroet added a project: Android-app-Bugs.
Restricted Application added a project: Wikipedia-Android-App-Backlog. Ā· View Herald TranscriptApr 4 2017, 7:37 AM

This looks like another rendering discrepancy in which the MW parser is doing extra work that Parsoid doesn't. Here, MW is injecting a "[1]" for the link to be anchored to.

Wikitext:
[https://wikipedia.org/]

MW HTML:
<a class="external autonumber" href="https://wikipedia.org/">[1]</a>

Parsoid HTML:
<a rel="mw:ExtLink" href="https://wikipedia.org/" id="mwAw"></a>

@ssastry, is Parsoid working as expected here or is there a plan to work toward parity in this area? Otherwise, we'll probably need to add a transform to the mobile content service.

This is a deliberate design decision from the beginning. Parsoid relies on CSS to style these links. This lets editing clients move around these links without have to mess with fixing up the display. This is also useful for content reuse. Could you use CSS in your use case as well?

Thanks, @ssastry, I had guessed this was intended but just wanted to double-check. And thanks for the pointer to the CSS snippet. (@Niedzielski, maybe worth seeing if this approach or something like it could work in applib)?

Change 346647 had a related patch set uploaded (by Mholloway):
[mediawiki/services/mobileapps@master] Stop stripping 'rel=mw:Extlink' attributes from <a> tags

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

Change 346647 merged by jenkins-bot:
[mediawiki/services/mobileapps@master] Stop stripping 'rel=mw:Extlink' attributes from <a> tags

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

bearND moved this task from Incoming to Kanban on the Mobile-Content-Service board.Apr 6 2017, 2:32 AM
bearND moved this task from To Do to To Deploy on the Mobile-Content-Service (Kanban) board.

Change 346756 had a related patch set uploaded (by Mholloway):
[apps/android/wikipedia@master] Bundle styles from mediawiki.skinning.content.parsoid

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

(Looks like no special provision is required in applib after all.)

deploy/2017-04-10/9bc8c07e

Change 346756 merged by jenkins-bot:
[apps/android/wikipedia@master] Bundle styles from mediawiki.skinning.content.parsoid

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

@ssastry, thanks again for the pointer. Are there any other upstream (from us) modules for handling Parsoid HTML that we may want to be aware of? The Reading platform teams are in the midst of a cross-platform CSS/JS consolidation effort and it would be helpful to keep these in mind.

Tested on Nexus 4 Android 5.1 and Pixel Android 7.1.1 both running 2.5.195-alpha-2017-04-24

I'm not sure I am testing on the right version. Based on the article in the description, I am still seeing the missing URL. Perhaps the article is not correct. @Mholloway, please let me know if I am missing something.

@ABorbaWMF, sorry about that, I think the MCS patch that fixes this still needs to be deployed. @bearND is out and it looks like today's services deployment window is past so I'll put this in Blocked/Waiting for now and move it back when it's truly ready for QA.

I did an MCS deployment a couple of hours ago. In the Android app I see that the first bullet item has [1] now.

This seems to have regressed. Looking into it now.

Change 351185 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[apps/android/wikipedia@master] Fix: Update MCS content format versions accepted

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

Change 351185 merged by jenkins-bot:
[apps/android/wikipedia@master] Fix: Update MCS content format versions accepted

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

Hey @ABorbaWMF, this should be ready for testing now with the latest alpha build. Sorry about the mix-up!

Tested on Nexus 4 Android 5.1 and Pixel Android 7.1.1 both running 2.5.195-alpha-2017-04-26

Looks good to me. Tested against the example page and a few other pages with lists.

Dbrant closed this task as Resolved.May 15 2017, 3:12 PM
Mholloway reopened this task as Open.Oct 12 2017, 10:36 PM

Change 383952 had a related patch set uploaded (by Mholloway; owner: Mholloway):
[apps/android/wikipedia@master] Reincorporate autoincremented numbering for links without display text

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

Change 383952 merged by jenkins-bot:
[apps/android/wikipedia@master] Reincorporate autoincremented numbering for links without display text

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

Mholloway closed this task as Resolved.Oct 30 2017, 5:40 PM