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

Teach tab renamer to truncate tab title input #8433

Merged
1 commit merged into from
Nov 30, 2020

Conversation

Don-Vito
Copy link
Contributor

@Don-Vito Don-Vito commented Nov 28, 2020

If we try set a very long title, "rename box" UI changes max height,
corrupting the layout. There are several ways to fix it, e.g. by
limiting the MaxHeight (e.g. by binding it to the actual height of the
title bar).

However, I went for the most straightforward approach - truncating. I
don't think we should allow long titles (though it can be a nice hidden
storage 😊)

I considered to truncate it to the tab header width, but we can actually
see more data in tab-switcher, so I simply went for a hard-coded value
which should be large enough.

If this approach makes sense we need to consider updating the
documentation.

Closes #8428

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems like a sensible fix, thanks!

Copy link

@rheh rheh left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGMT

@DHowett
Copy link
Member

DHowett commented Nov 30, 2020

@rheh I wasn’t gonna say anything, but then I saw a third instance of LGMT! I believe it’s supposed to be LGTM (for “looks good to me”!) 😄

@Don-Vito
Copy link
Contributor Author

@rheh I wasn’t gonna say anything, but then I saw a third instance of LGMT! I believe it’s supposed to be LGTM (for “looks good to me”!) 😄

I love both LGMT and LGTM - @rheh thanks for extra review!

And I also love @DHowett reviewing the review! 😆

@ghost ghost added Area-UserInterface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal. labels Nov 30, 2020
Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks great to me. Don't even know if docs need to be changed: it's a silly thing for someone to try to do.

@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Nov 30, 2020
@ghost
Copy link

ghost commented Nov 30, 2020

Hello @DHowett!

Because this pull request has the AutoMerge label, I will be glad to assist with helping to merge this pull request once all check-in policies pass.

p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (@msftbot) and give me an instruction to get started! Learn more here.

@ghost ghost merged commit 91aafe8 into microsoft:main Nov 30, 2020
@rheh
Copy link

rheh commented Dec 1, 2020

@rheh I wasn’t gonna say anything, but then I saw a third instance of LGMT! I believe it’s supposed to be LGTM (for “looks good to me”!) 😄

Brain and fingers not connected :-)

@Don-Vito Don-Vito deleted the 8428-tab-header-overflow branch December 3, 2020 17:00
@ghost
Copy link

ghost commented Jan 28, 2021

🎉Windows Terminal Preview v1.6.10272.0 has been released which incorporates this pull request.:tada:

Handy links:

This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-UserInterface Issues pertaining to the user interface of the Console or Terminal AutoMerge Marked for automatic merge by the bot when requirements are met Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-2 A description (P2) Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

After renaming tab with a long string it crashes or a blackscreen occures
4 participants