Bug 29195 - Highlighting broken on odd rows in circ-patron-search-results
Summary: Highlighting broken on odd rows in circ-patron-search-results
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Staff interface (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-08 13:28 UTC by Nick Clemens (kidclamp)
Modified: 2022-06-06 20:25 UTC (History)
6 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:
21.11.00,21.05.05,20.11.12
Circulation function:


Attachments
Bug 29195: Fix highlighting on odd rows in circ-patron-search-results (1.64 KB, patch)
2021-11-05 12:22 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 29195: Fix highlighting on odd rows in circ-patron-search-results (1.70 KB, patch)
2021-11-05 12:44 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Nick Clemens (kidclamp) 2021-10-08 13:28:17 UTC
To recreate:
1 - Browse to a record
2 - Click 'Holds' tab
3 - Search for a patron to get multiple results 'a' works
4 - Mouse over the different rows
5 - Note even rows are highlighted when hovered, but odd rows remain dark
Comment 1 Jonathan Druart 2021-10-19 08:32:08 UTC
The rule is overwritten in DT.

Owen, is there a better way than using !important here?

diff --git a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss
index 44e2b32ae4e..260a96b9058 100644
--- a/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss
+++ b/koha-tmpl/intranet-tmpl/prog/css/src/_tables.scss
@@ -297,7 +297,7 @@ tr {
     tr {
         &:hover {
             td {
-                background-color: #FFFF99;
+                background-color: #FFFF99 !important;
             }
         }
     }

This works.
Comment 2 Owen Leonard 2021-10-26 10:46:16 UTC
I was hoping this had been made obsolete by Bug 15812 but these results might still shown during the process of placing a hold.
Comment 3 Jonathan Druart 2021-11-04 13:43:04 UTC
Do we go with the '!important'?
Comment 4 Owen Leonard 2021-11-05 12:22:54 UTC
Created attachment 127361 [details] [review]
Bug 29195: Fix highlighting on odd rows in circ-patron-search-results

This patch adds "!important" to the CSS rule governing the background
color of table cells when hovered. It only applies to tables with the
"selections-table" class.

Although "!important" is not usually recommended, in this case the
appliation is narrow enough that I think it outweighs the complicated
selector that would be required to make it work otherwise.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Locate a record in the catalog and being the process of placing a
  hold.
- When you're asked to enter a card number or search by name, search
  using a name which will return multiple results.
- In the table of results, hovering the mouse over the table should
  highlight the row in yellow.
- Perform the same test when searching for a club by name.
Comment 5 Nick Clemens (kidclamp) 2021-11-05 12:44:39 UTC
Created attachment 127362 [details] [review]
Bug 29195: Fix highlighting on odd rows in circ-patron-search-results

This patch adds "!important" to the CSS rule governing the background
color of table cells when hovered. It only applies to tables with the
"selections-table" class.

Although "!important" is not usually recommended, in this case the
appliation is narrow enough that I think it outweighs the complicated
selector that would be required to make it work otherwise.

To test, apply the patch and rebuild the staff interface CSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

- Locate a record in the catalog and being the process of placing a
  hold.
- When you're asked to enter a card number or search by name, search
  using a name which will return multiple results.
- In the table of results, hovering the mouse over the table should
  highlight the row in yellow.
- Perform the same test when searching for a club by name.

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 6 Jonathan Druart 2021-11-08 11:19:37 UTC
Pushed to master for 21.11, thanks to everybody involved!
Comment 7 Kyle M Hall (khall) 2021-11-11 12:36:40 UTC
Pushed to 21.05.x for 21.05.05
Comment 8 Fridolin Somers 2021-11-12 23:25:10 UTC
Pushed to 20.11.x for 20.11.12
Comment 9 Victor Grousset/tuxayo 2021-11-16 22:35:01 UTC
Not backported to oldoldstable (20.05.x). Feel free to ask if it's needed.