Bug 36651 - Add placeholder text to the search bar in the OPAC
Summary: Add placeholder text to the search bar in the OPAC
Status: RESOLVED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: OPAC (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 37412
  Show dependency treegraph
 
Reported: 2024-04-19 14:38 UTC by Caroline Cyr La Rose
Modified: 2024-11-08 16:46 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
This enhancement updates the style of the OPAC search bar's placeholder text, the text which is shown in the text field when the user has not entered any text. Previously the style of the placeholder made it look very much like text the user had typed. Now the placeholder is right-aligned and italic in order to distinguish it from regular text, while keeping a color which has accessible contrast.
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 36651: Add placeholder text to the search bar in the OPAC (11.09 KB, patch)
2024-06-11 12:10 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 36651: Add placeholder text to the search bar in the OPAC (11.14 KB, patch)
2024-06-12 12:24 UTC, Pedro Amorim
Details | Diff | Splinter Review
Bug 36651: Add placeholder text to the search bar in the OPAC (11.22 KB, patch)
2024-06-12 13:58 UTC, Matt Blenkinsop
Details | Diff | Splinter Review
Screenshot showing possible re-styling of placeholder text (70.03 KB, image/png)
2024-06-24 11:58 UTC, Owen Leonard
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Caroline Cyr La Rose 2024-04-19 14:38:38 UTC
I had this suggestion during a training yesterday. Some people were saying it was not obvious what the search bar was meant for, and it was suggested that maybe putting a hint text in the search bar would help understand. (Similar to the wiki search box https://wiki.koha-community.org/wiki/Main_Page, it says "Search Koha wiki" and when you start typing this text disappears.)

It could be customizable, but the default could be something like "Search the library catalog".
Comment 1 Owen Leonard 2024-06-11 12:10:57 UTC Comment hidden (obsolete)
Comment 2 Pedro Amorim 2024-06-12 12:24:13 UTC Comment hidden (obsolete)
Comment 3 Matt Blenkinsop 2024-06-12 13:58:11 UTC
Created attachment 167661 [details] [review]
Bug 36651: Add placeholder text to the search bar in the OPAC

This patch adds placeholder text to the OPAC search bar, with JavaScript
to change the placeholder based on the user's search type selection.

To test, apply the patch and go to the OPAC.

- The search bar should by default have the placeholder "Search the
  catalog by keyword"
- Change the search type (Author, Title, etc). The placeholder text
  should change accordingly.

Signed-off-by: Pedro Amorim <pedro.amorim@ptfs-europe.com>
Signed-off-by: Matt Blenkinsop <matt.blenkinsop@ptfs-europe.com>
Comment 4 Katrin Fischer 2024-06-21 12:57:51 UTC
That's one of these changes I am not totally sure about. 
For me the difference between the typed in search terms and the placeholder text are visually not very strong. It might be related to not having the best screen, but that might make it a good test too. :)
I am happy to push as is to get some more eyes/opinions maybe. We got plenty of time now.
Comment 5 Katrin Fischer 2024-06-21 13:04:15 UTC
Pushed for 24.11!

Well done everyone, thank you!
Comment 6 Owen Leonard 2024-06-24 11:58:19 UTC
Created attachment 168010 [details]
Screenshot showing possible re-styling of placeholder text

(In reply to Katrin Fischer from comment #4)
> For me the difference between the typed in search terms and the placeholder
> text are visually not very strong.

We do have the capability of styling the placeholder differently than the normal text. That might make a good visual hint that the text isn't actually filling the input.
Comment 7 Katrin Fischer 2024-06-24 12:58:15 UTC
Comment on attachment 168010 [details]
Screenshot showing possible re-styling of placeholder text

I like this, can I have it? :)
Comment 8 Lucas Gass (lukeg) 2024-07-18 19:39:00 UTC
Enhancement will not be backported to 24.05.x series
Comment 9 Owen Leonard 2024-07-19 14:16:54 UTC
(In reply to Katrin Fischer from comment #7)

> I like this, can I have it? :)

See Bug 37412