-
Notifications
You must be signed in to change notification settings - Fork 516
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
Conversation
Waiting for the link :) |
Deploy preview ready! Built with commit a51b298 https://deploy-preview-2509--algolia-instantsearch.netlify.com |
Seems like the indicator shows up instantly, do you think it's something that people should add with a transition in css? |
I added a loader image, from https://github.com/SamHerbert/SVG-Loaders which is MIT |
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.
I can't throttle my network speed in Safari, but it doesn't show up when I tether from my phone on 3G either
I take back my words, it does show up now, was throttling wrong
src/css/theme/_search-box.scss
Outdated
@@ -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>'); |
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.
Looks good :D |
036778e
to
23b79ec
Compare
Closing in favor of #2569 |
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:
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