-
-
Notifications
You must be signed in to change notification settings - Fork 825
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SearchKit: Don't show the pager unless it is needed #26395
SearchKit: Don't show the pager unless it is needed #26395
Conversation
(Standard links)
|
jenkins test this please |
1 similar comment
jenkins test this please |
Looks good to me but let's see what @colemanw says |
I don't entirely agree with this change. In general, when an element is not usable we display it as "disabled" rather than hiding it completely (search button, actions menu, unavailable actions). IMO that makes for a less-confusing UX. And I don't quite see the argument for "taking up space" being a problem, since the upshot of having fewer results than the limit is that the display will already take up less space than normal. |
Sure, we could do it as an option instead. I think it would be good to be able to have something like this for Admin UI, where in many cases there won't be a second page and we don't really need a disabled pager at the bottom of each. I agree that it doesn't make much difference for something like a contact search. Will do. And agreed on the organization of the options. |
@colemanw Are you happy if I add this option to the existing Admin UI displays? |
@larssandergreen that sounds fine. We don't need to block progress just because the admin screen is cluttered, go ahead and add to it and we can try to de-clutter at some point. |
@colemanw Will do, but I meant, are you happy to hide the pager when there is only one page for existing AdminUI Displays, like on Manage Contribution Pages in the example I gave. Looking through them, I think the only one that could be an edge case is Manage Groups, that one could go either way, the remainder I think really don't need the pager as most installs will probably never hit 50 of them. |
82c3bbe
to
62d8e67
Compare
Ok @larssandergreen yes I'm fine with that. |
OK, great, @colemanw, I've pushed two commits, one adds the hide_single option (and re-orders the pager options to make a little more sense), the other adds hide_single to all the Admin UI forms. Also added show_count and expose_limit to Groups and Scheduled Jobs for consistency. |
Ok thanks @larssandergreen - looks great. |
Overview
We don't need to show the pager in Search Displays if the number of rows is less than the page size.
Before
E.g. Manage Contribution Pages, pager just taking up space.
After
No more pager.
If you adjust the page size, the pager is shown as appropriate.