daattali / shinycssloaders

⌛ Add loading animations to a Shiny output while it's recalculating
https://daattali.com/shiny/shinycssloaders-demo/
Other
395 stars 45 forks source link

Allowing Spinner to keep height on redraw + delaying spinner show (avoid too many or too quick show/hide cycle) #61

Open rgriffogoes opened 3 years ago

rgriffogoes commented 3 years ago

Adding new features: set spinner to keep currrent output height, and have some delay before showing spinner (and if a hide comes before delay, it doesnt show at all).

These features are configurable by keep.height and show.delay properties.

Default values should behave almost* the same as before: with a 0 delay timeout function it can be that the show/hide cycle behaves differently, but on my understanding it would behave better (e.g.: if somehow the hide spinner happens immediately after the display, nothing will happen while before the change the dom would be affected twice)

daattali commented 3 years ago

Hi @rgriffogoes thanks a lot for the initiative! I haven't taken a close look yet, but I do notice that this PR is for two separate features. Could you please submit two separate PRs, one for each issue?

daattali commented 2 years ago

@rgriffogoes Could you edit this PR to only contain the code relevant for "keep height on redraw" please?

daattali commented 1 year ago

@rgriffogoes I want to do some cleanup of old PRs - do you think you'll have time in 2023 to resolve this PR, or should we abandon it?

daattali commented 1 year ago

For cleaner history and to better understand the PR, it'd be helpful if each of the features you added will have its own PR

daattali commented 1 year ago

@rgriffogoes Let me know if you want to keep this PR alive!