benvinegar / counterscale

Scalable web analytics you run yourself on Cloudflare
https://counterscale.dev
MIT License
1.52k stars 66 forks source link

Add loading indicators when data being fetched #54

Closed benvinegar closed 8 months ago

benvinegar commented 8 months ago

I notice that queries are taking a bit more time than in the past – it sometimes take 2-3 seconds to serve a new page during which there is no visual indicator to the user.

kandros commented 8 months ago

Would you prefer streaming data for specific components/sections using remix defer (I'm not sure if it works for client side navigations after the first) or a global visual indicator like NProgress?

kandros commented 8 months ago

I've tried a simple opacity transition while navigating, I'm pretty effective to be honest

After

https://github.com/benvinegar/counterscale/assets/4562878/4240171f-6767-4d71-956b-10f824333cad

Before

https://github.com/benvinegar/counterscale/assets/4562878/b5b1d1ad-ca49-4ab8-a5eb-4016615f6385

benvinegar commented 8 months ago

I've tried a simple opacity transition while navigating

I think it looks great!

kandros commented 8 months ago

I've tried a simple opacity transition while navigating

I think it looks great!

sending a PR 👌