SQLpage icon indicating copy to clipboard operation
SQLpage copied to clipboard

Spinner to indicate page is loading

Open djyotta opened this issue 8 months ago • 14 comments

What are you building with SQLPage ?

Personal file, text sharing.

What is your problem ? A description of the problem, not the solution you are proposing.

I have (rare) situation where some sqlpage.fetch calls are slow (~10 seconds).

In other frameworks, I usually emmit a tag with a spinner container class on it before long running compute, then emmit another tag with a terminating class on it after compute is finished.

I apply the spinner via css. It's display is set to none when the sibling tag with terminating class is emmited.

I tried to do this with the text component, but it seems the partial page is not sent to the browser so it doesn't work.

What are you currently doing ? Since your solution is not implemented in SQLPage currently, what are you doing instead ?

I have no workaround. Page hangs and it blank.

Describe the solution you'd like

I'd like a spinner component that can be selected befor long compute. It could be terminated once next component is selected or by manually selecting a spinner-stop component.

It doesn't have to be a pure css spinner as I described, just whatever works even if it involves JS

It would be ideal if the spinner could be customized by supplying css and/or a class to apply the spinner to.

Describe alternatives you've considered

I'm not aware of any alternatives.

Maybe I can do a custom handlebars component?

djyotta avatar Jun 20 '24 13:06 djyotta