CSCfi / CSCfi/rems

Provide immediate feedback on search

Open
#3,201 0 comments 0 reactions 0 assignees View on GitHub
Accessibility Enhancement
Dominant language
Clojure
Stars
66
Forks
28
Avg merge
7d 4h
Merged PRs (30d)
2

Description

Search could display spinner immediately on keystroke/clear-search to give fast "feedback", even though actual search gets called later. for example
```clojure
(r/with-let [typing? (r/atom false)
clear-typing-after-debounce
(debounce (r/partial reset! typing? false) debounce-time)]
[:input {:on-search #(do ; reduced example
(reset! typing? true)
(clear-typing-after-debounce))}]
;; show spinner immediately when possible
(when (or @typing? searching?)
[spinner/small]))
```

_Originally posted by @aatkin in https://github.com/CSCfi/rems/pull/3193#discussion_r1362039024_

We could also consider adding support for using `enter` key or search button.

We should also test the accessibility of the result and make it so that it makes sense.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.