-
Notifications
You must be signed in to change notification settings - Fork 345
fix: click open / close preview button #1887
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
fix: click open / close preview button #1887
Conversation
👋 @ThaddeusJiang I quickly tested the change in Firefox and I cannot close the preview with left arrow, it moves the cursor inside the input field. Another issues is that now autocomplete is no longer closed when we click outside the container. I hope this is helpful, there are so many edge cases in getting the preview and keyboard navigation right! |
@@ -6,7 +6,7 @@ | |||
Autocompletion results for <span class="bold">"{{term}}"</span> | |||
</span> | |||
<span class="press-return"> | |||
Press <span class="bold">RETURN</span> for full-text search, <span class="bold">TAB</span> for previews | |||
Press <span class="bold">RETURN</span> for full-text search, <span class="bold">→</span> for previews |
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.
I am sorry but I think we should go with TAB, as someone can still use the arrows to change the input itself. Can we revert to tab?
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.
@josevalim ok, understood
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.
@josevalim Q: how to close preview by keyboard? Is it good idea using shift + Tab
?
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.
Generally speaking, I think the current navigation looks good, so unless you find a bug (code bug or UI bug), I'd be happy to keep it as is. :)
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.
@ThaddeusJiang it should just be pressing Tab again. It should work right now as well!
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.
I have also noticed that your preview shows the search bar and it does not show up for me. :(
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.
@josevalim I have known the reason.
I am using npx serve doc
to launch dev server, maybe you are using open doc/index.html
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.
That's it, great find. It should be "open doc/index.html". Maybe we should document it somewhere?
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.
I tried to improve the README instructions for clarity. Btw, do you think we need something from this PR now? Thanks!
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.
@josevalim I have fixed the click issue in this PR.
Could you review it?
https://github.com/elixir-lang/ex_doc/pull/1887/files
updated screenshots #1887 (comment)
💚 💙 💜 💛 ❤️ |
before:

after:
