Skip to content

BREAKING(cli/unstable): make ProgressBar value and max properties public #6430

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

Open
wants to merge 20 commits into
base: main
Choose a base branch
from

Conversation

timreichen
Copy link
Contributor

@timreichen timreichen commented Feb 19, 2025

Ref: #6408 (comment)

This PR makes the ProgressBar value and max properties public.
This is more flexible as the progress bar max can be adjusted after instantiation and allows to set the value directly (progressBar.value = newValue) instead of only adding increments.
This makes the add() method obsolete as the same can be achieved with progressBar.value += x.

@timreichen timreichen requested a review from kt3k as a code owner February 19, 2025 23:32
@github-actions github-actions bot added the cli label Feb 19, 2025
Copy link

codecov bot commented Feb 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.74%. Comparing base (f8894da) to head (69bf849).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #6430   +/-   ##
=======================================
  Coverage   94.74%   94.74%           
=======================================
  Files         583      583           
  Lines       46478    46478           
  Branches     6523     6523           
=======================================
  Hits        44036    44036           
  Misses       2399     2399           
  Partials       43       43           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@timreichen timreichen changed the title BREAKING(cli/unstable): make ProgressBar value property public BREAKING(cli/unstable): make ProgressBar value and max properties public Feb 22, 2025
Copy link
Member

@kt3k kt3k left a 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

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

Successfully merging this pull request may close these issues.

2 participants