When in Administration - Preferences, using search box. Enter search term, hit enter or click button to search. After search completes, the search box still shows the search text. Once a search is done, the search box should clear as it does for checkout, catalogue, patron searches etc. (Note that this is more annoying now that the search text also persists when switching to a different tab, like from Preferences to Checkout.)
Hm, I am not sure I agree. For example when you do a simple search in the OPAC we also keep the search term showing, as it allows you to check what you searched for and change your search if nothing was found etc. I like that feature of the system preference editor - as I can spot a typo that might have caused me finding nothing. If this was to be removed, it might be nice to show what was searched for in another way.
The system already does tell you what you searched for if there are no results in preferences. It says "No system preferences matched your search for: peter"
The behaviour of the preferences search box is not consistent with all the other search functions in the staff interface. They keep the text while you switch between tabs only before the search is run. I think it is unlikely that staff using Preferences would want to run the same search they have completed in any of the other functions. That's just my opinion; other folks can decide whether this warrants any effort or not, now you know it exists.
Good points. I think I agree now :)
Note that you can use JS code to clean the search box.
Created attachment 62340 [details] [review] Bug 16726: Clear text in syspref searchbox after submitting To test: 1) Go to Admin -> search for a system preference 2) Notice your search stays in the search box (this is inconsistent with search behaviour across Koha) 3) Apply patch and refresh page 4) Make another search 5) Confirm search still works as expected and search terms have been cleared from search box Sponsored-by: Catalyst IT
Created attachment 62352 [details] [review] Bug 16726: Clear text in syspref searchbox after submitting To test: 1) Go to Admin -> search for a system preference 2) Notice your search stays in the search box (this is inconsistent with search behaviour across Koha) 3) Apply patch and refresh page 4) Make another search 5) Confirm search still works as expected and search terms have been cleared from search box Sponsored-by: Catalyst IT Signed-off-by: Dilan Johnpulle <dilan@calyx.net.au>
Works as intended and no issues were encountered when applying the patch.
Signed-off-by: Dilan Johnpulle <dilan@calyx.net.au>
Aleisha, I talked about JS code previously to tell people that without any patches it is possible to clean the box easily. But if we want to do it with a patch we can do it by removing the value of the input (in prefs-admin-search.inc). We may want to add something on the screen to tell the user on what we search for. I'd like to get opinions on that, Owen maybe?
(In reply to Jonathan Druart from comment #10) I agree that it is inconsistent that the preference search leaves the search term in the search box. > We may want to add something on the screen to tell the user on what we > search for. I agree. I think this patch should include that as well.
Created attachment 64072 [details] [review] Bug 16726: Clear text in syspref searchbox after submitting To test: 1) Go to Admin -> search for a system preference 2) Notice your search stays in the search box (this is inconsistent with search behaviour across Koha) 3) Apply patch and refresh page 4) Make another search 5) Confirm search still works as expected and search terms have been cleared from search box 6) Confirm search terms show at the top of the results Sponsored-by: Catalyst IT
I think the "you searched for" text should be in a <h1></h1>.
Created attachment 64668 [details] [review] Bug 16726: Putting text in h1 See Comment 13
Created attachment 64669 [details] [review] Bug 16726: [FOLLOW-UP] Putting text in h1 See Comment 13
Created attachment 64876 [details] [review] Bug 16726: [FOLLOW-UP] Putting text in h1 Works as outlined in test plan, search terms now appear at top as h1 as well Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au>
This works fine for me, but the h1 looks too large, it is confusing with the results. h3 is more consistent, but that is styled as expand/collapse on this page. How about below: <div class="dialog">You searched for: <strong>[% searchfield | html %]</strong></div>
I would prefer the heading to follow the format of catalog search results, "X result(s) found for 'term'" If that's not possible I think this patch is fine. I don't think the message dialog is the right solution.
Created attachment 66699 [details] [review] Bug 16726: Clear text in syspref searchbox after submitting To test: 1) Go to Admin -> search for a system preference 2) Notice your search stays in the search box (this is inconsistent with search behaviour across Koha) 3) Apply patch and refresh page 4) Make another search 5) Confirm search still works as expected and search terms have been cleared from search box 6) Confirm search terms show at the top of the results Sponsored-by: Catalyst IT Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Created attachment 66700 [details] [review] Bug 16726: [FOLLOW-UP] Putting text in h1 Works as outlined in test plan, search terms now appear at top as h1 as well Signed-off-by: Dilan Johnpullé <dilan@calyx.net.au> Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
It does not look good to me: https://pageshot.net/kN7OYETHoEC4WTSQ/pro.kohadev.org Does someone has something else to suggest? Maybe we should style a bit h1, or h2?
11:57 < Joubu> does it look good for you? 11:58 < oleonard> Yes
Pushed to master for 17.11, thanks to everybody involved!
Ah, when showing a preferences tab, the text still appears : "You searched for: " I think one should check if "searchfield" is defined.
Created attachment 67551 [details] [review] Bug 16726: Do not display "You searched for:" if not needed Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
(In reply to Fridolin SOMERS from comment #24) > Ah, when showing a preferences tab, the text still appears : > "You searched for: " > I think one should check if "searchfield" is defined. Good catch, last patch pushed to master!
Pushed to 17.05.x, will be in 17.05.06.
These patches have been pushed to 16.11.x and will be in 16.11.14.
Pushed to 16.05.x, for 16.05.19 release