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

Calculate initial height properly #8584

Merged
2 commits merged into from Dec 15, 2020
Merged

Calculate initial height properly #8584

2 commits merged into from Dec 15, 2020

Conversation

ghost
Copy link

@ghost ghost commented Dec 14, 2020

Closes #8527

@ghost ghost added the Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs label Dec 14, 2020
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.

Okay, I don't think this is the right solution. First and foremost, I think we should already be handling this case in the if/else if below this. That's probably the thing that's returning the wrong value.

Secondly - TermControl shouldn't need to know anything about the presence of tabs or not. It should be TerminalPage/AppLogic/TerminalApp responsibility to account for the size of the tabs, not the control. The control should be agnostic of whoever's hosting it (it doesn't care if the hosting application has tabs or not)

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 14, 2020
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 14, 2020
@ghost
Copy link
Author

ghost commented Dec 14, 2020

I tested all four true false cases, and it worked. However I'm not sure this was the right solution.

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.

I can't believe all this time, it said Width and not Height 🤦‍♂️

I'm only blocking over updating the comment, but yea the fix seems good to me.

Comment on lines 594 to 596
// For whatever reason, there's about 6px of unaccounted-for space
// in the application. I couldn't tell you where these 6px are
// coming from, but they need to be included in this math.
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
// For whatever reason, there's about 6px of unaccounted-for space
// in the application. I couldn't tell you where these 6px are
// coming from, but they need to be included in this math.
// For whatever reason, there's about 10px of unaccounted-for space
// in the application. I couldn't tell you where these 10px are
// coming from, but they need to be included in this math.

@ghost ghost added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 15, 2020
@ghost ghost removed the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Dec 15, 2020
@ghost
Copy link
Author

ghost commented Dec 15, 2020

@zadjii-msft I fixed the comment.

@DHowett
Copy link
Member

DHowett commented Dec 15, 2020

Wow. I can't believe we were calculating the width instead of the height. Thank you!

@DHowett DHowett changed the title Make row size consistent Calculate initial height properly Dec 15, 2020
@ghost ghost added Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Bug It either shouldn't be doing this or needs an investigation. Product-Terminal The new Windows Terminal. labels Dec 15, 2020
@DHowett DHowett added the AutoMerge Marked for automatic merge by the bot when requirements are met label Dec 15, 2020
@ghost
Copy link

ghost commented Dec 15, 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 e943785 into microsoft:main Dec 15, 2020
DHowett pushed a commit that referenced this pull request Jan 25, 2021
Closes #8527

(cherry picked from commit e943785)
@ghost
Copy link

ghost commented Jan 28, 2021

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

Handy links:

@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:

mpela81 pushed a commit to mpela81/terminal that referenced this pull request Jan 28, 2021
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-User Interface 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. Issue-Docs It's a documentation issue that really should be on MicrosoftDocs/Console-Docs Product-Terminal The new Windows Terminal.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

initialRows/initialColumns still doesn't work quite right
3 participants