-
Notifications
You must be signed in to change notification settings - Fork 8.1k
Fix Minimal ProgressView to handle Activity that is longer than console width
#15264
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
Merged
daxian-dbw
merged 4 commits into
PowerShell:master
from
SteveL-MSFT:progress-long-activity
May 17, 2021
Merged
Changes from all commits
Commits
Show all changes
4 commits
Select commit
Hold shift + click to select a range
90d5099
Fix `Minimal` ProgressView to handle Activity that is longer than con…
SteveL-MSFT 47d420f
handle case where console window width is extremely narrow
SteveL-MSFT 6400648
address codefactor
SteveL-MSFT 5dc7d8e
address Ilya's feedback to not modify original string
SteveL-MSFT File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Looking on Archive expand example in #14414 I think we break the scenario.
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 just tried expand-archive with this branch and works fine with a narrow console window. As expected, activity and status are truncated.
Uh oh!
There was an error while loading. Please reload this page.
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 guess they are truncated too early while there is still a lot of free space on the right.
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.
The bar area is also used for Status text which can change as progress is being written. So it's possible to fill up as much of Activity and Status as possible so whitespace is limited, it would also mean that the Status area would resize if the text changes which would make it hard to read.
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 tried the build and I see the resizing scenario doesn't work at all. But this doesn't depend on the PR.
Run follow and use mouse to change windows width:
Results:
(only last related to the PR)
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.
@iSazonov Can you please take another look and see if you have any outstanding concerns for the changes in this particular PR? For the points you brought up above in #15264 (comment), they look like out of the scope of this PR (correct me if I'm wrong), and maybe track them in a separate issue?
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.
@daxian-dbw This removes the exception but I personally do not like the result of the display, although it is not fundamental. The fundamental thing is that the resizing scenario works horribly. But I don't see the point of opening a new issue since MSFT team doesn't have the resources to fix 3000 issues anyway.
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 opened #15407 to track the resizing issue.
@SteveL-MSFT It does look weird to have a single dot instead of Ellipsis when truncation happens. Should that be addressed in this PR or you think it should be a separate one?
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'll take a look at the other issues in a separate PR since this specific issue is affecting users with real world scenarios
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.
Sounds good. #15412 is opened to track the review comment.