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