Bug 37740 - Saved reports GROUP tabs don't show the proper panel
Summary: Saved reports GROUP tabs don't show the proper panel
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Reports (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Lucas Gass (lukeg)
URL:
Keywords:
Depends on: 35402
Blocks:
  Show dependency treegraph
 
Reported: 2024-08-26 22:10 UTC by Lucas Gass (lukeg)
Modified: 2024-11-15 20:32 UTC (History)
1 user (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.11.00
Circulation function:


Attachments
Bug 37740: Fix saved SQL reports tab switching (1.82 KB, patch)
2024-08-28 18:43 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37740: Fix saved SQL reports tab switching (1.89 KB, patch)
2024-08-29 14:16 UTC, Chloe Zermatten
Details | Diff | Splinter Review
Bug 37740: Fix saved SQL reports tab switching (1.94 KB, patch)
2024-08-29 19:14 UTC, Lucas Gass (lukeg)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Lucas Gass (lukeg) 2024-08-26 22:10:45 UTC
TO recreate:
1. Have some reports and report groups.
2. GO to Reports > Used Saved
3. The 'All' tab properly shows reports.
4. All other tabs have no reports listed. It doesn't appear like the panels are being built. 

Looks to be caused by Bug 35402.
Comment 1 Lucas Gass (lukeg) 2024-08-27 21:32:30 UTC
I'm not sure what got lost. It seems like there was only a single panel being built 'reports_panel' ( [% WRAPPER tab_panels %] ).

However, when building the nav-links all the groups are looped through ( [% FOREACH group IN groups_with_subgroups %] ). ( [% WRAPPER tabs_nav %] )

We cannot build many tabs and only a single panel. It creates bad HTML.
Comment 2 Owen Leonard 2024-08-28 18:43:55 UTC
Created attachment 170838 [details] [review]
Bug 37740: Fix saved SQL reports tab switching

The tabs on the saved SQL report page are not really full tabs, they're
just styled that way. There is only one tab "panel," and clicking each
tab triggers a DataTable filter so that the tab only shows the relevant
data.

The problem with this setup is that when Bootstrap tries to "switch"
tabs, it wants to hide the initial tab and then show the new one. There
is no "new" one here.

The attached patch solves this problem by adding a CSS rule to
guided_reports_start.tt with higher specificity than our global CSS
making the relevant tab pane visible at all times.

To test, apply the patch and go to Reports -> Use saved.

- If necessary, create multiple SQL reports and assign them to different
  report groups (Accounts, Acquisitions, Catalog, etc.).
- Test that tab switching works:
  - The tab should be style as "active" after you click it.
  - The table of reports should be filtered to include only reports in
    the relevant report group.
Comment 3 Chloe Zermatten 2024-08-29 14:16:42 UTC
Created attachment 170871 [details] [review]
Bug 37740: Fix saved SQL reports tab switching

The tabs on the saved SQL report page are not really full tabs, they're
just styled that way. There is only one tab "panel," and clicking each
tab triggers a DataTable filter so that the tab only shows the relevant
data.

The problem with this setup is that when Bootstrap tries to "switch"
tabs, it wants to hide the initial tab and then show the new one. There
is no "new" one here.

The attached patch solves this problem by adding a CSS rule to
guided_reports_start.tt with higher specificity than our global CSS
making the relevant tab pane visible at all times.

To test, apply the patch and go to Reports -> Use saved.

- If necessary, create multiple SQL reports and assign them to different
  report groups (Accounts, Acquisitions, Catalog, etc.).
- Test that tab switching works:
  - The tab should be style as "active" after you click it.
  - The table of reports should be filtered to include only reports in
    the relevant report group.

Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com>
Comment 4 Lucas Gass (lukeg) 2024-08-29 19:14:03 UTC
Created attachment 170879 [details] [review]
Bug 37740: Fix saved SQL reports tab switching

The tabs on the saved SQL report page are not really full tabs, they're
just styled that way. There is only one tab "panel," and clicking each
tab triggers a DataTable filter so that the tab only shows the relevant
data.

The problem with this setup is that when Bootstrap tries to "switch"
tabs, it wants to hide the initial tab and then show the new one. There
is no "new" one here.

The attached patch solves this problem by adding a CSS rule to
guided_reports_start.tt with higher specificity than our global CSS
making the relevant tab pane visible at all times.

To test, apply the patch and go to Reports -> Use saved.

- If necessary, create multiple SQL reports and assign them to different
  report groups (Accounts, Acquisitions, Catalog, etc.).
- Test that tab switching works:
  - The tab should be style as "active" after you click it.
  - The table of reports should be filtered to include only reports in
    the relevant report group.

Signed-off-by: Chloe Zermatten <chloe.zermatten@ptfs-europe.com>
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 5 Katrin Fischer 2024-08-30 10:46:38 UTC
Pushed for 24.11!

Well done everyone, thank you!