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

Alternative: Improve search performance #1393

Merged
merged 4 commits into from
Dec 27, 2017
Merged

Alternative: Improve search performance #1393

merged 4 commits into from
Dec 27, 2017

Conversation

paulmelnikow
Copy link
Member

@paulmelnikow paulmelnikow commented Dec 26, 2017

Alternative to #1385.

Add a class which applies display: none to badges we don’t want to see. This is accomplished by passing a `shouldDisplay` function along with each badge, which pulls the current query through a closure and applies it.

A bit roundabout, but it works.

The rest of the changes are refactors to avoid code duplication.

I decreased the debouce rate to 50, which seems to work well.
@paulmelnikow paulmelnikow added the frontend The Docusaurus app serving the docs site label Dec 26, 2017
@paulmelnikow paulmelnikow temporarily deployed to shields-staging-pr-1393 December 26, 2017 04:09 Inactive
@shields-ci
Copy link

shields-ci commented Dec 26, 2017

Messages
📖

✨ Thanks for your contribution to Shields, @paulmelnikow!

Generated by 🚫 dangerJS

@RedSparr0w
Copy link
Member

I prefer the feel of this PR overall.
👍

@paulmelnikow
Copy link
Member Author

Okay, I'll see if I can clean it up a little bit. The key fixes in #1385 won't matter right now but I'll pull those in too, in case we decide to change how this works in the future.

@espadrine
Copy link
Member

I like this patch a lot too, it's exactly what I hoped for.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
frontend The Docusaurus app serving the docs site
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants