Page MenuHomePhabricator

[EPIC]: Use core watchlist code for mobile experience
Open, MediumPublic

Description

Problem

The MobileFrontend extension currently tries to mimic the watchlist in core but fails due to the fact the special watchlist class mixes rendering with model generation. Ideally it should be possible to skin the data by creating this separation.

Recreating the watchlist for mobile is very wasteful.
It causes additional work for other teams (see T159793).

The Watchlist special page also handles various user preferences which are currently overlooked by the mobile version.

Differences between mobile and desktop skinning

Screen Shot 2017-07-06 at 1.20.56 PM.png (619×679 px, 68 KB)

Screen Shot 2017-07-06 at 1.20.17 PM.png (505×1 px, 297 KB)

As you can be seen the positions of elements are extremely different. Touch areas are different. It's impossible to use the same HTML for both designs without a fundamental change to the design.

Solution 1

Use api.
Construct an ApiMain with a derived RequestContext

Hit the API to source the data for rendering.
Being driven by the API would also help resolve T111074 and T70368

Note: Use of FauxRequest seems to be frowned upon... see T169266

Solution 2

We do the separation in SpecialWatchlist. There should be a simple method render which is passed data or a model and renders it.

Make use of WatchedItemQueryService.php

Tangential:
It would be useful if SpecialWatchlist::outputChangesList in core was refactored to use this. It would make skinning a lot easier....

acceptance criteria

The following user preferences should be honoured

  • Mobile watchlist should follow the same Show/Hide preferences as the desktop watchlist (see T69799 for more details)
  • Mobile Watchlist does not take into account preference value of expand/aggregation into account (see T70367)
  • Hide bot edits from the watch list not taken into account (see T70365)
  • No logic for unseen notifications
  • Pagination should be mor (was T111074)

todo

  • add screenshots showing desktop watchlist skinned in Minerva and mobile watchlist
  • suggest architecture diagram
  • tag with mediawiki core team
  • rfc?

Related Objects

StatusSubtypeAssignedTask
OpenNone
OpenNone
DeclinedNone
DeclinedNone
DeclinedNone
DeclinedNone
ResolvedJdlrobson
ResolvedJdlrobson
DuplicateJhernandez
DeclinedNone
ResolvedNone
DeclinedNone
ResolvedNone
DeclinedNone
DuplicateNone
DuplicateNone
ResolvedJdlrobson
DuplicateNone
DeclinedNone
OpenNone
DeclinedBUG REPORTJdlrobson
OpenNone
OpenBUG REPORTNone

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
Jhernandez raised the priority of this task from to Low.Aug 17 2015, 11:56 AM
Jhernandez added projects: MobileFrontend, Epic.
Jhernandez added subscribers: Jhernandez, Jdlrobson.
Jdlrobson renamed this task from [EPIC]: Improve mobile watchlist to [EPIC]: Improve mobile watchlist / use core watchlist code for mobile experience.Dec 3 2015, 11:46 PM
Jdlrobson set Security to None.
Jdlrobson renamed this task from [EPIC]: Improve mobile watchlist / use core watchlist code for mobile experience to [EPIC]: Use core watchlist code for mobile experience.May 22 2017, 9:34 AM
Jdlrobson updated the task description. (Show Details)
Jdlrobson raised the priority of this task from Low to Medium.May 25 2017, 10:34 PM
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
Jdlrobson updated the task description. (Show Details)
Jdlrobson added subscribers: phuedx, Stryn, PamD and 8 others.

Change 499864 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Remove the SpecialMobile(Watchlist|History|Contributions) page and use the core versions

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

Change 499864 abandoned by Jdlrobson:
Remove the SpecialMobile(Watchlist|History|Contributions) page and use the core versions

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

Change 755510 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] [Proof of concept] Drop the Mobile special pages

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

Test wiki created on Patch demo by Jdlrobson using patch(es) linked to this task:

https://patchdemo.wmflabs.org/wikis/d6efd56b19/w/

Test wiki on Patch demo by Jdlrobson using patch(es) linked to this task was deleted:

https://patchdemo.wmflabs.org/wikis/d6efd56b19/w/

Change 755510 abandoned by Jdlrobson:

[mediawiki/extensions/MobileFrontend@master] [Proof of concept] Drop the Mobile special pages

Reason:

Not actively working on this. Some of this work will be realized in https://phabricator.wikimedia.org/T300185

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