Summary: | Make display of table filters in staff interface holdings table configurable | ||
---|---|---|---|
Product: | Koha | Reporter: | David Nind <david> |
Component: | Staff interface | Assignee: | Lucas Gass (lukeg) <lucas> |
Status: | Pushed to stable --- | QA Contact: | Emily Lamancusa (emlam) <emily.lamancusa> |
Severity: | normal | ||
Priority: | P5 - low | CC: | aleisha, emily.lamancusa, gmcharlt, jonathan.druart, lisette, lucas, mnero, oleonard, paul.derscheid, rcoert |
Version: | Main | ||
Hardware: | All | ||
OS: | All | ||
See Also: | https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=38110 | ||
GIT URL: | Change sponsored?: | --- | |
Patch complexity: | Trivial patch | Documentation contact: | |
Documentation submission: | Text to go in the release notes: |
This patch adds a new system preference called 'AlwaysShowHoldingsTableFilters'. This system preference allows staff to control the behavior of the filters on the items detail page. It can be set to either always show the filters by default or to never show the filters by default.
|
|
Version(s) released in: |
25.05.00,24.11.03
|
Circulation function: | |
Bug Depends on: | 33568, 38071 | ||
Bug Blocks: | 39315 | ||
Attachments: |
Bug 38108: Add system preference AlwaysShowHoldingsTableFilters
Bug 38108: Add ability to show/hide table filters via system preference Bug 38108: Add system preference AlwaysShowHoldingsTableFilters Bug 38108: Add ability to show/hide table filters via system preference Bug 38108: Add system preference AlwaysShowHoldingsTableFilters Bug 38108: Add ability to show/hide table filters via system preference Bug 38108: (QA follow-up) Use say_success in dbrev Bug 38108: Add Cypress tests |
Description
David Nind
2024-10-07 19:52:05 UTC
It is displayed if needed. The idea here is to keep the UI as minimal as possible. If length is 20 and you have <= 20 items, the pagination won't be displayed. If you have more, the pagination will be displayed even if "Show filters" is not clicked. It would be good to have the option to show filters by default - this setting could be stored in localStorage (similar to how Koha can remember to show checkouts by default) (In reply to Jonathan Druart from comment #1) > It is displayed if needed. > > The idea here is to keep the UI as minimal as possible. > If length is 20 and you have <= 20 items, the pagination won't be displayed. > > If you have more, the pagination will be displayed even if "Show filters" is > not clicked. They display if needed, I don't think we need anything else. What would be the use case for showing filters that don't do anything? We have our items set to display 50 items per page to get as many libraries showing on the first page as possible without bogging down the loading time. We use the search box to narrow down those items quickly by barcode, for example, rather than visually search to find it. We would appreciate the option to have the filters show by default even when there are less than 50 items. It makes sense for the page navigation to only show when useful, but the search box should be separate. (In reply to Miranda Nero from comment #4) > We have our items set to display 50 items per page to get as many libraries > showing on the first page as possible without bogging down the loading time. > We use the search box to narrow down those items quickly by barcode, for > example, rather than visually search to find it. We would appreciate the > option to have the filters show by default even when there are less than 50 > items. It makes sense for the page navigation to only show when useful, but > the search box should be separate. How do you do that? In Javascript? The main "Search" box is displayed (in last in 'main') even if all items are displayed. Which version are you using? (In reply to Jonathan Druart from comment #5) > How do you do that? In Javascript? > > The main "Search" box is displayed (in last in 'main') even if all items are > displayed. Which version are you using? We changed the "Default display length" to 50 in the otherholdings_table settings. The search box only shows for us on bibs that have 51+ items in the other holdings tab. I just did a little more testing and narrowed down the behavior even more to this happening if your logged in library does not have any holdings. When the "Other holdings" tab is the only tab showing and there are 50 or fewer items in it, the search bar disappears. (In reply to Miranda Nero from comment #6) > (In reply to Jonathan Druart from comment #5) > > How do you do that? In Javascript? > > > > The main "Search" box is displayed (in last in 'main') even if all items are > > displayed. Which version are you using? > > We changed the "Default display length" to 50 in the otherholdings_table > settings. The search box only shows for us on bibs that have 51+ items in > the other holdings tab. I just did a little more testing and narrowed down > the behavior even more to this happening if your logged in library does not > have any holdings. When the "Other holdings" tab is the only tab showing and > there are 50 or fewer items in it, the search bar disappears. Seems to work for me on "main": https://snipboard.io/AW8Jgo.jpg (In reply to Jonathan Druart from comment #7) > (In reply to Miranda Nero from comment #6) > > (In reply to Jonathan Druart from comment #5) > > > How do you do that? In Javascript? > > > > > > The main "Search" box is displayed (in last in 'main') even if all items are > > > displayed. Which version are you using? > > > > We changed the "Default display length" to 50 in the otherholdings_table > > settings. The search box only shows for us on bibs that have 51+ items in > > the other holdings tab. I just did a little more testing and narrowed down > > the behavior even more to this happening if your logged in library does not > > have any holdings. When the "Other holdings" tab is the only tab showing and > > there are 50 or fewer items in it, the search bar disappears. > > Seems to work for me on "main": https://snipboard.io/AW8Jgo.jpg Strange - here's what I see on our main site: https://snipboard.io/L7M9Ch.jpg This also means the "clear filter" link doesn't show, though there is an x in the search box that works to clear it, it only shows while you're in the box or hovering. Whatever is done here should be done on top of Bug 37334. (In reply to Aleisha Amohia from comment #2) > It would be good to have the option to show filters by default - this > setting could be stored in localStorage (similar to how Koha can remember to > show checkouts by default) In this case I think I prefer a system preference because localStorage would be cleared on logout which might be annoying for staff. The 'checkouss by default' that you mention is controlled via sys pref, AlwaysLoadCheckoutsTable Created attachment 178638 [details] [review] Bug 38108: Add system preference AlwaysShowHoldingsTableFilters Created attachment 178639 [details] [review] Bug 38108: Add ability to show/hide table filters via system preference To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Search for the 'AlwaysShowHoldingsTableFilters' system preference. It should be set to 'Don't'. 3. Without changing the system preference, go to a record detail page. 4. The filters should not show by default. 5. Make sure that toggling the Hide filters/Show filters button still work as expected. 6. Set 'AlwaysShowHoldingsTableFilters' to 'Do'. 7. Now the filters should show by default when you load the table. 8. Make sure that toggling the Hide filters/Show filters button still work as expected. (In reply to Lucas Gass (lukeg) from comment #10) > Whatever is done here should be done on top of Bug 37334. This doesn't conflict with Bug 37334 so I am removing that dependency. Created attachment 178691 [details] [review] Bug 38108: Add system preference AlwaysShowHoldingsTableFilters Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Created attachment 178692 [details] [review] Bug 38108: Add ability to show/hide table filters via system preference To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Search for the 'AlwaysShowHoldingsTableFilters' system preference. It should be set to 'Don't'. 3. Without changing the system preference, go to a record detail page. 4. The filters should not show by default. 5. Make sure that toggling the Hide filters/Show filters button still work as expected. 6. Set 'AlwaysShowHoldingsTableFilters' to 'Do'. 7. Now the filters should show by default when you load the table. 8. Make sure that toggling the Hide filters/Show filters button still work as expected. Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Created attachment 178694 [details] [review] Bug 38108: Add system preference AlwaysShowHoldingsTableFilters Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Created attachment 178695 [details] [review] Bug 38108: Add ability to show/hide table filters via system preference To test: 1. APPLY PATCH, updatedatabase, restart_all 2. Search for the 'AlwaysShowHoldingsTableFilters' system preference. It should be set to 'Don't'. 3. Without changing the system preference, go to a record detail page. 4. The filters should not show by default. 5. Make sure that toggling the Hide filters/Show filters button still work as expected. 6. Set 'AlwaysShowHoldingsTableFilters' to 'Do'. 7. Now the filters should show by default when you load the table. 8. Make sure that toggling the Hide filters/Show filters button still work as expected. Signed-off-by: Rebecca Coert <rcoert@arlingtonva.us> Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Created attachment 178696 [details] [review] Bug 38108: (QA follow-up) Use say_success in dbrev Use say_success instead of say when outputting a line that the system preference was added successfully Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> Nice quality of life enhancement, thanks Lucas! Passing QA It's kind of funny that first we remove the pref to show the filters and now we reintroduce it again? Can't find the old bug now, but this rings a bell.. Amended system preference description to mention staff interface. Pushed for 25.05! Well done everyone, thank you! Can this be backported to 24.11? (In reply to Katrin Fischer from comment #21) > It's kind of funny that first we remove the pref to show the filters and now > we reintroduce it again? Can't find the old bug now, but this rings a bell.. I don't remember we had a syspref. (In reply to Lucas Gass (lukeg) from comment #11) > (In reply to Aleisha Amohia from comment #2) > > It would be good to have the option to show filters by default - this > > setting could be stored in localStorage (similar to how Koha can remember to > > show checkouts by default) > > In this case I think I prefer a system preference because localStorage would > be cleared on logout which might be annoying for staff. But I don't understand the use case here, could you explain please? If there is no pagination does it still makes sense to display them? > The 'checkouss by default' that you mention is controlled via sys pref, > AlwaysLoadCheckoutsTable Controlled by a syspref for the default behaviour, but then is stored in localStorage (The "Always show checkouts automatically" checkbox). I think the question was about displaying the filters and if you set "per page" to a higher value, you will still want to see the filters, not necessarily the paging.
> But I don't understand the use case here, could you explain please?
>
> If there is no pagination does it still makes sense to display them?
I think pagination controls is only part of this. From my understanding staff wanted to have the ability to see the other controls by default. The filters for home/holding library, collection, etc without having to click 'Show filters' each time.
Created attachment 179171 [details] [review] Bug 38108: Add Cypress tests I am really not convinced by this change. And don't think it should be driven by a syspref. However any changes made to this page must be covered by tests please. (In reply to Jonathan Druart from comment #29) > I am really not convinced by this change. And don't think it should be > driven by a syspref. > > However any changes made to this page must be covered by tests please. Tests that I have added in the previous patch, I am not asking anything (for this time :D). Pushed for 25.05! Well done everyone, thank you! Nice work everyone! Pushed to 24.11.x for 24.11.03 |