Skip to content
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

[docs] Add a search box #464

Merged
merged 4 commits into from
Jan 28, 2019
Merged

[docs] Add a search box #464

merged 4 commits into from
Jan 28, 2019

Conversation

keanulee
Copy link
Contributor

Staged at https://20190118t155041-dot-polymer-lit-element.appspot.com. Should be pretty simple to apply the same changes to the other product sites.

@frankiefu
Copy link
Contributor

frankiefu commented Jan 22, 2019

The toolbar in the API page looks a bit off with the new change:
https://20190118t155041-dot-polymer-lit-element.appspot.com/api/index.html

@keanulee
Copy link
Contributor Author

Fixed, though now the UI is somewhat confusing since the TypeDoc search box is now visible (previously present but behind the top nav).

@frankiefu
Copy link
Contributor

Wondering if we should just keep hiding the TypeDoc toolbar.

@keanulee
Copy link
Contributor Author

The bad part about hiding the TypeDoc toolbar is that TypeDoc search is actually still accessible by keydown events on body - i.e. you can start typing characters anywhere on the page and the search autocomplete shows.

@frankiefu
Copy link
Contributor

Wow I didn't know it does search autocomplete on keydown. I saw there is an typedoc issue talks about how to get rid of keydown on the body element but not sure how easy it is to override that in custom theme. I guess for now the simplest way would be just go with what you have in the PR, which is already better than what currently deployed in production.

@ghost
Copy link

ghost commented Jan 28, 2019

@frankiefu

not sure how easy it is to override that in custom theme

My understanding is that TypeDoc theme uses the default files unless they are overridden, so this would just involve adding that file with whatever modification required.

However, I tried this following the solution in the issue you linked, and it did not work. Maybe I also need to hide the TypeDoc toolbar? I took a look but couldn't figure out how we are hiding/unhiding it. Here's the branch

https://github.com/Polymer/lit-element/tree/searchbox-disable-keydown/docs/_api/theme

@keanulee
Copy link
Contributor Author

Updated to match lit-html docs - see lit/lit#753 (comment)

@keanulee keanulee merged commit 91b88dc into master Jan 28, 2019
@keanulee keanulee deleted the searchbox branch January 28, 2019 22:34
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants