Skip to content
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

Add a progress bar to bokeh widgets list #6556

Open
nleclercq opened this issue Jun 28, 2017 · 15 comments · May be fixed by #13546
Open

Add a progress bar to bokeh widgets list #6556

nleclercq opened this issue Jun 28, 2017 · 15 comments · May be fixed by #13546

Comments

@nleclercq
Copy link
Contributor

nleclercq commented Jun 28, 2017

A progress bar would be welcome. This is a very commonly used widget and its absence might constraint users to switch to another solution (e.g. ipywidgets in my case).

@nleclercq nleclercq changed the title Add a progress bar to widgets list Add a progress bar to bokeh widgets list Jun 28, 2017
@mattpap mattpap self-assigned this Jun 28, 2017
@mattpap mattpap added this to the 0.12.8 milestone Jun 28, 2017
@nleclercq
Copy link
Contributor Author

nleclercq commented Jun 29, 2017

@mattpap, thanks for adding this request to the 0.12.8 milestone.

BTW, as suggested in #6555, it would be great to be able to control the color of the progress bar. I mean the color, of the 'progression part' of the widget.

@mattpap
Copy link
Contributor

mattpap commented Jun 29, 2017

With recent changes to widgets and bringing them closer to bokehjs (removal of jquery-ui, partial removal of bootstrap), we will be able to implement a common styling API (definitively for 1.0, maybe sooner).

@nleclercq
Copy link
Contributor Author

That's great. Thanks for sharing your roadmap.

@bryevdv
Copy link
Member

bryevdv commented Jun 30, 2017

This is definitely a good idea. We should keep in mind concurrent plans for busy and done events for long-running updates. Perhaps those could be endpoints of a more general progress-oriented set of properties.

@bryevdv bryevdv modified the milestones: 0.13.x, short-term Sep 11, 2018
@kdesimone
Copy link

Has any—ahem—progress been made on this?

@FunnyGoofy
Copy link

I think this feature is not available now. though it is also what I want too.

@mattpap
Copy link
Contributor

mattpap commented Nov 19, 2018

There is no progress on this issue. If there was, it would be reflected here. Unfortunately, additions like this one are very low on core maintainers' priority list, so this is a perfect case for external contributors to help.

@mattpap mattpap removed their assignment Nov 19, 2018
@bryevdv
Copy link
Member

bryevdv commented Nov 4, 2019

Just wanted to note that adding a basic progress bar will involve:

  • Creating a python ProgressBar class. This will be a Model subclass that defines properties (e.g. percentage and bar_color maybe others) and probably does not have any actual "code"

  • Creating a TypeScript implementation of that renders a progress bar in the DOM based on the properties of the model. The TypeScript class will subclass LayoutDOM. We can point to some analogous PR examples for whoever wants to work on this, and certainly answer questions / provide guidance all along the way.

@backtrack-5
Copy link

Dear @bryevdv - I would like to work on this. I just looked into the code base and following are my understanding,

  1. Create subclass PorgressBar in bokeh widgets
  2. implement the actual TS code in bokehjs widgets.

I just looked into the existing PR request for this example and found this one as reference : #8464

Can you please tell me whether my understandings are correct and provide any guideline / inputs?

Thanks you,

@philippjfr
Copy link
Contributor

philippjfr commented Jun 2, 2020

We already have a ProgressBar model in Panel you can see here: https://panel.holoviz.org/reference/widgets/Progress.html

The implementation is here: https://github.com/holoviz/panel/blob/master/panel/models/progress.ts

We could definitely consider porting that to bokeh widgets.

@axelande
Copy link

That would be really nice! Is there any updates on this issue?

@jadalilleboe
Copy link
Contributor

I have a couple questions about this issue:

  1. A ProgressBar class does not seem like it would fit in with any of the files in bokeh/models/widgets (i.e. it would not fit in within button.py, sliders.py, or tables.py since it doesn't go in any of those categories), so would it be appropriate to make a new Python file like progress_bar.py? Or would that be too specific for this one widget?
  2. @philippjfr You mentioned that there is already a TS ProgressBar model in Panel that could be ported over to bokeh widgets, would that entail copying that code over to bokeh? Or would there be a better way to make the model common to both projects?

@axelande
Copy link

I can recommend to have a look in the bokeh-garden "extension", it took me some time to figure out exactly how to use their progressbar on my bokeh site but here is a working example: emerald-geomodelling/BokehGarden#6 (comment)

@bryevdv
Copy link
Member

bryevdv commented Jun 26, 2022

@jadalilleboe From a user perspective everything is all under bokeh.models the module subdivisions are really just for the convenience of Bokeh developers. So it's not so important really. I might suggest a new bokeh.models.indicators module. In addition to a progress bar, that would be a good place for a "spinner" widget in the future as well.

The panel/holoviz implementation is here: https://github.com/holoviz/panel/blob/master/panel/models/progress.ts The only panel-specifc thing I see there is CachedVariadicBox which I don't really know much about. @philippjfr will have to comment on that, or if it makes sense to also port to Bokeh. It's possible that the upcoming layour work for Bokeh 3.0 will make CachedVariadicBox no longer relevant (cc @mattpap)

@bryevdv bryevdv modified the milestones: short-term, 3.1 Nov 3, 2022
@bryevdv bryevdv modified the milestones: 3.1, 3.x Feb 10, 2023
@dgrigonis
Copy link

I am potentially in need of such widget as well.

@mattpap mattpap linked a pull request Nov 23, 2023 that will close this issue
@mattpap mattpap modified the milestones: 3.x, 3.4 Nov 23, 2023
@mattpap mattpap modified the milestones: 3.4, 3.5 Feb 28, 2024
@bryevdv bryevdv mentioned this issue Apr 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.