Bug 36663 - Table configuration options on items table don't show in staff interface
Summary: Table configuration options on items table don't show in staff interface
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: unspecified
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Pedro Amorim
QA Contact: Testopia
URL:
Keywords:
Depends on: 33568
Blocks:
  Show dependency treegraph
 
Reported: 2024-04-22 11:07 UTC by Pedro Amorim
Modified: 2024-04-29 07:44 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00


Attachments
Bug 36663: Don't hide table elements if StaffDetailItemSelection is enabled (1.40 KB, patch)
2024-04-22 11:09 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36663: Don't hide table elements if StaffDetailItemSelection is enabled (1.45 KB, patch)
2024-04-22 11:25 UTC, David Nind
Details | Diff | Splinter Review
Bug 36663: Adjust datatable button selector (967 bytes, patch)
2024-04-22 15:59 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36663: Update alignment of datatable buttons (828 bytes, patch)
2024-04-22 15:59 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36663: Hide specific inner elements, not the whole top pager container (2.45 KB, patch)
2024-04-22 15:59 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36663: Adjust datatable button selector (1021 bytes, patch)
2024-04-22 16:29 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 36663: Update alignment of datatable buttons (882 bytes, patch)
2024-04-22 16:29 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 36663: Hide specific inner elements, not the whole top pager container (2.50 KB, patch)
2024-04-22 16:29 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 36663: Adjust datatable button selector (1.07 KB, patch)
2024-04-23 07:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36663: Update alignment of datatable buttons (958 bytes, patch)
2024-04-23 07:35 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 36663: Hide specific inner elements, not the whole top pager container (2.58 KB, patch)
2024-04-23 07:35 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Pedro Amorim 2024-04-22 11:07:14 UTC
To reproduce:
1- Enable StaffDetailItemSelection
2- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
3- Notice there are no table configuration options on the top right (Columns, Export, Configure).
4- Click the "Show filters" link, notice the table configuration options now show, as well as top and bottom pagers, column filter inputs and search input.
5- Disable StaffDetailItemSelection
6- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
7- Notice that the table configurations options are visible, as well as top and bottom pagers, and search input.
8- Click the "Show filters" link, notice it now only governs the column filter inputs, the other elements mentioned in step 7 are always visible.

This does not seem consistent, "Show filters" should behave the same regardless of the value of StaffDetailItemSelection, i.e. it should only hide or show the column filter inputs.

Additionally, before bug 33568, I believe the configuration options showed by default (with StaffDetailItemSelection enabled) on k-t-d, and they don't anymore.

Patch adding this behavior:
https://github.com/Koha-Community/Koha/commit/0db4098
Comment 1 Pedro Amorim 2024-04-22 11:09:07 UTC
Created attachment 165262 [details] [review]
Bug 36663: Don't hide table elements if StaffDetailItemSelection is enabled
Comment 2 Pedro Amorim 2024-04-22 11:11:12 UTC
@Joubu would love input here. I'm not 100% sure about my patch or what the code I'm removing is originally supposed to fix/prevent, but the patch solves the issue I described in the first comment.
Comment 3 David Nind 2024-04-22 11:25:55 UTC
Created attachment 165266 [details] [review]
Bug 36663: Don't hide table elements if StaffDetailItemSelection is enabled

Signed-off-by: David Nind <david@davidnind.com>
Comment 4 Jonathan Druart 2024-04-22 12:07:00 UTC
The purpose of those lines are to hide the pagination if the number of items to display is <= than the number of the number of total items (ie. all the items are displayed on the screen).

The idea was to reduce the size of the table when it's not necessary to show the pagination.

It was a requirement from testers from bug 33568 so I think we should keep it.

However I agree that we could display the buttons however.
Comment 5 Jonathan Druart 2024-04-22 12:13:30 UTC
We could have that instead:

container.find(".dt-info").remove();
container.find(".table_entries").remove();
container.find(".dataTables_filter").remove();
container.find(".dt_button_clear_filter").remove();
container.find(".bottom.pager").remove();

But then there is a CSS adjustment to provide, the "Columns" button is not on the right with the other 2 buttons.
Comment 6 Pedro Amorim 2024-04-22 15:59:30 UTC
Created attachment 165322 [details] [review]
Bug 36663: Adjust datatable button selector

This change makes the selector apply specifically to the 'clear filter' button, instead of whatever is the first button as 'clear filter' may or may not exist.
Comment 7 Pedro Amorim 2024-04-22 15:59:34 UTC
Created attachment 165323 [details] [review]
Bug 36663: Update alignment of datatable buttons

Pack items from the end
Comment 8 Pedro Amorim 2024-04-22 15:59:43 UTC
Created attachment 165324 [details] [review]
Bug 36663: Hide specific inner elements, not the whole top pager container

1- Enable StaffDetailItemSelection
2- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
3- Notice there are no table configuration options on the top right (Columns, Export, Configure).
4- Click the "Show filters" link, notice the table configuration options now show, as well as top and bottom pagers, column filter inputs and search input.
5- Disable StaffDetailItemSelection
6- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
7- Notice that the table configurations options are visible, as well as top and bottom pagers, and search input.
8- Click the "Show filters" link, notice it now only governs the column filter inputs, the other elements mentioned in step 7 are always visible.
9- Apply patches, run yarn css:build
10- Repeat 1 and 2.
11- Notice the table configuration options are shown on the top right, and no other table options exist.

Further testing:
Test clicking hide/show filters
Test with StaffDetailItemSelection enabled/disabled
Test other datatables in other pages
Comment 9 Lucas Gass 2024-04-22 16:04:36 UTC
Doesn't apply now.
Comment 10 Pedro Amorim 2024-04-22 16:13:57 UTC
(In reply to Lucas Gass from comment #9)
> Doesn't apply now.

Meant to obsolete the original patch but forgot to.
Comment 11 Lucas Gass 2024-04-22 16:29:14 UTC
Created attachment 165326 [details] [review]
Bug 36663: Adjust datatable button selector

This change makes the selector apply specifically to the 'clear filter' button, instead of whatever is the first button as 'clear filter' may or may not exist.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 12 Lucas Gass 2024-04-22 16:29:16 UTC
Created attachment 165327 [details] [review]
Bug 36663: Update alignment of datatable buttons

Pack items from the end

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 13 Lucas Gass 2024-04-22 16:29:19 UTC
Created attachment 165328 [details] [review]
Bug 36663: Hide specific inner elements, not the whole top pager container

1- Enable StaffDetailItemSelection
2- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
3- Notice there are no table configuration options on the top right (Columns, Export, Configure).
4- Click the "Show filters" link, notice the table configuration options now show, as well as top and bottom pagers, column filter inputs and search input.
5- Disable StaffDetailItemSelection
6- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
7- Notice that the table configurations options are visible, as well as top and bottom pagers, and search input.
8- Click the "Show filters" link, notice it now only governs the column filter inputs, the other elements mentioned in step 7 are always visible.
9- Apply patches, run yarn css:build
10- Repeat 1 and 2.
11- Notice the table configuration options are shown on the top right, and no other table options exist.

Further testing:
Test clicking hide/show filters
Test with StaffDetailItemSelection enabled/disabled
Test other datatables in other pages

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 14 Jonathan Druart 2024-04-23 07:35:19 UTC
Created attachment 165352 [details] [review]
Bug 36663: Adjust datatable button selector

This change makes the selector apply specifically to the 'clear filter' button, instead of whatever is the first button as 'clear filter' may or may not exist.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 15 Jonathan Druart 2024-04-23 07:35:22 UTC
Created attachment 165353 [details] [review]
Bug 36663: Update alignment of datatable buttons

Pack items from the end

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 16 Jonathan Druart 2024-04-23 07:35:25 UTC
Created attachment 165354 [details] [review]
Bug 36663: Hide specific inner elements, not the whole top pager container

1- Enable StaffDetailItemSelection
2- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
3- Notice there are no table configuration options on the top right (Columns, Export, Configure).
4- Click the "Show filters" link, notice the table configuration options now show, as well as top and bottom pagers, column filter inputs and search input.
5- Disable StaffDetailItemSelection
6- Visit a biblio page:
http://localhost:8081/cgi-bin/koha/catalogue/detail.pl?biblionumber=76
7- Notice that the table configurations options are visible, as well as top and bottom pagers, and search input.
8- Click the "Show filters" link, notice it now only governs the column filter inputs, the other elements mentioned in step 7 are always visible.
9- Apply patches, run yarn css:build
10- Repeat 1 and 2.
11- Notice the table configuration options are shown on the top right, and no other table options exist.

Further testing:
Test clicking hide/show filters
Test with StaffDetailItemSelection enabled/disabled
Test other datatables in other pages

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 17 Katrin Fischer 2024-04-29 07:44:14 UTC
Pushed for 24.05!

Well done everyone, thank you!