-
-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change search box's "X" button behavior #382
Comments
Hey @JVimes! Thanks for sharing your confusion :) It's understandable. I used other search bars for inspiration. I see Google, Kagi, and DuckDuckGo all use an X inside the search field to clear input. However:
The GitHub search also shows the X after text has been entered, and it's kind of a modal. My first solution would be to hide the X by default, and only show it if the search bar is not blank. Would that be clearer? I'm hoping the way to close modals is obvious to users (press Esc or click outside of it), but I'm not sure this is the case. Another option I see, which could be added alongside the previous suggestion, is to add another X icon, outside the search input, to close the modal. Not as big of a fan of this one, though. Might look less clean. I'm open to alternatives! |
Ah, I see. Interesting problem. I think hiding the X until there's input would help. One idea is, the X-and-Esc-key command could be overloaded: When there's text input, first run clears input and second run closes the modal. (Edit: the X is not hidden in this idea.) |
I appreciate the second idea, though I'm not sure it would be obvious behaviour. I'll implement the "X only appears if input is not empty" for now. Once we see it live we can decide if it's enough :) |
Sounds good to me! Thank you. |
That's great, thank you! |
Feature Request
Summary
I thought the "X" button next to the search box would close the modal, but it seems to clear the search text instead.
Would it be better if it closed the modal?
Motivation
I was just confused by current behavior.
The text was updated successfully, but these errors were encountered: