Bug 35600

Summary: Prevent checkouts table to flicker
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: CirculationAssignee: Jonathan Druart <jonathan.druart>
Status: Pushed to oldstable --- QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: fridolin.somers, gmcharlt, katrin.fischer, kyle.m.hall, lucas, martin.renvoize, victor
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=35506
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.05.00,23.11.02,23.05.08
Attachments: Bug 35600: Prevent checkouts table to flicker
Bug 35600: Prevent checkouts table to flicker
Bug 35600: Prevent checkouts table to flicker
Bug 35600: Prevent checkouts table to flicker

Description Jonathan Druart 2023-12-19 10:44:51 UTC
The checkouts table is displayed in the DOM then hidden in JS, then we show it if the cookie is set.

We should rethink the logic...
Comment 1 Jonathan Druart 2023-12-19 10:47:39 UTC
Created attachment 159994 [details] [review]
Bug 35600: Prevent checkouts table to flicker

The checkouts table is displayed in the DOM then hidden in JS, then we show it if the cookie is set.

This patch makes the table hidden by default, and show it if/when needed

Test plan:
Check an item out, see the checkouts list view
Play with "Always show checkouts automatically", refresh the page
=> UI should behave better than before this patch
Comment 2 Katrin Fischer 2023-12-19 12:53:01 UTC
We might want to test if LoadCheckoutsTableDelay system preference also still works as expected.
Comment 3 Lucas Gass 2023-12-19 15:29:15 UTC
(In reply to Katrin Fischer from comment #2)
> We might want to test if LoadCheckoutsTableDelay system preference also
> still works as expected.

It does still work.
Comment 4 Lucas Gass 2023-12-19 15:32:43 UTC
Created attachment 160023 [details] [review]
Bug 35600: Prevent checkouts table to flicker

The checkouts table is displayed in the DOM then hidden in JS, then we show it if the cookie is set.

This patch makes the table hidden by default, and show it if/when needed

Test plan:
Check an item out, see the checkouts list view
Play with "Always show checkouts automatically", refresh the page
=> UI should behave better than before this patch

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Victor Grousset/tuxayo 2023-12-19 20:28:34 UTC
Created attachment 160085 [details] [review]
Bug 35600: Prevent checkouts table to flicker

The checkouts table is displayed in the DOM then hidden in JS, then we show it if the cookie is set.

This patch makes the table hidden by default, and show it if/when needed

Test plan:
Check an item out, see the checkouts list view
Play with "Always show checkouts automatically", refresh the page
=> UI should behave better than before this patch

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Comment 6 Victor Grousset/tuxayo 2023-12-19 20:30:58 UTC
That flickering was bad thanks for the simple fix :D

Works, makes sense, QA script happy, code looks good, passing QA :)
Comment 7 Martin Renvoize 2023-12-20 10:37:10 UTC
Created attachment 160102 [details] [review]
Bug 35600: Prevent checkouts table to flicker

The checkouts table is displayed in the DOM then hidden in JS, then we show it if the cookie is set.

This patch makes the table hidden by default, and show it if/when needed

Test plan:
Check an item out, see the checkouts list view
Play with "Always show checkouts automatically", refresh the page
=> UI should behave better than before this patch

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 8 Martin Renvoize 2023-12-20 10:37:30 UTC
This is much cleaner, no regressions found.

Passing QA
Comment 9 Katrin Fischer 2023-12-20 14:15:15 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 10 Fridolin Somers 2024-01-03 15:27:51 UTC
Pushed to 23.11.x for 23.11.02
Comment 11 Lucas Gass 2024-01-04 20:52:47 UTC
Backported to 23.05.x for upcoming 23.05.08