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

Add delay (350ms) to typeahead search #4182

Merged
merged 1 commit into from
Dec 10, 2018
Merged

Add delay (350ms) to typeahead search #4182

merged 1 commit into from
Dec 10, 2018

Conversation

wanzulfikri
Copy link
Contributor

@wanzulfikri wanzulfikri commented Dec 8, 2018

Fixes #4180

Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!

  • tests pass -- look for a green checkbox ✔️ a few minutes after opening your PR -- or run tests locally with rake test
  • code is in uniquely-named feature branch and has no merge conflicts
  • PR is descriptively titled
  • ask @publiclab/reviewers for help, in a comment below

We're happy to help you get this ready -- don't be afraid to ask for help, and don't be discouraged if your tests fail at first!

If tests do fail, click on the red X to learn why by reading the logs.

Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software

Thanks!

@plotsbot
Copy link
Collaborator

plotsbot commented Dec 8, 2018

2 Messages
📖 @wanzulfikri Thank you for your pull request! I’m here to help with some tips and recommendations. Please take a look at the list provided and help us review and accept your contribution! And don’t be discouraged if you see errors – we’re here to help.
📖 It looks like you haven’t marked all the checkboxes. Help us review and accept your suggested changes by going through the steps one by one. If it is still a ‘Work in progresss’, please include ‘[WIP]’ in the title.

Generated by 🚫 Danger

@wanzulfikri
Copy link
Contributor Author

@publiclab/reviewers I was able to set up the site locally and tried typing in the search bar.

I'm not a fast typer (40+ WPM) and here's the result of my simple test (query numbers come from the 'Network' tab in my Firefox dev tool):

"How do I eat" -> 1 GET(status: 200) query

"How do I" --short pause-- "eat" -> 2 GET(status: 200) queries

And if I delete the text in the search bar and type "How do I eat" again -> 1 GET(status:304) query


Personal opinion: The delay is not too long nor too short.

My test is definitely imperfect. I would love to know if there's a different way to test.

Copy link
Collaborator

@kevinzluo kevinzluo left a comment

Choose a reason for hiding this comment

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

Thank you for your PR @wanzulfikri and welcome to the PublicLab community!
Everything looks great!

The way you tested the delay was the only way I could think of too. If the 350 ms delay feels fine then we should be good to go!

@wanzulfikri
Copy link
Contributor Author

No problem @kevinzluo; and thank you for the welcome!

I’ll do what I can to contribute :D

@kevinzluo kevinzluo added the ready label Dec 9, 2018
@jywarren jywarren merged commit 577fd9a into publiclab:master Dec 10, 2018
@ghost ghost removed the ready label Dec 10, 2018
SrinandanPai pushed a commit to SrinandanPai/plots2 that referenced this pull request May 5, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants