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

Some panes stop resizing after other panes are closed #8230

Closed
valorin opened this issue Nov 12, 2020 · 12 comments · Fixed by #8241
Closed

Some panes stop resizing after other panes are closed #8230

valorin opened this issue Nov 12, 2020 · 12 comments · Fixed by #8241
Labels
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. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Milestone

Comments

@valorin
Copy link

valorin commented Nov 12, 2020

There appears to be an issue caused by animations when panes are closed. With animations enabled and multiple panes (3+) in use, when you close a panel and attempt to resize the remaining panes, some of the panes don't resize correctly. I haven't tested extensively, however it appears that the created panes are the ones that cannot resize, while the original pane does get resized.

This is on the new Preview that was released today.

UPDATE: This doesn't appear to require animations enabled. I've experienced it with animations disabled when moving around and closing panes. It seems to be triggered first by removing a pane, as everything works as expected until I close something. After that point, the behaviour is weird and some panes stop resizing.

I'll leave the steps below as-is, as that's the most reliable way to replicate that I've discovered.

Environment

Windows build number: 10.0.19041.0
Windows Terminal version: Preview 1.5.3142.0

Steps to reproduce

  1. Ensure animations are enabled in the config ("disableAnimations": false),
  2. Split the terminal into three panes. I've been using a vertical then a horizontal split:
    { "command": { "action": "wt", "commandline": "split-pane -V ; split-pane -H" }, "keys": "ctrl+alt+shift+l" },
    
  3. Close the second panel. For me this is top-right. The third pane correctly resizes to fill the gap left from the closed panel.
  4. Resize the remaining pane divider

Expected behavior

The pane divider should resize, with both panes included.

Actual behavior

The first pane is resized, but the second (originally the third) stays where it is. As a result, you either have a gray gap between the two panes, or the first pane covers up the second pane.

Toggling "disableAnimations": true to disable animations fixes the issue and the panes resize correctly.

3 panes showing top before the second pane is closed

image

Remaining two panes showing the second pane no resizing with the the first:

image
image

@ghost ghost added Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting Needs-Tag-Fix Doesn't match tag requirements labels Nov 12, 2020
@valorin valorin changed the title Animations prevent panes from resizing when some are closed Some panes stop resizing after other panes are closed Nov 12, 2020
@Don-Vito
Copy link
Contributor

Don-Vito commented Nov 12, 2020

@valorin - for me the problem occurs only when animations are enabled. Could not reproduce it with animations disabled.
[Update] - was able to reproduce it without animations, but in more complex scenario.

@valorin
Copy link
Author

valorin commented Nov 12, 2020

Yeah that's exactly what happened with me. It's simple with animations, but harder and more random without them.

@Don-Vito
Copy link
Contributor

BTW, it looks that disabling animation applies only to the "close pane" animation, but not to pane entrance animation.
@zadjii-msft - is it intentional?

@zadjii-msft
Copy link
Member

@Don-Vito It most certainly is not

@zadjii-msft zadjii-msft 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. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. labels Nov 12, 2020
@ghost ghost removed the Needs-Tag-Fix Doesn't match tag requirements label Nov 12, 2020
@zadjii-msft zadjii-msft added this to the Terminal v1.6 milestone Nov 12, 2020
@Don-Vito
Copy link
Contributor

Don-Vito commented Nov 12, 2020

@Don-Vito It most certainly is not

NP. I am creating a PR to allow disabling 😊

@Don-Vito
Copy link
Contributor

In any case with animations fully disabled (both close and entrance), I am currently unable to reproduce the issue.. of course probably the issue is somewhere else and animations just increase the probability.

@Don-Vito
Copy link
Contributor

Don-Vito commented Nov 12, 2020

@zadjii-msft - I think I have a direction here 😊 This is a race. If you split the panes manually and slowly (aka after the animation has finished) no problem occurs.

My guess is that in the completion of the animation, when you access the pane, it already has other children.

I fixed it locally and it seems to work (although this is a race and you can never know 😊). Creating the PR for this one as well

@Don-Vito
Copy link
Contributor

@zadjii-msft - actually I am not sure what is the best fix. What I am doing in PR is to ensure that the correct control gets the stretch alignment back.

However the problem is more severe: during the animation the pane children might change. This applies not just for entrance animation but for the close animation as well. I am not sure what should be the approach - to lock the panes during the animation?

@Don-Vito
Copy link
Contributor

Related to #7942

@zadjii-msft
Copy link
Member

You know, locking the panes during the animation sounds like a really good idea, one that would probably resolve a whole host of these issues.

@zadjii-msft zadjii-msft removed the Needs-Triage It's a new issue that the core contributor team needs to triage at the next triage meeting label Nov 12, 2020
@ghost ghost closed this as completed in #8241 Nov 18, 2020
@ghost ghost removed the In-PR This issue has a related PR label Nov 18, 2020
ghost pushed a commit that referenced this issue Nov 18, 2020
…8241)

Fixes a race in pane entrance animation, where the animation
completion routine processes wrong children.

Validated w/ manual testing

Closes #8230
@ghost ghost added the Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release. label Nov 18, 2020
DHowett pushed a commit that referenced this issue Jan 25, 2021
…8241)

Fixes a race in pane entrance animation, where the animation
completion routine processes wrong children.

Validated w/ manual testing

Closes #8230

(cherry picked from commit c41e078)
@ghost
Copy link

ghost commented Jan 28, 2021

🎉This issue was addressed in #8241, which has now been successfully released as Windows Terminal v1.5.10271.0.:tada:

Handy links:

@ghost
Copy link

ghost commented Jan 28, 2021

🎉This issue was addressed in #8241, which has now been successfully released as Windows Terminal Preview v1.6.10272.0.:tada:

Handy links:

This issue 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 Issue-Bug It either shouldn't be doing this or needs an investigation. Priority-1 A description (P1) Product-Terminal The new Windows Terminal. Resolution-Fix-Committed Fix is checked in, but it might be 3-4 weeks until a release.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants