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

Investigate Defering Pane initialization until after layout is completed #3996

Closed
zadjii-msft opened this issue Dec 17, 2019 · 5 comments
Closed
Labels
Area-User Interface Issues pertaining to the user interface of the Console or Terminal Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Milestone

Comments

@zadjii-msft
Copy link
Member

Found during the course of investigating #607. Right now we attempt to create the UI of the Pane immediately on construction. While investigating commandline args, I'd try to create a bunch of Panes. This didn't work, because the Pane would have 0 height/width, and would fail to create the UI, or attache the child, until a resize came through.

This is overall bad. We should probably wait until we complete the first layout to calculate how much size we have. Part of the reason this was so bad is that we're manually setting the width/height of our rows/columns to the number of pixels equal to some % of what's available. When that's being calculated, there's only 0px available.

@zadjii-msft zadjii-msft added Product-Terminal The new Windows Terminal. Issue-Task It's a feature request, but it doesn't really need a major design. labels Dec 17, 2019
@zadjii-msft zadjii-msft added this to the Terminal Backlog milestone Dec 17, 2019
@ghost ghost added Needs-Tag-Fix Doesn't match tag requirements Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting labels Dec 17, 2019
@zadjii-msft zadjii-msft self-assigned this Dec 17, 2019
@zadjii-msft zadjii-msft added the Area-User Interface Issues pertaining to the user interface of the Console or Terminal label Dec 17, 2019
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Dec 17, 2019
@DHowett-MSFT
Copy link
Contributor

I just had a crazy thought. Have we been missing something Xaml gives us for free for a long time?

<ColumnDefinition Width="49*" />
<ColumnDefinition Width="51*" />

Star sizes are proportional-weighted; perhaps we can parlay that into percentages?

@zadjii-msft
Copy link
Member Author

@DHowett-MSFT huh. Never considered that. Though, I don't think that'll really work, since I think those have to be integer values. When we add the pane snapping in #3181, the percentages won't be even integers anymore, we'll start getting crazy fractions.

@DHowett-MSFT
Copy link
Contributor

Nah, docs say they can be weird things like 0.5* and stuff.

@zadjii-msft
Copy link
Member Author

no way. Then yea we could probably use that. Thanks for the tip!

@DHowett-MSFT DHowett-MSFT removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Dec 19, 2019
@zadjii-msft zadjii-msft removed their assignment Jan 15, 2020
ghost pushed a commit that referenced this issue Mar 17, 2020
## Summary of the Pull Request
Dustin and Mike had a discussion on star sizing. Mcpiroman connected the dots. I just swooped in and implemented it.

## References
#3996 (comment)
#3744 (comment)

## PR Checklist
* [X] Closes #3744

## Detailed Description of the Pull Request / Additional comments
Star sizing allows us to keep things proportional. Since a 1::1 proportion is the same as a 100::100 proportion, I just went in and added star sizing. In the words of a some dude with a big metal fist, everything is perfectly balanced now.

![image](https://user-images.githubusercontent.com/11050425/76813679-f7103f00-67b5-11ea-9b5c-d2cc73673aba.png)



## Validation Steps Performed
Verified for vertical, horizontal, and uneven splits.
DHowett-MSFT pushed a commit that referenced this issue Mar 19, 2020
## Summary of the Pull Request
Dustin and Mike had a discussion on star sizing. Mcpiroman connected the dots. I just swooped in and implemented it.

## References
#3996 (comment)
#3744 (comment)

## PR Checklist
* [X] Closes #3744

## Detailed Description of the Pull Request / Additional comments
Star sizing allows us to keep things proportional. Since a 1::1 proportion is the same as a 100::100 proportion, I just went in and added star sizing. In the words of a some dude with a big metal fist, everything is perfectly balanced now.

![image](https://user-images.githubusercontent.com/11050425/76813679-f7103f00-67b5-11ea-9b5c-d2cc73673aba.png)

## Validation Steps Performed
Verified for vertical, horizontal, and uneven splits.

(cherry picked from commit 1d8c5ba)
donno2048 added a commit to donno2048/terminal that referenced this issue Sep 28, 2020
## Summary of the Pull Request
Dustin and Mike had a discussion on star sizing. Mcpiroman connected the dots. I just swooped in and implemented it.

## References
microsoft/terminal#3996 (comment)
microsoft/terminal#3744 (comment)

## PR Checklist
* [X] Closes #3744

## Detailed Description of the Pull Request / Additional comments
Star sizing allows us to keep things proportional. Since a 1::1 proportion is the same as a 100::100 proportion, I just went in and added star sizing. In the words of a some dude with a big metal fist, everything is perfectly balanced now.

![image](https://user-images.githubusercontent.com/11050425/76813679-f7103f00-67b5-11ea-9b5c-d2cc73673aba.png)



## Validation Steps Performed
Verified for vertical, horizontal, and uneven splits.
@zadjii-msft zadjii-msft modified the milestones: Terminal Backlog, Backlog Jan 4, 2022
@zadjii-msft
Copy link
Member Author

Uh, it kinda looks like we already do this. Neat. Either that, or I firmly don't remember what I was talking about here. Either way:

@zadjii-msft zadjii-msft closed this as not planned Won't fix, can't repro, duplicate, stale Apr 14, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Tag-Fix Doesn't match tag requirements label Apr 14, 2023
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 Issue-Task It's a feature request, but it doesn't really need a major design. Needs-Tag-Fix Doesn't match tag requirements Product-Terminal The new Windows Terminal.
Projects
None yet
Development

No branches or pull requests

2 participants