-
Notifications
You must be signed in to change notification settings - Fork 147
Implemented local search with lunr.js #209
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
Conversation
<a class="grey-text text-lighten-3" href="https://groups.google.com/forum/?fromgroups#!forum/scala-js">Mailing list</a> | ||
<a class="grey-text text-lighten-3" href="https://groups.google.com/forum/?fromgroups#!forum/scala-js">Mailing list</a><br/> | ||
<a class="grey-text text-lighten-3" href="http://twitter.com/scala_js">Twitter <i aria-hidden="true" class="fa fa-twitter"></i></a><br/> | ||
<a href="http://github.com/scala-js/scala-js">GitHub <i aria-hidden="true" class="fa fa-github"></i></a> |
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.
This looks like it should be in a separate PR.
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.
This is here because Twitter and Github links were removed from the top menu to make space for the search icon.
When I load the page, the |
UI-wise, the interface is confusing. When I type in something, I have to switch to the mouse to go and click on a link. I would like to use up/down arrows to select things + Enter to go. Enter could default to the first item. Also, the search "button" at the right of the input box appears as a link but does nothing. It should be removed if it doesn't do anything. |
That's all, I think. |
The search data download is deferred after the page is shown, so it doesn't hinder usage. It's also cached and gzipped, so the penalty is quite low. If it were downloaded only when the search button is clicked, it would be too late from UX point of view. After gzip it's <100kB in size. |
There's still the time to download it while the user types in something.
I guess that's acceptable, but it still feels like a big hit for all the mobile users who won't ever use the search box, if they hit it on Data usage. |
Maybe I'm too paranoid, here. |
The search button is indeed superfluous, but you can navigate with Tab+Enter. I'll make an update for this. Arrow key navigation would be nice, but probably requires a bit more work, so can do that as a separate update later. On mobile the issue is latency, not bandwidth, so downloading search data JIT would not work that well. Besides, comparing to the old scala-js.org site, I think the overall download size and request count is still way less :) |
OK |
That's all. |
JS loading is deferred until after page render. Note: .json compression must be enabled before merging this due to the large size of the search index.md
LGTM |
Implemented local search with lunr.js
JS loading is deferred until after page render.
Note: .json compression must be enabled before merging this due to the large size of the search index.json