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

Use native PowerShell progress bar instead of ugly shell simulated progress bar #1429

Open
soroshsabz opened this issue Sep 3, 2021 · 19 comments
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.

Comments

@soroshsabz
Copy link

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

image

with

image

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 PowerShell

This 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)

@soroshsabz soroshsabz added the Issue-Feature This is a feature request for the Windows Package Manager client. label Sep 3, 2021
@ghost ghost added the Needs-Triage Issue need to be triaged label Sep 3, 2021
@soroshsabz
Copy link
Author

related to #221

related to #674

related to #1088

@denelon denelon removed the Needs-Triage Issue need to be triaged label Sep 3, 2021
@denelon denelon added this to the Backlog-Client milestone Sep 3, 2021
@jedieaston
Copy link
Contributor

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.

@denelon
Copy link
Contributor

denelon commented Sep 3, 2021

This would be configurable just like "rainbow", "retro", etc.

@jantari
Copy link

jantari commented Sep 15, 2021

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.

@soroshsabz
Copy link
Author

soroshsabz commented Sep 16, 2021

@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

@VivaLosDoyers
Copy link

What about for those us that don't use PowerShell though? Keep this is a fallback?

@rdeforest
Copy link

rdeforest commented Sep 30, 2021

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.

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Oct 4, 2021

  1. Use native PowerShell progress bar instead of ugly shell simulated progress bar #1429 (comment) and
  2. Use native PowerShell progress bar instead of ugly shell simulated progress bar #1429 (comment)

@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.

@jedieaston
Copy link
Contributor

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).

@rdeforest
Copy link

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.

@Masamune3210
Copy link

Oh, definitely fix the actual issues first

@Karl-WE
Copy link
Contributor

Karl-WE commented Dec 30, 2022

Ihmo it looks prettier in Microsoft Terminal and PowerShell 7.x

@Spacellary
Copy link

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.

@RokeJulianLockhart
Copy link

RokeJulianLockhart commented Mar 2, 2023

#1429 (comment)

@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.

Trenly added a commit to Trenly/winget-cli that referenced this issue Mar 22, 2024
411a10915 mint 2.10.19
096a9a1bb Merge pull request microsoft#1782 from microsoft/fix_uri_parsing
006271f6a make Uri.is_host_loopback() only return true for localhost and 127.0.0.1 exactly
9c654889e Remove email list from the readme
31e7feacc Merge pull request microsoft#1718 from dashanji/Fix-typo
e1b6a8e61 Merge pull request microsoft#1711 from Fighter19/pr-fix-safeint3
c5dcbb5bb Merge pull request microsoft#1717 from microsoft/users/GitHubPolicyService/f2ee14d6-8d6b-4313-b754-3880e015f7c3
98ee36dac Fix typo
a57f45918 Microsoft mandatory file
3308d9728 Fix likely typo in SafeInt3.hpp, that results in error with clang 15
07cf58910 Merge pull request microsoft#1429 from NN---/fix/value_int_ctor
3eac925ad Update Release/include/cpprest/json.h
06363bc78 Update Release/include/cpprest/json.h
bfe348779 Merge pull request #1577 from JvdGlind/hidden_visibility_support_macos
0ddc61829 Clarify cpprestsdk level of support
804448058 export http_exception for non Windows builds
d9d7f5ed4 Merge pull request microsoft#1496 from icherniukh/oauth2_client_credentials
8ae5da616 Update oauth2.h
708a5df2b Add support for oauth2 using only client credentials
5408f1dc9 Add constructor from all integer types.

git-subtree-dir: src/cpprestsdk/cpprestsdk
git-subtree-split: 411a109150b270f23c8c97fa4ec9a0a4a98cdecf
Trenly added a commit to Trenly/winget-cli that referenced this issue Mar 22, 2024
411a10915 mint 2.10.19
096a9a1bb Merge pull request microsoft#1782 from microsoft/fix_uri_parsing
006271f6a make Uri.is_host_loopback() only return true for localhost and 127.0.0.1 exactly
9c654889e Remove email list from the readme
31e7feacc Merge pull request microsoft#1718 from dashanji/Fix-typo
e1b6a8e61 Merge pull request microsoft#1711 from Fighter19/pr-fix-safeint3
c5dcbb5bb Merge pull request microsoft#1717 from microsoft/users/GitHubPolicyService/f2ee14d6-8d6b-4313-b754-3880e015f7c3
98ee36dac Fix typo
a57f45918 Microsoft mandatory file
3308d9728 Fix likely typo in SafeInt3.hpp, that results in error with clang 15
07cf58910 Merge pull request microsoft#1429 from NN---/fix/value_int_ctor
3eac925ad Update Release/include/cpprest/json.h
06363bc78 Update Release/include/cpprest/json.h
bfe348779 Merge pull request #1577 from JvdGlind/hidden_visibility_support_macos
0ddc61829 Clarify cpprestsdk level of support
804448058 export http_exception for non Windows builds
d9d7f5ed4 Merge pull request microsoft#1496 from icherniukh/oauth2_client_credentials
8ae5da616 Update oauth2.h
708a5df2b Add support for oauth2 using only client credentials
5408f1dc9 Add constructor from all integer types.

git-subtree-dir: src/cpprestsdk/cpprestsdk
git-subtree-split: 411a109150b270f23c8c97fa4ec9a0a4a98cdecf
@davidldennison
Copy link

Add this to your settings.json config file for Winget to get a nice rainbow version

"visual": {
        "progressBar": "rainbow",

image

@Karl-WE
Copy link
Contributor

Karl-WE commented May 10, 2024

@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.

@soroshsabz
Copy link
Author

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

@soroshsabz
Copy link
Author

Integration, Consistency and Ecosystem driven is keys of Major Software Company for way of success

@Karl-WE
Copy link
Contributor

Karl-WE commented May 14, 2024

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 :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Issue-Feature This is a feature request for the Windows Package Manager client.
Projects
None yet
Development

No branches or pull requests