Page MenuHomePhabricator

Category pages are not shown correctly.
Closed, ResolvedPublic

Description

The Android app does not display the full contents of Category pages. This happens regardless of the HTML source (MediaWiki API action=mobileview, or the mobile content service).

Example:

Expected
Subcategories should be displayed – https://en.wikipedia.org/wiki/Category:Engineering_disciplines

eng1.jpg (700×1 px, 120 KB)

Actual
Subcategories are not displayed on Android app

eng2.png (1×1 px, 103 KB)

Event Timeline

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

@GWicke Who is responsible for including the missing info? Is this something that MCS should provide?
What's the API call for getting the subcategories for [[Category:Engineering_disciplines]]?

Nemo_bis renamed this task from Category:Engineering disciplines, browser mobile view differs from Android view to On category pages, Android view differs from desktop site (no contents shown).Dec 23 2016, 8:02 AM
Nemo_bis removed Lbertolotti as the assignee of this task.
Nemo_bis triaged this task as High priority.
Nemo_bis added a project: Mobile.

For now, while the issue of how to transclude incidental info like this for Parsoid-generated pages is under discussion, any reason not to expand the app-side workaround from T135242 to load all non-mainspace pages from MW API? That would at least give users the content they expect in the meantime.

RHo renamed this task from On category pages, Android view differs from desktop site (no contents shown) to Contents are not shown on Category pages in the Android app.Jan 4 2017, 4:21 PM
RHo updated the task description. (Show Details)
RHo renamed this task from Contents are not shown on Category pages in the Android app to Contents are not shown on Category pages (and any non-mainspace pages) in the Android app.Jan 4 2017, 4:25 PM
RHo updated the task description. (Show Details)
bearND renamed this task from Contents are not shown on Category pages (and any non-mainspace pages) in the Android app to Subcategories are not shown on Category pages in the Android app.Jan 4 2017, 4:26 PM
bearND updated the task description. (Show Details)

Hmm, unfortunately it seems that mobileview doesn't give us the category listings, either.

Dbrant renamed this task from Subcategories are not shown on Category pages in the Android app to Content service does not expand contents of Category: pages..Jan 31 2017, 6:47 PM
Dbrant updated the task description. (Show Details)
Dbrant added subscribers: Mooeypoo, Djembayz, Tbayer and 6 others.

MCS doesn't yet fully support File and Category pages. This is something we're going to work on as part of the Page Content Service project. In the meantime I would recommend the Android app to use action=mobileview for Category pages as well.

Mholloway renamed this task from Content service does not expand contents of Category: pages. to Subcategories are not shown on Category pages in the Android app.Aug 22 2017, 8:38 PM

This isn't an MCS-specific bug. It happens when loading from mobileview as well.

Sorry, on closer look this is a distinct issue.

@Jdlrobson I'm not familiar enough with the MediaWiki internals to fully interpret what's really going on here but it looks like File pages are special-cased in ApiMobileView so that the full page content is rendered. Does something similar have to happen for Category pages and other non-mainspace pages?

(These also aren't fully rendered in MCS but that's a separate issue.)

Subcategories require JS to work. When you click on them you'll see API requests such as:

https://en.wikipedia.org/w/api.php?action=categorytree&format=json&category=Aerospace_engineering&options=%7B%22mode%22%3A0%2C%22hideprefix%22%3A20%2C%22showcount%22%3Atrue%2C%22namespaces%22%3Afalse%7D&uselang=en&formatversion=2

Removed Parsoid tags -we are correctly not shipping the HTML for those. It's perfectly fine to show just the top level categories without JS, they degrade nicely. For instance
https://en.wikipedia.org/wiki/Category:Engineering_disciplines links to the sub category https://en.wikipedia.org/wiki/Category:Aerospace_engineering however when clicked JS renders the list in place.

What's the actual problem statement here? It sounds like a case of a user expects them to show inline but actually they have to click a link to see them.

Mholloway lowered the priority of this task from High to Medium.Aug 23 2017, 2:55 PM

Reflecting reality.

@Jdlrobson I'm not quite sure I'm following. What link are you referring to? As shown in the screenshot above, the page claims to be a list of subcategories but (in our client, when retrieved from either API) actually lists nothing. The only link I see is the external link to Commons.

Edit: I see that the categories are available there; still, it strikes me as a valid bug that they're not shown inline in the app.

Oh I have no idea how the content service behaves for categories, but it doesn't surprise me this is not working. Categories are generated from metadata and not stored in the same way as other pages - if you want to render these I recommend you add special handling for "Category:" namespace using the mediawiki apis.

It might make sense to make this a separate service in MCS. I created a service for https://trending.wmflabs.org/wiki/Special:Categories and it's subpage, however given usage is low you might be fine just using mediawiki apis. You are not blocked on services or infrastructure for this in my opinion.

Ii would suggest you use the MediaWiki API - https://en.m.wikipedia.org/wiki/Special:ApiSandbox to render categories. A read through https://github.com/jdlrobson/weekipedia/blob/master/libs/server/endpoints/categories.js will give you an idea of which apis to use. The default endpoint for page views should strictly not surface these. It will bloat the payload considerably.

Dbrant renamed this task from Subcategories are not shown on Category pages in the Android app to Category pages are not shown correctly..Aug 28 2019, 6:59 PM
Dbrant added a subscriber: ABorbaWMF.
Dbrant subscribed.

Categories are now shown natively in the Android app (T73966), so untagging Android.

Adding Content-Transform-Team as Product-Infrastructure-Team-Backlog-Deprecated has been deprecated for a while, and as open valid tasks shall not be ignored and forgotten only because WMF internally reorgs without much change management in place (cf T328586).

Categories are now shown natively in the Android app (T73966), so untagging Android.

So sounds like this can be resolved?

Tgr claimed this task.

FWIW per T151223#2897043, this was a skinning issue, so it had to be solved within the Android app.