Bug 36559 - Transport cost matrix update helpers
Summary: Transport cost matrix update helpers
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Hold requests (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Lucas Gass
QA Contact: Testopia
URL:
Keywords: Academy
Depends on:
Blocks:
 
Reported: 2024-04-09 21:49 UTC by holly
Modified: 2024-05-26 19:00 UTC (History)
7 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
With a lot of columns and rows the transport cost matrix got hard to edit. This patch makes it so that the header column and row are fixed and will always remain visible while editing.
Version(s) released in:
24.05.00


Attachments
Bug 36559: Add sticky table headers to transport cost matrix (2.63 KB, patch)
2024-04-12 07:45 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 36559: (follow-up) Fix To/From z-index (1.68 KB, patch)
2024-04-18 20:50 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 36559: Add sticky table headers to transport cost matrix (2.68 KB, patch)
2024-04-19 13:50 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 36559: (follow-up) Fix To/From z-index (1.74 KB, patch)
2024-04-19 13:50 UTC, Brendan Lawlor
Details | Diff | Splinter Review
Bug 36559: (follow-up) Fix To/From z-index (1.60 KB, patch)
2024-04-23 13:42 UTC, Lucas Gass
Details | Diff | Splinter Review
Bug 36559: Add sticky table headers to transport cost matrix (2.74 KB, patch)
2024-04-23 14:01 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36559: (follow-up) Fix To/From z-index (1.67 KB, patch)
2024-04-23 14:01 UTC, Pedro Amorim
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description holly 2024-04-09 21:49:57 UTC
In the transport cost matrix, library name row and column titles are only visible in the browser window if the user is working in a part of the matrix fairly close to the top or left side of the matrix. For large consortia, and when there are many libraries in the system, the matrix is often too big to see this information. 

For ease of filling out the matrix, it would be nice if the user always had a way to see the library combination for the active cell. 
This could look a few ways, and I'm sure someone out here has additional ideas. 
1. Library names could be frozen and always visible
2. Library names could show when the user hovers over any given cell.
Comment 1 George Williams (NEKLS) 2024-04-10 14:02:31 UTC
+1  Good ideas
Comment 2 Lucas Gass 2024-04-12 07:45:20 UTC
Created attachment 164794 [details] [review]
Bug 36559: Add sticky table headers to transport cost matrix

To test:
1. APPLY patch and regenerate CSS. ( yarn build )
2. Have many, many branches. To test it is good to have more branches than in a standard k-t-d.
3. Go to Admin > Transport cost matrix
4. Scroll down and to the right, the table headers should stay visible.
5. Hover over any cell, a title should appear like 'Branch A / Branch B'
6. Test in Chrome and Firefox.

This uses position: sticky which has recently gained more widespread browser support:
https://caniuse.com/?search=sticky
Comment 3 Brendan Lawlor 2024-04-12 20:57:51 UTC
I tested this with 40 branches and it works well in both Chrome and Firefox. 

One small thing I noticed is that the first column table header From \ To does not stick in either vertical or horizontal scrolling directions.
Comment 4 Lucas Gass 2024-04-18 20:50:40 UTC
Created attachment 165145 [details] [review]
Bug 36559: (follow-up) Fix To/From z-index
Comment 5 Lucas Gass 2024-04-18 20:51:13 UTC
(In reply to Brendan Lawlor from comment #3)
> I tested this with 40 branches and it works well in both Chrome and Firefox. 
> 
> One small thing I noticed is that the first column table header From \ To
> does not stick in either vertical or horizontal scrolling directions.

Thanks Brendan! I provided a follow up to fix that.
Comment 6 Brendan Lawlor 2024-04-19 13:50:48 UTC
Created attachment 165202 [details] [review]
Bug 36559: Add sticky table headers to transport cost matrix

To test:
1. APPLY patch and regenerate CSS. ( yarn build )
2. Have many, many branches. To test it is good to have more branches than in a standard k-t-d.
3. Go to Admin > Transport cost matrix
4. Scroll down and to the right, the table headers should stay visible.
5. Hover over any cell, a title should appear like 'Branch A / Branch B'
6. Test in Chrome and Firefox.

This uses position: sticky which has recently gained more widespread browser support:
https://caniuse.com/?search=sticky

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 7 Brendan Lawlor 2024-04-19 13:50:50 UTC
Created attachment 165203 [details] [review]
Bug 36559: (follow-up) Fix To/From z-index

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 8 Pedro Amorim 2024-04-23 10:47:22 UTC
Hi guys, second patch is failing to apply for me:

Apply? [(y)es, (n)o, (i)nteractive] y
Applying: Bug 36559: Add sticky table headers to transport cost matrix
Applying: Bug 36559: (follow-up) Fix To/From z-index
error: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/css/src/staff-global.scss).
error: could not build fake ancestor
Patch failed at 0001 Bug 36559: (follow-up) Fix To/From z-index
hint: Use 'git am --show-current-patch=diff' to see the failed patch
When you have resolved this problem run "git bz apply --continue".
If you would prefer to skip this patch, instead run "git bz apply --skip".
To restore the original branch and stop patching run "git bz apply --abort".
Patch left in /tmp/Bug-36559-follow-up-Fix-ToFrom-z-index-cx2obgcd.patch
Comment 9 Lucas Gass 2024-04-23 13:42:16 UTC
Created attachment 165400 [details] [review]
Bug 36559: (follow-up) Fix To/From z-index

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Comment 10 Pedro Amorim 2024-04-23 14:01:15 UTC
Created attachment 165402 [details] [review]
Bug 36559: Add sticky table headers to transport cost matrix

To test:
1. APPLY patch and regenerate CSS. ( yarn build )
2. Have many, many branches. To test it is good to have more branches than in a standard k-t-d.
3. Go to Admin > Transport cost matrix
4. Scroll down and to the right, the table headers should stay visible.
5. Hover over any cell, a title should appear like 'Branch A / Branch B'
6. Test in Chrome and Firefox.

This uses position: sticky which has recently gained more widespread browser support:
https://caniuse.com/?search=sticky

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 11 Pedro Amorim 2024-04-23 14:01:19 UTC
Created attachment 165403 [details] [review]
Bug 36559: (follow-up) Fix To/From z-index

Signed-off-by: Brendan Lawlor <blawlor@clamsnet.org>
Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Comment 12 Pedro Amorim 2024-04-23 14:02:19 UTC
Working as described. Great improvement. QA script happy.
Used Nick's https://github.com/kidclamp/handy-koha-script/blob/main/randbranches.pl to generate a ton of branches to test this.
Comment 13 Katrin Fischer 2024-04-29 15:43:05 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 14 Fridolin Somers 2024-05-24 10:03:42 UTC
Not backported to 23.11.x