Bug 31917

Summary: Headings don't seem quite right for system preference search
Product: Koha Reporter: Martin Renvoize <martin.renvoize>
Component: Staff interfaceAssignee: Martin Renvoize <martin.renvoize>
Status: CLOSED FIXED QA Contact: Katrin Fischer <katrin.fischer>
Severity: enhancement    
Priority: P5 - low CC: david, gmcharlt, lucas
Version: Main   
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:
22.11.00
Bug Depends on: 31886    
Bug Blocks:    
Attachments: Bug 31917: Headings fix for preferences search
Bug 31917: Headings fix for preferences search
Bug 31917: Headings fix for preferences search
Bug 31917: Headings fix for preferences search

Description Martin Renvoize 2022-10-21 14:58:22 UTC
When doing a system preference search we end up with two H2 headings directly after each other.. it doesn't feel quite right.
Comment 1 Martin Renvoize 2022-10-21 15:09:41 UTC Comment hidden (obsolete)
Comment 2 David Nind 2022-10-23 23:37:10 UTC
Created attachment 142472 [details] [review]
Bug 31917: Headings fix for preferences search

This patch re-arranges the logic for displaying the search term when
executing a system preference search.

Test plan
1) Without the patch, search for something that will get no results
   'boing' and note how it looks
2) Without the patch, search for something that gets some results
   'block' and note how it looks
3) Apply the patch
4) Repeat your searches and comment on whether the look is better of
   worse ;P

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2022-10-23 23:38:12 UTC
+1 - looks better
Comment 4 Katrin Fischer 2022-10-24 15:41:41 UTC
I am not sure about this one.

It removes one h1 and adds 3 new h1... but apart from this, we are currently not consistent:

* Catalog search: What you searched for displays below the unchanged heading
* Patron search: what you searched for displays as part of the altered heading.

I'd like to get another set of eyes on this one, Owen or Lukas maybe?
Comment 5 Owen Leonard 2022-10-24 16:45:18 UTC
Created attachment 142532 [details] [review]
Bug 31917: Headings fix for preferences search

This patch re-arranges the logic for displaying the search term when
executing a system preference search.

Test plan
1) Without the patch, search for something that will get no results
   'boing' and note how it looks
2) Without the patch, search for something that gets some results
   'block' and note how it looks
3) Apply the patch
4) Repeat your searches and comment on whether the look is better of
   worse ;P

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 6 Owen Leonard 2022-10-24 16:45:29 UTC
The template logic is a little more complex but I think the result is clearer.
Comment 7 Katrin Fischer 2022-10-24 18:28:30 UTC
Back to this one :) Thx, Owen!
Comment 8 Katrin Fischer 2022-10-24 18:29:14 UTC
Created attachment 142548 [details] [review]
Bug 31917: Headings fix for preferences search

This patch re-arranges the logic for displaying the search term when
executing a system preference search.

Test plan
1) Without the patch, search for something that will get no results
   'boing' and note how it looks
2) Without the patch, search for something that gets some results
   'block' and note how it looks
3) Apply the patch
4) Repeat your searches and comment on whether the look is better of
   worse ;P

Signed-off-by: David Nind <david@davidnind.com>

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

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 9 Tomás Cohen Arazi 2022-10-24 18:45:08 UTC
Pushed to master for 22.11.

Nice work everyone, thanks!