-
Notifications
You must be signed in to change notification settings - Fork 760
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
Concurrent progress bars #3252
Concurrent progress bars #3252
Conversation
could it be sorted (the largest at top)? |
@T-256 I put the largest at the bottom which looks more natural, in my opinion. progress-bars.mp4 |
The code generally looks good (well done) but need to find a bit of time to play with this myself to see if I have any feedback on the UX. |
Just tested this on a large requirements file, I think any downloads <250kb shouldn't be displayed. The output changes too fast for it to be useful. |
CodSpeed Performance ReportMerging #3252 will not alter performanceComparing Summary
|
We should also probably provide a way to disable this output. |
We could consider making it opt-in. (That would also make it less risky to ship.) |
What's the risk, specifically? It seems improbable that this will break people's workflows right? |
We do have a preview option now though, if you really want to gate it. A dedicated setting might make sense too? but opt-in seems wrong for that. |
I think the risk is just that it’s overly verbose for most package installs and may require tuning. I would be fine shipping it under preview so we can get feedback on the UI/UX. I haven’t had a chance to play with it myself yet though. |
I don't mind iterating on display ux without opt-in, it feels much safer than other changes we make and we release very often. |
Is this waiting on any feedback? |
Yes, from me at least - not sure if others are planning to review. |
I'd love to get this merged, I don't think it's great to have it hanging for weeks. Anything I can do to move this forward? |
Ultimately it's on me to review. However you could test and give feedback on the UX -- it would make it higher-confidence for me if we could get more eyes and opinions on it. |
I did test it and was happy with it but I can do more investigation. @ibraheemdev can you rebase the branch? |
I will review and merge today. |
I'll rebase. I am a little concerned about the output when you have a lot of small downloads though, e.g. #2706 (comment). Even kitty was flickering a little. We can probably buffer updates to the terminal a bit. |
If anyone has "good" test cases post 'em here so we have some common ground when considering the behavior. |
LGTM and as Charlie said, it could be opt-in via
Let's get some feedback from users, then we can set this interval value with more confidence. |
Should we just move behind preview to unblock the decision? @ibraheemdev do you want it to ship to stable? |
I'm fine with merging this behind preview or an opt-in flag, as long as it's accessible because it can be useful for debugging. |
I have a medium preference for shipping it in stable with an opt-out, but that requires a separate mechanism than |
Let's just move it to |
To achieve that, I guess we'd need to put the package name above the bar, or to the right of it, to achieve consistent alignment? |
Or use a fixed size for the package name. I can play with it. |
Here's a slightly different layout. The colors are washed out in the video but it's green on dim: May-23-2024.23-28-19.mp4 |
Thoughts? |
match self.reporter { | ||
Some(ref reporter) => { | ||
let mut reader = | ||
ProgressReader::new(&mut hasher, progress.unwrap(), &**reporter); |
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.
I feel like I'm so allergic to unwrap that I'd probably do something like:
let progress = self
.reporter
.as_ref()
.map(|reporter| (reporter, reporter.on_download_start(dist.name(), size)));
And then use match self.progress
everywhere. What's your instinct?
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.
That is nicer, updated.
@charliermarsh your design looks quite nice, I would be happy to switch to that. |
Sounds good, I'll merge this today. I looked at gating behind preview but honestly looks like kind of a pain haha. |
We can add a |
After seeing this in the release notes i was afraid it would cause this |
Summary
Implements concurrent progress bars. Resolves #1209.
Test Plan
progress-bars.mp4