List of steps to reproduce:
- Visit the home page of toolhub and input string into the search box
- instead of clicking the search icon, click on the clear icon instead
What happens?:
Instead of clearing the search input field only, toolhub clears the search input field but also tries performing a search. This causes it to send an empty query to the backend since by the time of making the api call, the query is already empty.
What should have happened instead?:
when the clear icon is clicked, it should clear the input field then wait for the user to input another query. It shouldn't try to perform search when the user clicks the clear icon.
This might be intentional but the ux flow is wrong. When a user clicks on a clear icon, they are trying to clear the query they already typed and perhaps input another query. submitting an empty query and sending the user to the search result page seems like a wrong flow.