Bug 31338

Summary: Show in advanced search when IncludeSeeFromInSearches is used
Product: Koha Reporter: Fridolin Somers <fridolin.somers>
Component: SearchingAssignee: Fridolin Somers <fridolin.somers>
Status: Needs documenting --- QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: barbara.johnson, david, lucas, tomascohen
Version: master   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
When `IncludeSeeFromInSearches` is activated, there will be a note below the first search form on the advanced search in staff interface and OPAC.
Version(s) released in:
23.05.00,22.11.03
Bug Depends on:    
Bug Blocks: 33770    
Attachments: Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used
Screenshot with patch
Bug 31338: (follow-up) Use fa-info-circle icon
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used
Bug 31338: (follow-up) Use fa-info-circle icon
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used
Screenshot of OPAC with patch
Bug 31338: (follow-up) add special class and add also to OPAC
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used
Bug 31338: (follow-up) add special class and add also to OPAC
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used
Bug 31338: (follow-up) add special class and add also to OPAC
Bug 31338: (follow-up) add special class and add also to OPAC
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used
Bug 31338: (follow-up) add special class and add also to OPAC

Description Fridolin Somers 2022-08-10 20:48:30 UTC
System preference IncludeSeeFromInSearches has an impact on search results.
Some matches may not contain the search terms.
Would be useful to show a tip text in advanced search when this is enabled.
Comment 1 Fridolin Somers 2022-08-10 20:59:19 UTC
Created attachment 139008 [details] [review]
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used

Test plan
1) Apply patch
2) Set system preference IncludeSeeFromInSearches to "Include"
3) Go to staff interface advanced search
4) Check you see tip text in "Search for"
5) Set system preference IncludeSeeFromInSearches to "Don't include"
6) Go to staff interface advanced search
47) Check you don't see tip text in "Search for"
Comment 2 Fridolin Somers 2022-08-10 21:00:52 UTC
Created attachment 139009 [details]
Screenshot with patch
Comment 3 Fridolin Somers 2022-08-10 21:01:27 UTC
If this patch is OK I will create one for OPAC
Comment 4 David Nind 2022-09-18 22:13:52 UTC
I've tested and it looks OK to me.
Comment 5 Fridolin Somers 2022-09-20 09:50:46 UTC
Thanks a lot for testing.

This information can be very useful because some search results may not contain the search terms.
Comment 6 Owen Leonard 2022-09-21 21:30:56 UTC
What do you think about using the fa-info-circle icon instead?
Comment 7 Fridolin Somers 2022-09-23 06:57:32 UTC
(In reply to Owen Leonard from comment #6)
> What do you think about using the fa-info-circle icon instead?

Sure, its even better
Comment 8 Fridolin Somers 2022-09-23 07:04:28 UTC
Created attachment 140882 [details] [review]
Bug 31338: (follow-up) Use fa-info-circle icon
Comment 9 Fridolin Somers 2022-09-23 07:05:44 UTC
(In reply to Fridolin Somers from comment #7)
> (In reply to Owen Leonard from comment #6)
> > What do you think about using the fa-info-circle icon instead?
> 
> Sure, its even better

This icon is already used in several places.
Comment 10 Owen Leonard 2022-09-23 13:50:25 UTC
Created attachment 140910 [details] [review]
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used

Test plan
1) Apply patch
2) Set system preference IncludeSeeFromInSearches to "Include"
3) Go to staff interface advanced search
4) Check you see tip text in "Search for"
5) Set system preference IncludeSeeFromInSearches to "Don't include"
6) Go to staff interface advanced search
47) Check you don't see tip text in "Search for"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 11 Owen Leonard 2022-09-23 13:50:29 UTC
Created attachment 140911 [details] [review]
Bug 31338: (follow-up) Use fa-info-circle icon

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 12 Lucas Gass 2022-09-23 14:15:11 UTC
Maybe a bit nitpicky but my color contrast checker tells me this text on the ( #F4F8F9 ) does not pass WCAG AA standards. 

Can we have a bit darker text color?
Comment 13 Fridolin Somers 2022-09-26 19:44:47 UTC
(In reply to Lucas Gass from comment #12)
> Maybe a bit nitpicky but my color contrast checker tells me this text on the
> ( #F4F8F9 ) does not pass WCAG AA standards. 
> 
> Can we have a bit darker text color?

Ah sure.
I found there is class 'tip' with grey #888 and 'hint' with darker grey #666.
Should I use 'hint' ?
Comment 14 Lucas Gass 2022-09-26 20:09:58 UTC
(In reply to Fridolin Somers from comment #13)
> (In reply to Lucas Gass from comment #12)
> > Maybe a bit nitpicky but my color contrast checker tells me this text on the
> > ( #F4F8F9 ) does not pass WCAG AA standards. 
> > 
> > Can we have a bit darker text color?
> 
> Ah sure.
> I found there is class 'tip' with grey #888 and 'hint' with darker grey #666.
> Should I use 'hint' ?

Yes, if we can use #666 as the text color it will pass accessibility checks.
Comment 15 Fridolin Somers 2022-09-26 20:23:41 UTC
Created attachment 141008 [details] [review]
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used

Test plan :
1) Apply patch
2) Set system preference IncludeSeeFromInSearches to "Include"
3) Go to staff interface advanced search
4) Check you see tip text in "Search for"
5) Set system preference IncludeSeeFromInSearches to "Don't include"
6) Go to staff interface advanced search
7) Check you don't see tip text in "Search for"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 16 Fridolin Somers 2022-09-26 20:25:30 UTC
I've changed for 'hint' and squashed the patches.

