Skip to content

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

Merged
merged 1 commit into from
Apr 8, 2024
Merged

fix: click open / close preview button #1887

merged 1 commit into from
Apr 8, 2024

Conversation

ThaddeusJiang
Copy link
Contributor

@ThaddeusJiang ThaddeusJiang commented Apr 8, 2024

before:
CleanShot 2024-04-08 at 17 47 56

after:
CleanShot 2024-04-08 at 17 48 33

@ThaddeusJiang ThaddeusJiang mentioned this pull request Apr 8, 2024
3 tasks
@arathunku
Copy link
Contributor

👋 @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
Copy link
Member

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?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@josevalim ok, understood

Copy link
Contributor Author

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 ?

Copy link
Member

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. :)

Copy link
Member

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!

Copy link
Member

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. :(

Copy link
Contributor Author

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

Copy link
Member

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?

Copy link
Member

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!

Copy link
Contributor Author

@ThaddeusJiang ThaddeusJiang Apr 8, 2024

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)

@ThaddeusJiang ThaddeusJiang requested a review from josevalim April 8, 2024 06:59
@ThaddeusJiang ThaddeusJiang changed the title fix: 🐛 toggle preview by keyboard fix: click open / close preview button Apr 8, 2024
@josevalim josevalim merged commit 2acde00 into elixir-lang:search-preview Apr 8, 2024
@josevalim
Copy link
Member

💚 💙 💜 💛 ❤️

@ThaddeusJiang ThaddeusJiang deleted the fix/toggle-preview-by-keyboard branch April 8, 2024 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants