-
Notifications
You must be signed in to change notification settings - Fork 297
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
ENH: Make search field an overlay with button click #744
Conversation
OK after taking the feedback in #620, this makes a few updates to make the search field show up as an overlay when you click that button, rather than directing you to the new page. I've updated the top comment with the latest update. Would love to know what @drammock and @12rambau think. If folks are happy then I'll get the tests passing |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for these comments! Could you describe more what you mean by "if the search field disappear when blur"? I'm not sure I understand... I wonder if it'd be better to just have the overlay centered and at ~80% width on both wide and mobile screens, maybe with a bigger blur in the background to differentiate from the page content? Is that what you were referring to? |
If I search for something but someone realize I don't need it anymore, I would like to click outside the searche field ("blur" event as it's automatically focused) and see it disapear. In the current implementation I'm force to click on the mignifying glass again |
exactly |
looks pretty nice! Some comments:
|
Yeah i agree re: the magnifying class being gone on the search page. The problem was that Sphinx' search script seems to look for only one search field on the have to populate it with the search text. So we have a choice between "have the search text pre-populated in the field" and "show the magnifying glass on the search page". Hmm maybe we could make the magnifying glass just jump to the top and activate the in-page search bar only when it's on that page? |
SGTM! |
could you add the cmd+k key binding to the search field ? (it's available in many site and avoid to look for the search field on the page) |
OK all comments addressed! The latest push does the following:
Could @12rambau test that |
ctrl+k works on linux, on regular pages, and also on the search results page! nice. |
|
Fixed! The latest push does:
Here's a demo: |
The rendering is awesome and the macOS shortcut works nicely One last comment: |
OK I think that this should now work - @12rambau can you try again with a Mac? I also cleaned up the HTML implementation a bit because I realized we had an unnecessary conditional in there. |
awesome ! |
This is also solving #254 so I added it in the PR message |
OK I'll get the merge conflict resolved and then merge this one in! |
This is really slick! |
This is a proof of concept to explore the UX around using an icon for search instead of the sidebar "search field". Here are the major points here:
So the only different in UX from the current search workflow is that you click, wait a second for the new page to load, and then start typing, rather than typing from the page you used to be on before being redirected.
New behavior (ignore the
#
differences, I think those only show up on RTD):Old behavior:
Actions
closes #620 closes #434 closes #254 closes #560