Looks like 'hint' is way more used that 'tip' (mainly used for header search boxes).
Maybe we should replace 'tip' with 'hint' to have only one class for this usage.
Comment 17 Lucas Gass 2022-09-26 20:51:02 UTC
Created attachment 141010 [details] [review]
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used

Test plan :
1) Apply patch
2) Set system preference IncludeSeeFromInSearches to "Include"
3) Go to staff interface advanced search
4) Check you see tip text in "Search for"
5) Set system preference IncludeSeeFromInSearches to "Don't include"
6) Go to staff interface advanced search
7) Check you don't see tip text in "Search for"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
Comment 18 Lucas Gass 2022-09-26 20:54:05 UTC
(In reply to Fridolin Somers from comment #16)
> I've changed for 'hint' and squashed the patches.
> 
> Looks like 'hint' is way more used that 'tip' (mainly used for header search
> boxes).
> Maybe we should replace 'tip' with 'hint' to have only one class for this
> usage.

It would be good to standardize the usage of these components, IMO.
Comment 19 Fridolin Somers 2022-10-01 04:36:22 UTC
I created Bug 31667
Comment 20 Fridolin Somers 2022-10-01 04:52:47 UTC
Created attachment 141177 [details]
Screenshot of OPAC with patch
Comment 21 Fridolin Somers 2022-10-01 04:53:22 UTC
I almost fergot to add also to OPAC
Comment 22 Fridolin Somers 2022-10-01 04:56:00 UTC
Created attachment 141178 [details] [review]
Bug 31338: (follow-up) add special class and add also to OPAC

In order to easily hide this new text, this patch adds the class "included-see-from-headings-info".

Also uses <div> instead of <p>.

And adds the same feature to OPAC.
Comment 23 PTFS Europe Sandboxes 2022-10-05 19:33:17 UTC
Created attachment 141395 [details] [review]
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used

Test plan :
1) Apply patch
2) Set system preference IncludeSeeFromInSearches to "Include"
3) Go to staff interface advanced search
4) Check you see tip text in "Search for"
5) Set system preference IncludeSeeFromInSearches to "Don't include"
6) Go to staff interface advanced search
7) Check you don't see tip text in "Search for"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 24 PTFS Europe Sandboxes 2022-10-05 19:33:21 UTC
Created attachment 141396 [details] [review]
Bug 31338: (follow-up) add special class and add also to OPAC

In order to easily hide this new text, this patch adds the class "included-see-from-headings-info".

Also uses <div> instead of <p>.

And adds the same feature to OPAC.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>
Comment 25 Barbara Johnson 2022-10-05 19:34:17 UTC
This worked in both the staff interface and the OPAC.
Comment 26 Katrin Fischer 2022-10-07 21:44:52 UTC
This works well and can be hidden easily. I am still a bit worried that patrons will have no idea how authorities work and not understand what we are talking about here :)

See from (non-preferred form) headings are included 

I think a normal user doesn't even now what a heading is? Maybe we could discuss to change it up later to be a little less librarianese? Maybe talking about alternative spellings... synonyms or such?
Comment 27 Katrin Fischer 2022-10-07 21:46:29 UTC
Created attachment 141530 [details] [review]
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used

Test plan :
1) Apply patch
2) Set system preference IncludeSeeFromInSearches to "Include"
3) Go to staff interface advanced search
4) Check you see tip text in "Search for"
5) Set system preference IncludeSeeFromInSearches to "Don't include"
6) Go to staff interface advanced search
7) Check you don't see tip text in "Search for"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 28 Katrin Fischer 2022-10-07 21:46:34 UTC
Created attachment 141531 [details] [review]
Bug 31338: (follow-up) add special class and add also to OPAC

In order to easily hide this new text, this patch adds the class "included-see-from-headings-info".

Also uses <div> instead of <p>.

And adds the same feature to OPAC.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 29 Tomás Cohen Arazi 2022-10-24 20:14:49 UTC
Please rebase.
Comment 30 Fridolin Somers 2022-12-13 07:09:10 UTC
Created attachment 144547 [details] [review]
Bug 31338: (follow-up) add special class and add also to OPAC

In order to easily hide this new text, this patch adds the class "included-see-from-headings-info".

Also uses <div> instead of <p>.

And adds the same feature to OPAC.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 31 Fridolin Somers 2022-12-13 07:09:33 UTC
Created attachment 144548 [details] [review]
Bug 31338: Show in advanced search when IncludeSeeFromInSearches is used

Test plan :
1) Apply patch
2) Set system preference IncludeSeeFromInSearches to "Include"
3) Go to staff interface advanced search
4) Check you see tip text in "Search for"
5) Set system preference IncludeSeeFromInSearches to "Don't include"
6) Go to staff interface advanced search
7) Check you don't see tip text in "Search for"

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 32 Fridolin Somers 2022-12-13 07:09:51 UTC
Created attachment 144549 [details] [review]
Bug 31338: (follow-up) add special class and add also to OPAC

In order to easily hide this new text, this patch adds the class "included-see-from-headings-info".

Also uses <div> instead of <p>.

And adds the same feature to OPAC.

Signed-off-by: Barbara Johnson <barbara.johnson@bedfordtx.gov>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 33 Fridolin Somers 2022-12-13 07:10:48 UTC
(In reply to Tomás Cohen Arazi from comment #29)
> Please rebase.

Easy rebase, I've set back to PQA
Comment 34 Tomás Cohen Arazi 2023-02-09 13:01:28 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 35 Jacob O'Mara 2023-02-13 09:45:56 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.
Comment 36 Lucas Gass 2023-02-15 22:06:25 UTC
Enhancement will not be backported to 22.05.x.