Support tooltip rendering in the prediction list view#3667
Merged
Conversation
Collaborator
|
Love the UI! Is there a way to disable the tooltip? |
Member
Author
|
Same as disabling tooltip in menu completion today: |
StevenBucher98
approved these changes
May 2, 2023
StevenBucher98
left a comment
Collaborator
There was a problem hiding this comment.
Can't give a proper code review but the design and UX look great to me!
andyleejordan
approved these changes
May 2, 2023
| { | ||
| const int LengthOfLeadingPart = 6; | ||
| const string IndicatorSymbol = ">>"; | ||
| const string MsgForViewAll = "(<F4> to view all)"; |
Member
There was a problem hiding this comment.
Just curious if we do this elsewhere. I suspect that key binding is customizable by the user, but this won't update. Is that the case?
Member
Author
There was a problem hiding this comment.
Right, the key could already be bound by a user and this message currently won't update in that case.
We don't do this elsewhere -- first time advertising a key-binding in the rendering. Will collect the feedback and see how to best deal with it.
1 task
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
PR Summary
Support tooltip rendering in the prediction list view. Fix #3638.
By default, the list view can use up to 4 lines for tooltip rendering:
For tooltip that spans more than 4 lines, we allow the user to see the full tooltip in the alternate screen buffer with the keybinding F4
When terminal size shrinks, the maximum lines can be used for tooltip also decreases -- it uses up to 2 lines for tooltip when the max list height is reduced to 5.
When the terminal size is even smaller and the max list view height becomes 3, it uses up to 1 line for tooltip.
You can change the tooltip color by
Set-PsreadLineOption -Colors @{ ListPredictionTooltip = "green" }, for example.PR Checklist
Microsoft Reviewers: Open in CodeFlow