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
Improve the list view to be scrollable and auto-adjust the list view height #3583
Conversation
PSReadLine/Prediction.Views.cs
Outdated
private void RenderWarningLine(StringBuilder buffer) | ||
{ | ||
// Add italic text effect to the highlight color. | ||
string highlightColor = _singleton._options._listPredictionColor + "\x1b[3m"; |
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 use of italics should just be part of the configurable prediction highlight instead of always being added. Some users may prefer bold, for example. So this should be highlightStyle
and not highlightColor
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.
About the new colors and styles, there are a few of them:
- un-highlighted texts in the metadata line
- highlighted text in the metadata line
- warning message
Currently,
- the un-highlighted text uses the default inline view color/style;
- the highlighted text uses the
ListPredictionColor
plusitalics
; - the warning message uses the
ListPredictionColor
plusitalics
;
I'm not sure about what to expose for configuration yet. It doesn't feel needed to expose them all in my opinion. The following are my thoughts:
- always apply
italics
to the text rendered in the metadata line, and use theListPredictionColor
as the user-configurable highlighting color/style. - maybe expose configuration for un-highlighted text color/style, but I'm not super sure if it's really needed.
- warning message in this case will be uncommon for users to see because it will usually happen when the terminal height is very small (<5). So, exposing a configuration for it seems overkill to me.
I don't have a clear idea what/how to make configurable about the new color/styles at the moment, so I prefer to wait and collect some feedback about this, which hopefully will give us a clear idea. I will open an issue about this to track it.
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.
Issue opened: #3584
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.
LGTM!
Any idea when this will be released (even to a prerelease version)? I just ran Thanks! :) |
🎉 |
PR Summary
Fix #3563
Improve the list view to be scrollable and auto-adjust the list view height.
The scrollable list view:
The auto-adjustable list view height:
PR Checklist
Microsoft Reviewers: Open in CodeFlow