Page MenuHomePhabricator

Add option to change number of items on search result screen
Open, MediumPublicFeature

Description

Currently the number of items that are displayed on the search result screen (example link) is twelve. There is not way to change that number, but it seems the software is able to display more just by changing the page_size parameter to something else, (example).

Twelve seems like a small number as a default, and there's no reason to not increase this to something larger without hampering performance, e.g. 36.

Also it seems not that much work to add a way to change the number of items displayed on this page to a couple of custom values, e.g. 12, 24, 36 and 48.

Would be nice if this setting is also saved for logged in users.

Event Timeline

bd808 triaged this task as Medium priority.Apr 20 2022, 5:12 PM
bd808 changed the subtype of this task from "Task" to "Feature Request".
bd808 moved this task from Backlog to Groomed/Ready on the Toolhub board.
bd808 subscribed.

Twelve seems like a small number as a default

I think 12 was and still is a reasonable default with the card view, but I agree that some users are likely to want to see more in a single page either because they have a large viewport size which looks sparse with only 12 displayed, or because they are used to vertical scrolling rather than pagination.

Would be nice if this setting is also saved for logged in users.

For an initial implementation this could probably be a local storage setting rather than adding database preferences. That would also mean that it would be persisted for anon users. There is some existing code in the locale vuex file showing save and retrieval of a value from window.localStorage.

@bd808: using localStorage seems completely fine to me. It's not the end of the world if this setting is lost on another browser or when deleting the cache.

Change 787841 had a related patch set uploaded (by Raymond Ndibe; author: Raymond Ndibe):

[wikimedia/toolhub@main] ui WIP: Refactor pagination across frontend

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

Aklapper added a subscriber: Raymond_Ndibe.

@Raymond_Ndibe: Removing task assignee as this open task has been assigned for more than two years - See the email sent to task assignee on October 11th.
Please assign this task to yourself again if you still realistically [plan to] work on this task - it would be welcome! :)
If this task has been resolved in the meantime, or should not be worked on by anybody ("declined"), please update its task status via "Add Action… 🡒 Change Status".
Also see https://www.mediawiki.org/wiki/Bug_management/Assignee_cleanup for tips how to best manage your individual work in Phabricator. Thanks!