-
Notifications
You must be signed in to change notification settings - Fork 99
Add busy indicators (aka spinners) #918
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
Conversation
If the user experience here is smooth and not jarring, then I think it would make sense to enable spinners by default. |
…n definitions in the css
… spinner or change the type
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Updated the scope to enable spinners by default at the page-level. A small spinner is placed in the upper right corner of an app when any element on the page has .recalculating
. There is also a way to enable spinners for a specific element or to turn them off by adding the class no-spinner
to (anywhere on) the page.
…e() option. Get rid of page-level spinner concept (at least for now)
Hello. I've been tracking this thread for this feature, and tried it out - after upgrading the library - since I saw that it was merged. However, the line
When will this be added to the pypi package, and to the documentation? |
@gfleetwood You can install from main with |
@jcheng5 Got it. Thanks! |
@nstrayer Hello. I looked at the three examples showing how this feature works, but I'm still confused. It was working for a while in my app, but now it's not, and I don't know what is wrong. This is a minimal example, except that I will have multiple functions to display many dataframes, each having its own busy indicator.
|
@gfleetwood there were some issues with recent releases that are now fixed in 0.10.2 -- please try upgrading to see if fixes your problems: If you are still having problems after upgrading, please feel free to file a new issue (I promise I'll respond 😄 ) |
@cpsievert No need, the upgrade did it. Thanks! EDIT: The issue returned. I opened an issue here: #1433 |
I'm having trouble using this with express - is there a minimal express example? |
@roivant-matts here's a very minimal one |
This PR adds busy indication, providing users with a visual cue when the server is busy calculating outputs or otherwise serving requests to the client. More specifically, a spinner is shown on each calculating/recalculating output, and a pulsing banner is shown at the top of the page when the app is otherwise busy. Use the new
ui.busy_indicator.options()
function to customize the appearance of the busy indicators andui.busy_indicator.use()
to disable/enable them.Here is an illustration of the default spinner and pulse experience:
busy.mp4
This PR also adds
busyIndicatorOptions()
to customize the appearance of both spinners and the pulse. Here's an example showing off 4 of the mainspinner_type
s available:ring
,bars
,dots
, andpulse
.spinner-types.mp4