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

Make changing title of progressbar easier #174

Closed
MarvinJWendt opened this issue Apr 5, 2021 · 5 comments · Fixed by #267
Closed

Make changing title of progressbar easier #174

MarvinJWendt opened this issue Apr 5, 2021 · 5 comments · Fixed by #267
Labels
good first issue Good for newcomers Hacktoberfest proposal Proposal to add a new feature to pterm proposal-accepted Proposals which are accepted for implementation in the future
Milestone

Comments

@MarvinJWendt
Copy link
Member

Currently we need to pb.Add(0) after a title change to a progress bar to update the title.

pb.Title = "Test"
pb.Add(0)
// Do stuff
pb.Increment()

⬇️

pb.UpdateTitle("Test")
// Do stuff
pb.Increment()
@MarvinJWendt MarvinJWendt added the proposal Proposal to add a new feature to pterm label Apr 5, 2021
@MarvinJWendt MarvinJWendt added this to the v1.0.0 milestone Apr 5, 2021
@MarvinJWendt MarvinJWendt added the proposal-accepted Proposals which are accepted for implementation in the future label Aug 16, 2021
@MarvinJWendt MarvinJWendt added the good first issue Good for newcomers label Sep 21, 2021
@b4sen
Copy link
Contributor

b4sen commented Oct 5, 2021

Hi, can I give it a try?

@MarvinJWendt
Copy link
Member Author

Sure @b4sen 👍

@b4sen
Copy link
Contributor

b4sen commented Oct 5, 2021

I'm a bit confused, because the progressbar example updates the title without calling the pb.Add(0) method. Did this issue get already fixed or am I missing something?

@MarvinJWendt
Copy link
Member Author

MarvinJWendt commented Oct 6, 2021

Hi @b4sen, in the example, we use p.Increment(), which is an alias for p.Add(1). The title only updates when a value is added to the progressbar (can also be 0). This issue still exists 😄

@b4sen
Copy link
Contributor

b4sen commented Oct 6, 2021

Silly me, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers Hacktoberfest proposal Proposal to add a new feature to pterm proposal-accepted Proposals which are accepted for implementation in the future
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants