When previewing Z39.50 search results in the Cataloging module, the yellow highlighting only applies to white rows, grey rows. This highlighting is very helpful for staff to identify exactly which record they are previewing in the table.
Also true of Administration - Circulation and fine rules, should also be true of Administration - Item search fields, Mana report and subscription search results, and maybe others, since they all have the selector ".highlighted-row, .highlighted-row td" fighting for specificity with "tbody tr:nth-child(odd):not(.dtrg-group, .active, .ok) td:not(.bg-danger, .bg-warning, .bg-info, .bg-success, .bg-primary)" which is... rather specific.
Not (currently) item search fields, because bug 39477 keeps it from showing for any row, not just the grey rows.
And it's clownshoes all the way down. Circulation and fine rules doesn't set .highlighted-row on its <tr>, it sets it on every <td> in the <tr>, so not only does the tr:nth-child(odd):not() need to include .highlighted-row, the td:not() needs to as well. I was going to just write a patch and try to sell a test plan including only the uses I knew how to get to, but since those three are all broken in different ways, I think this needs someone who knows how to write a test plan that gets to mana-report-search-result.inc and mana-subscription-search-result.inc and subscription-detail.tt as well.
(In reply to Phil Ringnalda from comment #3) > And it's clownshoes all the way down. I guess that makes me the clown! Cool. Cool cool cool.
A surprising fact about clown shoes is that they are just normal shoes from the inside, so you don't necessarily know you're wearing them until you get up and try to walk around. Or so I've heard. In a previous project where we used the term constantly, I thought about buying a pair for a profile picture, but another surprising fact about them is that they are jaw-droppingly expensive.
I'll be more direct: Calling someone else's code "clown shoes" is rude and uncalled for.
Please accept my apology for the unwarranted and unintended insult. While at Mozilla it's a term of art for a particular sort of cascading breakage, I should have known both before and immediately afterward that since nobody involved in Koha uses it, it wouldn't be seen that way.
Not blocking on testing Mana. The same patch does fix things for it, but testing it requires too many gyrations. Mana uses it to highlight entities with between 5 and 10 comments. For reports, comments aren't actually implemented, unless you submit them directly through the API. mana-kb currently has comments on 4 of its 1330 reports, none with 5-10 comments. For serials, there are comments on 26 of the 11810 subscription entities, 2 of which have between 5 and 10 comments (all test or joke comments), but because the comments column isn't filled by Serials - Search on Mana, actually seeing them requires triggering an apparently intermittent bug where you create a new subscription which will find a match on Mana, on the Frequency page click the Show Mana results link, and then wait for the one matching result displayed in the popup dialog to be replaced by every subscription on Mana, giving you a table where you can sort by the comments column.
Created attachment 180890 [details] [review] Bug 39464: Grey rows in tables not highlighting in yellow when they should Because the CSS rule for turning odd-numbered rows grey is highly-specific (tbody tr:nth-child(2n+1):not(.dtrg-group, .active, .ok) td:not(.bg-danger, .bg-warning, .bg-info, .bg-success, .bg-primary)), it overrides the .highlighted-row, .highlighted-row td rule that some tables use to turn the background of a currently-selected row yellow, so highlighted-row needs to be added to the lists of not(). Test plan: 1. Without the patch, Cataloging - New from Z39.50/SRU, perform a search like Author smith which will return at least two results. 2. On an even-numbered row with a white background, click MARC and note that the row is given a yellow background (either by increasing the size of the popup to peer around the preview, or by closing the preview, since the highlight persists). 3. On an odd-numbered row with a grey background, click MARC and note that the row isn't given a yellow background 4. Administration - Circulation and fine rules, if you don't already have at least two rules add one by just changing the Patron category in the edit row and Save 5. On a row with a white background, click Edit and note that the background for that row is yellow 6. On a row with a grey background, click Edit and note that the background remains grey, not yellow 7. Apply patch, in ktd --shell yarn build (or in a sandbox Actions - Build CSS and JS), clear browser cache or shift+Reload the page 8. Repeat steps 1-6, but this time note that you get the same yellow highlighted background for both odd and even rows.
Created attachment 180895 [details] [review] Bug 39464: Grey rows in tables not highlighting in yellow when they should Because the CSS rule for turning odd-numbered rows grey is highly-specific (tbody tr:nth-child(2n+1):not(.dtrg-group, .active, .ok) td:not(.bg-danger, .bg-warning, .bg-info, .bg-success, .bg-primary)), it overrides the .highlighted-row, .highlighted-row td rule that some tables use to turn the background of a currently-selected row yellow, so highlighted-row needs to be added to the lists of not(). Test plan: 1. Without the patch, Cataloging - New from Z39.50/SRU, perform a search like Author smith which will return at least two results. 2. On an even-numbered row with a white background, click MARC and note that the row is given a yellow background (either by increasing the size of the popup to peer around the preview, or by closing the preview, since the highlight persists). 3. On an odd-numbered row with a grey background, click MARC and note that the row isn't given a yellow background 4. Administration - Circulation and fine rules, if you don't already have at least two rules add one by just changing the Patron category in the edit row and Save 5. On a row with a white background, click Edit and note that the background for that row is yellow 6. On a row with a grey background, click Edit and note that the background remains grey, not yellow 7. Apply patch, in ktd --shell yarn build (or in a sandbox Actions - Build CSS and JS), clear browser cache or shift+Reload the page 8. Repeat steps 1-6, but this time note that you get the same yellow highlighted background for both odd and even rows. Signed-off-by: Magnus Enger <magnus@libriotech.no>
Created attachment 181219 [details] [review] Bug 39464: Grey rows in tables not highlighting in yellow when they should Because the CSS rule for turning odd-numbered rows grey is highly-specific (tbody tr:nth-child(2n+1):not(.dtrg-group, .active, .ok) td:not(.bg-danger, .bg-warning, .bg-info, .bg-success, .bg-primary)), it overrides the .highlighted-row, .highlighted-row td rule that some tables use to turn the background of a currently-selected row yellow, so highlighted-row needs to be added to the lists of not(). Test plan: 1. Without the patch, Cataloging - New from Z39.50/SRU, perform a search like Author smith which will return at least two results. 2. On an even-numbered row with a white background, click MARC and note that the row is given a yellow background (either by increasing the size of the popup to peer around the preview, or by closing the preview, since the highlight persists). 3. On an odd-numbered row with a grey background, click MARC and note that the row isn't given a yellow background 4. Administration - Circulation and fine rules, if you don't already have at least two rules add one by just changing the Patron category in the edit row and Save 5. On a row with a white background, click Edit and note that the background for that row is yellow 6. On a row with a grey background, click Edit and note that the background remains grey, not yellow 7. Apply patch, in ktd --shell yarn build (or in a sandbox Actions - Build CSS and JS), clear browser cache or shift+Reload the page 8. Repeat steps 1-6, but this time note that you get the same yellow highlighted background for both odd and even rows. Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: David Nind <david@davidnind.com>
Adding my sign-off - maybe Magnus's can count as QA?
Created attachment 181689 [details] [review] Bug 39464: Grey rows in tables not highlighting in yellow when they should Because the CSS rule for turning odd-numbered rows grey is highly-specific (tbody tr:nth-child(2n+1):not(.dtrg-group, .active, .ok) td:not(.bg-danger, .bg-warning, .bg-info, .bg-success, .bg-primary)), it overrides the .highlighted-row, .highlighted-row td rule that some tables use to turn the background of a currently-selected row yellow, so highlighted-row needs to be added to the lists of not(). Test plan: 1. Without the patch, Cataloging - New from Z39.50/SRU, perform a search like Author smith which will return at least two results. 2. On an even-numbered row with a white background, click MARC and note that the row is given a yellow background (either by increasing the size of the popup to peer around the preview, or by closing the preview, since the highlight persists). 3. On an odd-numbered row with a grey background, click MARC and note that the row isn't given a yellow background 4. Administration - Circulation and fine rules, if you don't already have at least two rules add one by just changing the Patron category in the edit row and Save 5. On a row with a white background, click Edit and note that the background for that row is yellow 6. On a row with a grey background, click Edit and note that the background remains grey, not yellow 7. Apply patch, in ktd --shell yarn build (or in a sandbox Actions - Build CSS and JS), clear browser cache or shift+Reload the page 8. Repeat steps 1-6, but this time note that you get the same yellow highlighted background for both odd and even rows. Signed-off-by: Magnus Enger <magnus@libriotech.no> Signed-off-by: David Nind <david@davidnind.com> Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Pushed for 25.05! Well done everyone, thank you!
Could this be backported into 24.11?