Page MenuHomePhabricator

Support pagination on multiple columns in IndexPager
Closed, ResolvedPublic

Description

For Special:Investigate, displaying pages of results for the preliminary check tab (T237039) and for the compare tab (T237593) requires pagination on multiple columns, which are unique in combination. The pagers for each of these results tables extend TablePager, which extends IndexPager.

The IndexPager currently supports pagination on a single column. It should be updated to support pagination on multiple columns.

Event Timeline

Restricted Application added a subscriber: Aklapper. ยท View Herald TranscriptFeb 6 2020, 3:24 PM

Change 570172 had a related patch set uploaded (by Tchanders; owner: Tchanders):
[mediawiki/core@master] Support pagination on multiple columns in the IndexPager

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

Change 570172 merged by jenkins-bot:
[mediawiki/core@master] Support pagination on multiple columns in the IndexPager

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

@dom_walden This can be tested alongside T244517 and T238808.

It could be tested further by changing the order of the columns returned by ComparePager::getIndexField.

Testing for risk of regression, I tested a few special pages which used or inherited from IndexPager (which I think is all of them).

Set the items per page (or equivalent) to the lowest value and going through a few pages, comparing the results to itself (at a higher limit) and the API, checking no items were lost.

There were a few cases where items were lost across pages, where there was a duplicate in the column on which it is paginated. These were bugs that existed before, and which this code change allows us to fix.

For example, click next on this page misses this image, because it has the same timestamp as the last image on that page (and it indexes on the timestamp).

Special pages tested:

  • Special:Contributions/$ip
  • Special:ActiveUsers
  • Special:DeletedContributions (might need to paginate on more than one column)?
  • Special:ListFiles

I have also extensively tested Special:BlockList as part of T244157.