-
Notifications
You must be signed in to change notification settings - Fork 642
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
BREAKING(cli/unstable): make ProgressBar
value
and max
properties public
#6430
base: main
Are you sure you want to change the base?
BREAKING(cli/unstable): make ProgressBar
value
and max
properties public
#6430
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #6430 +/- ##
=======================================
Coverage 95.30% 95.30%
=======================================
Files 575 575
Lines 43279 43275 -4
Branches 6467 6467
=======================================
- Hits 41247 41244 -3
+ Misses 1993 1992 -1
Partials 39 39 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ProgressBar
value
and max
properties public
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.
It makes sense to me to make max
modifiable as I sometimes see such progress indicator (e.g. Deno's download indicator)
It also makes sense to make value
public property as it now accepts the total value
number in addition to the difference. (It should be convenient when the progress source only reports the total current number.)
LGTM
Ref: #6408 (comment)
This PR makes the
ProgressBar
value
andmax
properties public.This is more flexible as the progress bar
max
can be adjusted after instantiation and allows to set thevalue
directly (progressBar.value = newValue
) instead of only adding increments.This makes the
add()
method obsolete as the same can be achieved withprogressBar.value += x
.