-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Adds an "Indicator" Model and displays it on the toolbar #8823
Conversation
export { ProxyToolbar } from "./toolbar_box" | ||
export { ToolbarBox } from "./toolbar_box" | ||
export { Indicator } from "./indicators/indicator" | ||
export { ServerStatusIndicator } from "./indicators/server_status_indicator" |
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.
Our codebase standard is not to have leading/trailing space between {}
. This will result in diff noise that is otherwise unnecessary. Please adjust here and in other places.
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.
Changed it, but there's still some noise here regardless. The from
keywords were aligned previously, and the line for the new export ServerStatusIdicator
uses more columns than where the from
columns were before.
Three options:
- All lines are affected by realigning the
from
column - All lines are affected by removing any alignment
- Only the additions are modified, but the file has some lines aligned on the
from
keyword, and some others not aligned
@zevisert Thanks for the PR, I've had a similar thought before but not had time to look into it. Just FYI to set expectations, we are prepping for a big release this week, so it may be the weekend/early next we before I can really look into this |
You're welcome. :)
Maybe you're referring to #8608? I linked it at the top
No problem, before you do I'll shed a little more light on the changes here:
|
@zevisert I actually had #3393 in mind, and I guess I never fully fleshed out my idea, which was to create new (Bokeh) events to represent busy/unbusy states. But that issue has languished for a long time, and using explicitly enumerable states as property values to drive things also seems reasonable and probably faster to accomplish at this point. What would you think of adding a "busy" or "working" state to this PR? There are definitely pros/cons. Ideally a busy state might "lock" the document (e.g. disabling interactions) until the server unbusies itself. But I am willing to punt on that at least for now. The use case for busy state is when the server instigates some long running code, possibly in a thread but not necessarily (if the author does not mind blocking the user UI) Regarding re-connection: I would love to work on this with you, but I think there are some additional concerns, so it might be best left to its own PR. E.g even pull-doc may not be sufficient if there are multiple bokeh servers behind a load balancer. So, how to handle that case, etc. Re: build failing, I actually think it's just some linter errors mostly:
|
For |
I should add, if you have the time and interest to work on this over a slightly longer time frame, I think it might be worth exploring separating the indicator from the status a bit more. I.e. imaging a user wanting to respond to the status changes with CustomJS instead of the default indicator. I guess that really gets back to the notion of document events and callbacks though, so that might be too much to consider at the moment |
@zevisert I have resolved the merge conclict, FYI. I'd like to merge this for 1.1.1, but I would also like to punt on the reconnect for now, and attack that in a PR dedicated to that issue. I think there may still be linter errors to fix up as well |
Hi @zevisert I wanted to check in and see if you still had interest in iterating on this? I think my main concern is simply that plots are basically never likely to have more than one indicator so carving out the extra API and category to add them seems like overkill to me. |
I really like this idea/direction, but I think it needs a little more discussion. Given the code drift/conflicts and lack of follow-on reponse, I will close this PR now. I'd love to work on this more in the future (at this point, work should probably be against |
Progress for #8608. Adds a new model subclass:
Indicator
. A list of indicator names can be passed toFigure
, just like tools are. This PR just adds a status indicator for the bokeh server websocket, but these could be used for many other applications.