Summary: | Make borrower category code accessible in all pages of the OPAC | ||
---|---|---|---|
Product: | Koha | Reporter: | Rickard Lindfors <rickard.lindfors> |
Component: | OPAC | Assignee: | Martin Renvoize (ashimema) <martin.renvoize> |
Status: | CLOSED FIXED | QA Contact: | Victor Grousset/tuxayo <victor> |
Severity: | enhancement | ||
Priority: | P5 - low | CC: | andrew, caroline.cyr-la-rose, dcook, fridolin.somers, jonathan.druart, martin.renvoize, victor, wainuiwitikapark |
Version: | unspecified | Keywords: | Academy |
Hardware: | All | ||
OS: | All | ||
Change sponsored?: | --- | Patch complexity: | Trivial patch |
Documentation contact: | Documentation submission: | ||
Text to go in the release notes: | Version(s) released in: |
21.05.00,20.11.02,20.05.16
|
|
Circulation function: | |||
Attachments: |
Bug 26847: Add unit test for categorycode in masthead
Bug 26847: Add data-categorycode to opac pages Bug 26847: Add unit test for categorycode in masthead Bug 26847: Add data-categorycode to opac pages Bug 26847: Add UI test for categorycode in masthead Bug 26847: Add data-categorycode to opac pages Bug 26847: (follow-up) fix get_attribute() call |
Description
Rickard Lindfors
2020-10-28 14:33:55 UTC
Created attachment 113003 [details] [review] Bug 26847: Add unit test for categorycode in masthead This unit test adds a regression test for the addition of categorycode into the masthead of the staff client. Created attachment 113004 [details] [review] Bug 26847: Add data-categorycode to opac pages This patch adds the data-categorycode attribute to the loggedinuser span for all pages in the opac. Test plan 1/ Apply first patch, varify unit test fails. 2/ Apply second patch, varify unit test now passes. 3/ Navigate to opac and login 4/ Varify that data-categorycode is present in the loggedinuser span in the client. Created attachment 113012 [details] [review] Bug 26847: Add unit test for categorycode in masthead This unit test adds a regression test for the addition of categorycode into the masthead of the staff client. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 113013 [details] [review] Bug 26847: Add data-categorycode to opac pages This patch adds the data-categorycode attribute to the loggedinuser span for all pages in the opac. Test plan 1/ Apply first patch, varify unit test fails. 2/ Apply second patch, varify unit test now passes. 3/ Navigate to opac and login 4/ Varify that data-categorycode is present in the loggedinuser span in the client. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Created attachment 114726 [details] [review] Bug 26847: Add UI test for categorycode in masthead This test adds a regression test for the addition of categorycode into the masthead of the staff client. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Created attachment 114727 [details] [review] Bug 26847: Add data-categorycode to opac pages This patch adds the data-categorycode attribute to the loggedinuser span for all pages in the opac. Test plan 1/ Apply first patch, varify unit test fails. 2/ Apply second patch, varify unit test now passes. 3/ Navigate to opac and login 4/ Varify that data-categorycode is present in the loggedinuser span in the client. Signed-off-by: Lucas Gass <lucas@bywatersolutions.com> Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net> Comment on attachment 113012 [details] [review] Bug 26847: Add unit test for categorycode in masthead Fixed test terminology in the commit message "unit test" => "UI test" Another idea is to provide a Javascript object that is accessible by Javascript. That could be a more extensible way of getting this functionality. (In reply to David Cook from comment #8) > Another idea is to provide a Javascript object that is accessible by > Javascript. > > That could be a more extensible way of getting this functionality. But it would make it harder to tie CSS to it. I think having it in the HTML works well for both. Pushed to master for 21.05, thanks to everybody involved! (In reply to Katrin Fischer from comment #9) > (In reply to David Cook from comment #8) > > Another idea is to provide a Javascript object that is accessible by > > Javascript. > > > > That could be a more extensible way of getting this functionality. > > But it would make it harder to tie CSS to it. I think having it in the HTML > works well for both. Looking at the previous comments, no one mentioned CSS; they only mentioned Javascript. But I think that you make a really good point. It could be interesting to use CSS tied to borrower category. Created attachment 114872 [details] [review] Bug 26847: (follow-up) fix get_attribute() call Since the upgrade to Selenium 3 in bug 27055, an additional parameter is required for get_attribute() to actually work. https://metacpan.org/pod/Selenium::Remote::WebElement#get_attribute Last patch pushed to master for 21.05.00 Small yet useful enhancement, I choose to backport. Pushed to 20.11.x for 20.11.02 Enhancement, not backported to 20.05. Please ask if needed Yes, please backport to 20.05 :) Hi Andrew! Can you please backport to 20.05? Thanks! Victor, can you have a look at backporting these patches into 20.05 please? Backported: Pushed to 20.05.x branch for 20.05.16 Thanks Victor! Should this be backported to 19.11.x for 19.11.22? the request was only for 20.05.x severity is not >= to major so you don't have to try to backport But it's your call to try to backport some things anyway if they are low risk. I tend to do that for accessibility and translatability. Not backported to 19.11.x |