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

feat(searchbox): provide a loading indicator #2509

Closed
wants to merge 7 commits into from

Conversation

bobylito
Copy link
Contributor

@bobylito bobylito commented Oct 20, 2017

When the requests are stalled by the network, it is important to let the user know.

This is an early opening of the PR so that I can start gathering feedback. Current questions:

  • the magnifying glass is directly in the CSS, but the loading part adds a class. Is it the right approach or should I change the image?
  • I'm not sure about the calibration of the delay, is it too short?

https://deploy-preview-2509--algolia-instantsearch.netlify.com/v2/dev-novel/?selectedStory=SearchBox.With%20loading%20indicator (to test in bad condition, you should set your Chrome console to slow 3g)

fixes #2315

@bobylito
Copy link
Contributor Author

Waiting for the link :)

@algobot
Copy link
Contributor

algobot commented Oct 20, 2017

Deploy preview ready!

Built with commit a51b298

https://deploy-preview-2509--algolia-instantsearch.netlify.com

@Haroenv
Copy link
Contributor

Haroenv commented Oct 20, 2017

Seems like the indicator shows up instantly, do you think it's something that people should add with a transition in css?

@Haroenv
Copy link
Contributor

Haroenv commented Oct 20, 2017

I added a loader image, from https://github.com/SamHerbert/SVG-Loaders which is MIT

Copy link
Contributor

@Haroenv Haroenv left a comment

Choose a reason for hiding this comment

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

I can't throttle my network speed in Safari, but it doesn't show up when I tether from my phone on 3G either

@Haroenv Haroenv dismissed their stale review October 20, 2017 17:51

I take back my words, it does show up now, was throttling wrong

@@ -48,7 +48,8 @@
svg{
visibility: hidden;
}
background: red;
background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="38" height="38"><defs><linearGradient id="a" x1="8.04%" x2="65.68%" y1="0%" y2="23.86%"><stop stop-color="%23BFC7D8" stop-opacity="0" offset="0%"/><stop stop-color="%23BFC7D8" stop-opacity=".63" offset="63.15%"/><stop stop-color="%23BFC7D8" offset="100%"/></linearGradient></defs><g fill="none" fill-rule="evenodd" transform="translate(1 1)"><path stroke="url(%23a)" stroke-width="2" d="M36 18c0-9.94-8.06-18-18-18"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.9s" repeatCount="indefinite"/></path><circle cx="36" cy="18" r="1" fill="%23BFC7D8"><animateTransform attributeName="transform" type="rotate" from="0 18 18" to="360 18 18" dur="0.9s" repeatCount="indefinite"/></circle></g></svg>');
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for this @Haroenv. I was not sure where to go on that part, and I was thinking to maybe let the designers have an opinion here (cc @LukyVj)

@bobylito
Copy link
Contributor Author

bobylito commented Oct 21, 2017

I added a loader image, from https://github.com/SamHerbert/SVG-Loaders which is MIT

Looks good :D

@bobylito bobylito force-pushed the feat/searchbox-loading-indicator branch from 036778e to 23b79ec Compare October 23, 2017 17:23
@bobylito
Copy link
Contributor Author

Closing in favor of #2569

@bobylito bobylito closed this Nov 16, 2017
@francoischalifour francoischalifour deleted the feat/searchbox-loading-indicator branch October 4, 2018 22:09
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.

Loading indicator
3 participants