redwoodjs / playground-auth

This repo demonstrates all the authentication providers that Redwood supports
https://redwood-playground-auth.netlify.app/
MIT License
34 stars 25 forks source link

Loading indicator #55

Open Tobbe opened 3 years ago

Tobbe commented 3 years ago

On my computer/Internet connection it takes a while for the providers to start loading. Could we add some sort of loading indicator?

playgroundauth

lunchbreakdev commented 3 years ago

I've also been thinking about this. It doesn't load quite as slow for me but there is certainly a delay.

I've been trying to wrap my head around if there is a way to use RW cell functionality but pull from the local providers.js file. We could then use a version of the Tailwind animate-pulse as the loader.

Tobbe commented 3 years ago

I've been trying to wrap my head around if there is a way to use RW cell functionality but pull from the local providers.js file.

I'm pretty sure there isn't 🙁

dthyresson commented 3 years ago

I think the delay is in part to the way each provider wraps the element and I likely introduced it with the idea of adding the auth status.

Or it is a delay in the isAuthenticated() for each as it makes the check with each. But that still seems odd.

Maybe prerender https://redwoodjs.com/docs/prerender ... is there a withLoading property?

Note: preprender improvements will only be seen in prod, not dev, so if we PR these I'll approve teh previews on Netlify to deploy and can test there.