This adds three main fixes to our debounced search handling:
If a search term is the exact same as the last emitted search term, we won't debounce it. However, if users still hit enter or the search button, we will emit it. Think of typing "abc", then after the debounce, quickly deleting and re-adding the "c".
We remove the forced searching on input blur (lose focus). That was way too eager lol.
If the user clears the search term on the duplicate search page we show the placeholder.
You can basically think of our searching rules as: If the user ever hits enter or the search button, always respond to the behavior. In the case of debouncing, we add optimizations, etc.
One note re: a11y -- we don't trigger any screen reader alerts when the user clears their search. That is intentional! Nothing is actually changing meaningfully in the results (no search is actually firing), so we should avoid spamming the user with alerts.
Testing Instructions
[x] Unit tests pass
Feel free to play around with the duplicate search bar and the feature selector! 👍
What Does This PR Add/Change?
This adds three main fixes to our debounced search handling:
You can basically think of our searching rules as: If the user ever hits enter or the search button, always respond to the behavior. In the case of debouncing, we add optimizations, etc.
One note re: a11y -- we don't trigger any screen reader alerts when the user clears their search. That is intentional! Nothing is actually changing meaningfully in the results (no search is actually firing), so we should avoid spamming the user with alerts.
Testing Instructions
Feel free to play around with the duplicate search bar and the feature selector! 👍
Issues
Related to #
Closes #