-
Notifications
You must be signed in to change notification settings - Fork 8.3k
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
Very long ToolTip
s get clipped
#9869
Comments
It just looks like it’s cut off (look at the part of the character to the right of |
If the tooltip is already multiline, maybe best to always put this path / PS1 it on new line (as well as the PS1 prompt), And then it could be ellipse'd... Maybe some heuristics could be used, such as putting the first occurred slash on the new line Or maybe the tooltip could have increased width (even maybe matching the window width). |
So, we don’t actually know that it’s a path. That’s the verbatim string that bash reported to us, with the username/hostname/path pre-formatted. Alas. |
Summing up three other variants: 1) show PS1 on different line than OS name, 2) make tooltip radically larger, 3) have some heuristics for word-wrapping unknown PS1 (e.g. by slash or non-word characters) |
Hmm, it looks like how we're building the tooltips doesn't account for the width of the text: But then compare to: <Button Content="Button with a simple ToolTip."
ToolTipService.ToolTip="https://this.com/is/a/incredibly-long-hyperlink/that/might/have/too-long-a-tooltip"/>
So <Border x:Name="HyperlinkTooltipBorder"
BorderBrush="Transparent">
<ToolTipService.ToolTip>
<ToolTip x:Name="LinkTip"
Placement="Mouse">
<TextBlock IsTextSelectionEnabled="True">
<Run x:Name="HoveredUri" /> <LineBreak />
<Run x:Uid="HowToOpenRun"
FontStyle="Italic" />
</TextBlock>
</ToolTip>
</ToolTipService.ToolTip>
</Border> in |
ToolTip
s get clipped
Also, not sure why Also note that |
The |
My proposed tooltip (consistent captialization + PS1 on new line always + FS path wrapping heuristic for the first slash (so that for default Windows/Ubuntu PS1 scheme it looks okay in for short enough paths) + wrapping is prefixed by "... ": [Ctrl+Alt+2]: Ubuntu 18.04
vadimkantorov@DESKTOP-4UF8FID:
... /mnt/c/Users/user
.... more wrapping if needed |
As the one responsible for the mess, I can take a look later on. |
I will start with fixing the wrapping (one-liner). |
Nah, let's just fix the wrapping for now. That's easiest - everything else is just heuristics, which is a programmer word for "guessing" 😄 Plus, that doesn't involve any real design changes, which would require a much lengthier discussion |
Will this also fix |
@vadimkantorov - no, I didn't fix any of those, sorry.
|
🎉This issue was addressed in #9913, which has now been successfully released as Handy links: |
The current directory of WSLv1 tab is
/mnt/c/Users/user/Downloads
, and the tooltip just reads/mnt
. This is not useful since it's very generic, even/mnt/c
would be more useful. Maybe even absence of this strange path would be less confusing.Terminal version:
Version: 1.7.1033.0
The text was updated successfully, but these errors were encountered: