HomePhabricator

Fix watchlist query continuation and rendering

Authored by phuedx.

Description

Fix watchlist query continuation and rendering

When the user scrolls to the bottom of the page, an API request is made
with client-generated continuation parameters. The initial value of the
"continue" continuation parameter was incorrectly set to "". Set the
value of the parameter to "gwrcontinue||", which signals to the API
continuation manager to use the watchlistraw generator's continuation
state.

The rendering of watchlist items fetched from the API, i.e. via
WatchListApi#load, was broken in
b82f3d61683eba8e807e0cfb976bbe079fc0e5e9. Update the
WatchListApi#parseData method to return an object that can be rendered
by the PageListItem.hogan template by:

  • renaming the "title" property to "displayTitle"
  • setting the "thumbnail.isLandscape" property rather than generating sets of CSS classes
  • generalise the selection of thumbnail elements in the PageList#renderPageImages method so that it works for both the search overlay and watchlist

Bug: T101453
Change-Id: I1c17f9c2be6b06ecb2e7d2f541d7f15bf960fd3b

Details

Committed
phuedxAug 10 2015, 7:24 PM
Parents
rEMFRb02f6a588810: Localisation updates from https://translatewiki.net.
Branches
Unknown
Tags
Unknown
ChangeId
I1c17f9c2be6b06ecb2e7d2f541d7f15bf960fd3b