Bug 435084 - Add button or automatic trigger to search field
Summary: Add button or automatic trigger to search field
Status: RESOLVED FIXED
Alias: None
Product: frameworks-knewstuff
Classification: Frameworks and Libraries
Component: general (show other bugs)
Version: unspecified
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: Dan Leinir Turthra Jensen
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2021-03-28 20:47 UTC by medin
Modified: 2021-04-01 15:09 UTC (History)
5 users (show)

See Also:
Latest Commit:
Version Fixed In: 5.81


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description medin 2021-03-28 20:47:44 UTC
When a user finishes typing some text in search field, nothing happens, and user should press key enter to start search process, it would great if a little button is added to right side of search field to make it easy for user to click on it to start searching, or enable some kind of automatic search when user stops typing text for a little time (e.g >500ms).
Comment 1 David Edmundson 2021-03-28 22:25:38 UTC
It should be constantly updating the filter as you type
Comment 2 medin 2021-03-28 22:49:12 UTC
(In reply to David Edmundson from comment #1)
> It should be constantly updating the filter as you type

I don't mean the widgets explorer that appears at left side of screen, but the one that appears when you click on "Get New Widgets" button.
Comment 3 Dan Leinir Turthra Jensen 2021-03-29 08:56:53 UTC
(In reply to David Edmundson from comment #1)
> It should be constantly updating the filter as you type

That's a good point yes - it can't just fire it all the time (it's an expensive internetty sort of operation), but having a timer that does the searching in a slightly postponed sort of manner would definitely be good.

Hmm, on which note... this seems like perhaps the sort of thing that Kirigami's search field might actually usefully do for us. KNewStuff's not the only place where this would be a useful sort of thing to do, and having it in that component, it would suddenly become available in a consistent manner to any consumer of that component.

Marking as confirmed and tagging in Marco for a comment on whether he would support that (i'll offer to write the patch, just to make sure it won't be vetoed outright) :)
Comment 4 Marco Martin 2021-03-31 08:30:38 UTC
yes, should update constantly with an event compression timer so that if you type fast enough it will search only one time.

also should be possible to disable as you don't know how much expensive the search operation will be
Comment 5 Bug Janitor Service 2021-03-31 09:21:31 UTC
A possibly relevant merge request was started @ https://invent.kde.org/frameworks/kirigami/-/merge_requests/266
Comment 6 Dan Leinir Turthra Jensen 2021-03-31 09:42:43 UTC
Git commit b735312ae714fad828e399ec73b8cdd4b0c03061 by Dan Leinir Turthra Jensen.
Committed on 31/03/2021 at 09:17.
Pushed by leinir into branch 'master'.

Auto fire SearchField's accepted, with optional extra delay

Without this, the SearchField requires the user to press either enter or
return to signify that a search should happen. This change ensures that
the search will happen if the user just inputs search terms into the
field, the way search fields seem expected to function today.

M  +49   -0    src/controls/SearchField.qml

https://invent.kde.org/frameworks/kirigami/commit/b735312ae714fad828e399ec73b8cdd4b0c03061