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 empty progress bar #2088

Merged
merged 2 commits into from
Mar 29, 2021
Merged

Add empty progress bar #2088

merged 2 commits into from
Mar 29, 2021

Conversation

hoxbro
Copy link
Member

@hoxbro hoxbro commented Mar 15, 2021

Fixes #2080

By setting the value to -1 the progress bar is empty.

import panel as pn

progress1 = pn.widgets.indicators.Progress(value=-1, active=False)
progress2 = pn.widgets.indicators.Progress(value=-1, active=True)
progress3 = pn.widgets.indicators.Progress(value=0, active=False)
progress4 = pn.widgets.indicators.Progress(value=0, active=True)
progress = pn.Column(progress1, progress2, progress3, progress4)
progress.servable()
progress.mp4

@codecov
Copy link

codecov bot commented Mar 15, 2021

Codecov Report

Merging #2088 (f28d835) into master (238199f) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master    #2088   +/-   ##
=======================================
  Coverage   84.42%   84.42%           
=======================================
  Files         179      179           
  Lines       20776    20776           
=======================================
  Hits        17541    17541           
  Misses       3235     3235           
Impacted Files Coverage Δ
panel/tests/widgets/test_misc.py 98.11% <100.00%> (ø)
panel/widgets/indicators.py 94.83% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 238199f...f28d835. Read the comment docs.

@philippjfr
Copy link
Member

Interesting, I guess I don't quite understand why this works.

@hoxbro
Copy link
Member Author

hoxbro commented Mar 16, 2021

I think this could be a case of "It's not a bug, it's a feature".

@philippjfr
Copy link
Member

Probably, the HTML spec can be...weird. Certainly would have expected it to treat 0 differently from null/unset.

@philippjfr philippjfr merged commit 43de0fa into holoviz:master Mar 29, 2021
@hoxbro hoxbro deleted the empty_progress_bar branch March 29, 2021 18:08
philippjfr pushed a commit that referenced this pull request Apr 8, 2021
* Add -1 to lower bound for Progress

* Update unittest
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cannot give Progress initial look of value=0, max=100
2 participants