Open soroshsabz opened 3 years ago
related to #221
related to #674
related to #1088
This needs to be user configurable. The PowerShell progress bar (at least in 5.1) is buggy as heck whenever I try to use it, so most of the time I suppress it. The winget progress bar works fine, on the other hand.
This would be configurable just like "rainbow", "retro", etc.
For what it's worth the PowerShell-native progress bar has been changed to look pretty similar to the current one winget presents in PowerShell 7.2
I personally don't think this is a pressing issue as progress bars are a UI feature for interactive users (humans) and that's not really how I'm going to use winget - but if it's not too much work, sure.
@jantari I think it is important to Microsoft ecosystem is being consistent, so I think all Microsoft CLI app must be used native PowerShell progress bar if the app need progress bar, to achieve same UX in Microsoft ecosystem.
https://it-overload.com/2021/03/02/the-beauty-of-progress-bar-in-powershell-7-2-preview-3/
as you can see, and as you can say, if we are using native PowerShell progress bar we can achieve all benefit of working in PowerShell Core. if some day PowerShell team decide to change progress bar and make it better than now, winget
can take all the benefit of PowerShell facilities without paying any cost.
thanks
What about for those us that don't use PowerShell though? Keep this is a fallback?
For those of us who think the default PowerShell progress bar is ugly, we can at least improve the colors by putting something like this in ~/Documents/WindowsPowerShell/profile.ps1
$Host.PrivateData.ProgressForegroundColor='White'
$Host.PrivateData.ProgressBackgroundColor='Blue'
I still strongly favor the winget progress bar, especially since it provides additional useful information: 486 MB / 510 MB
in the example.
@rdeforest, if that is problematic for you, report that to the maintainers of PowerShell, because if those problems are remediated, the applications shall gain consistent indicators of progress.
It's a problem in PowerShell 5.1, as far as I can tell it's fine (or at least, better) in PowerShell 7. I don't think PowerShell 5.1 is being supported for anything other than emergency bug fixes, or else I would (although I'm sure they're aware of it).
http://github.com/microsoft/winget-cli/issues/1429#issuecomment-931639466, and http://github.com/microsoft/winget-cli/issues/1429#issuecomment-912611004.
If that is problematic for you, report that to the maintainers of PowerShell, because if those problems are remediated, this software shall gain consistent indicators of progress, and PowerShell's shall have been improved.
Yes, improving PowerShell is a great idea, but this issue #1429 is about the winget-cli project. Improving the PS progress bar is out of scope.
When there is no feature gap between the progress bars in winget
and PowerShell then this issue will have some legs. Until then it should be maximally de-prioritized in favor of work which will make winget
better.
I don't speak for the winget-cli team, I'm just a person on the Internet with opinions.
Oh, definitely fix the actual issues first
Ihmo it looks prettier in Microsoft Terminal and PowerShell 7.x
Just feedback from a regular user here, but I'd much prefer a mix of both, but more so a PowerShell 7.x styled one but in Gray or B/W.
https://github.com/microsoft/winget-cli/issues/1429#issuecomment-1443430771
@Spacellary, I believe that Write-Progress
accepts colouration parameters, although I admit that I don't see any reference to this at https://github.com/MicrosoftDocs/PowerShell-Docs/blob/86925ef514369544b5b6e6502172c81f66c09126/reference/7.4/Microsoft.PowerShell.Utility/Write-Progress.md#parameters.
Add this to your settings.json config file for Winget to get a nice rainbow version
"visual": {
"progressBar": "rainbow",
@soroshsabz is this still something you pursue or is the one from @davidldennison plus the Windows Terminal View in PowerShell 7.x enough? Thank you for considering housekeeping and close if no longer requested.
As @RokeJulianLockhart said, I think winget-cli can implement progress bar with native PowerShell progress bar feature and I think it is very odd to winget-cli does not support native PowerShell Progress Bar
Integration, Consistency and Ecosystem driven is keys of Major Software Company for way of success
I see your point clearer now. Can just believe they do not want to use PowerShell progress bar to reduce dependencies. imagine that something in progress bar commandlet changes, and this would break winget.
As PS is not maintained by winget team, you might understand the complexity. In addition, PS 5.1, 7 or later might have different syntax. this is usually the case for other commands as well. Not speaking for winget team at all, just bringing up my thoughts why they might have chosen this way. When winget has been released, it had no PowerShell support. +1 for consistency :)
Description of the new feature/enhancement
Replace PowerShell progress bar instead of ugly shell based progress simulated when we try download to install package in PowerShell with
winget
I think it is good to replace below
with
Proposed technical implementation details (optional)
I suggest using write-progress command when using
winget
in PowerShell to make better user experience in PowerShell eco-system and feel in-house and native command in PowerShellThis blog is very helpful for writing progress bar in powershell, and this progress can easily show percentage, bytes remaining and speed( this is very needed for downloading from internet with limited speed)