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 loading spinner #2

Merged
merged 1 commit into from
May 25, 2021
Merged

add loading spinner #2

merged 1 commit into from
May 25, 2021

Conversation

mxlje
Copy link
Contributor

@mxlje mxlje commented May 6, 2021

The spinner is shown as the user types (and requests are being made) and is hidden when a request comes back with results, as well as when an error occurs.

The spinner is an animated SVG from here (2nd row on the right): https://samherbert.net/svg-loaders/
I adjusted the animation duration to make it a bit faster. We can chose a different one of course, but I’d like it to be an animated SVG because they’re quite small and we can easily bundle them (as is shown in this PR).

autocomplete-loading-spinner.mov

@mxlje
Copy link
Contributor Author

mxlje commented May 11, 2021

<rebased onto main>

@mxlje
Copy link
Contributor Author

mxlje commented May 14, 2021

Thoughts, @orangejulius @missinglink ?

@mxlje mxlje mentioned this pull request May 14, 2021
6 tasks
@orangejulius
Copy link
Contributor

I like this. The animation is pretty cool, a bit more unique than most. It's also visible but subtle enough to stay out of the way.

👍

the spinner is shown as the user types (and requests are being made) and
is hidden when a request comes back with results, as well as when an
error occurs.

to hide it on error required wrapping the user-supplied error callback
in our own function.

the color can be changed using the --loading-color variable.
@mxlje
Copy link
Contributor Author

mxlje commented May 25, 2021

I have rebased into main and added a CSS variable to customize the color of the loading spinner. Ready to merge if you think we should add it.

@orangejulius
Copy link
Contributor

Yeah it's much better with the spinner :)

@orangejulius orangejulius merged commit 7299686 into main May 25, 2021
@orangejulius orangejulius deleted the feat/loading branch May 25, 2021 16:25
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.

None yet

2 participants