Page MenuHomePhabricator

In paginated specialpage reports, include # of results & specify the end of the range displayed on this page
Open, LowPublicFeature

Description

Special pages listing pages according to some criteria currently show:

Showing XYZ results starting from ABC.

It would be better to have something like

Showing XYZ results in range ABC to DEF.


There should be also some box with direct accesses to certain pages like:

< < 1 2 3 4 5 6 7 > >

(first, prev, ... direct pages ..., next, last)


Version: unspecified
Severity: enhancement

Details

Reference
bz11269

Event Timeline

bzimport raised the priority of this task from to Low.Nov 21 2014, 9:54 PM
bzimport set Reference to bz11269.
bzimport added a subscriber: Unknown Object (MLST).

Oups, accidentaly submitted the older version.

The message should be

Showing XYZ of MNO results from ABC to DEF.

sumanah wrote:

This is still reproducible -- https://meta.wikimedia.org/wiki/Special:MostLinkedCategories is where I just checked it.

Note part of this bug is easier than other parts:

Showing XYZ results in range ABC to DEF.

That part is easy.

Showing XYZ of MNO results from ABC to DEF.

and

There should be also some box with direct accesses to certain pages like:

< < 1 2 3 4 5 6 7 > >

That's generally hard, since it would require knowing how many pages there are in total. If its a cached special page, I suppose one could record that info by adding a column to querycache_info.

Depending on the special page in question, it may be possible to have a link to the last page, and step through the query backwards (sans identifying which number we are on). I'm not sure off the top of my head, but that might be easier than listing all the page numbers, but still possibly harder than what an "easy" bug normally implies

ritusparks wrote:

Hey!
I am a newbie in mediawiki. Coud somebody please help me start with this bug?

RituS: Please see https://www.mediawiki.org/wiki/How_to_become_a_MediaWiki_hacker - if you have *specific* questions that only refer to the topic of this bug report feel free to ask them here; for general questions on development tools etc. please use one of the resources linked on that wikipage (e.g. IRC, wikipages or mailing lists). Thanks!

Change 111330 had a related patch set uploaded by Catrope:
Changed pagination format on Special:MostLinkedCategories

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

Change 111330 had a related patch set uploaded by BryanDavis:
Show range start and end in special page pagination

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

Change 111330 merged by jenkins-bot:
Show range start and end in special page pagination

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

Change 111330 provides an implementation for the "Showing XYZ results in range ABC to DEF" half of the initial request.

Putting state back to NEW so someone can come along and find a solution for the more difficult page jump navigation interface.

aditya.iiita102 wrote:

Fixed one part of the bug. On the second now

aditya.iiita102 wrote:

For the pagination part, to display page numbers, i need some clarification.

  1. How many page numbers should be displayed. I am sure we cannot display all cause there can be hundreds on them for the page.
  1. Suppose we are displaying 7 pages a time Ex: 1, 2, 3, 4, 5, 6, 7. Then if the user click on page 2, should the results change to 2, 3, 4, 5, 6, 7, 8 or something else.

aditya.iiita102 wrote:

Stuck in how to get the upper limit of page numbers. It requires the knowledge of total number of results in table.

(In reply to Aditya Chaturvedi from comment #12)

Stuck in how to get the upper limit of page numbers. It requires the
knowledge of total number of results in table.

I really don't think that's get-able efficiently. If we were just talking cached special page, it could be recorded in the querycacheinfo table, however then things would be inconsistent with uncached special pages.

Even linking to the last page for an uncached special page might be problematic, since we use offset paging, which gets inefficient when you're 50000 results in...

At best what I think could be done would be to link to just the "last" page, by going through the query in reverse order (Would have to do something about the ordered list output probably). Like how Special:Contributions has a (newest | oldest) link so you can skip to the end.

aditya.iiita102 wrote:

(In reply to Brain Wolff from comment #13)

I really don't think that's get-able efficiently. If we were just talking >cached special page, it could be recorded in the querycacheinfo table, however >then things would be inconsistent with uncached special pages.

Even linking to the last page for an uncached special page might be problematic, >since we use offset paging, which gets inefficient when you're 50000 results >in...

At best what I think could be done would be to link to just the "last" page, by >going through the query in reverse order (Would have to do something about the >ordered list output probably). Like how Special:Contributions has a (newest | >oldest) link so you can skip to the end.

Are you suggesting that displaying the page numbers should be skipped? I was able to produce an implementation of showing N pages at a time ranging from (x- N/2) to (x + N/2) where 'x' is the current page number but I need the upper page limit to prevent generating extra page numbers.

Please explain your comment further.

[removing "easy" keyword as per comment 9]

Aklapper changed the subtype of this task from "Task" to "Feature Request".Feb 4 2022, 11:01 AM
Aklapper removed a subscriber: wikibugs-l-list.