terminal/src/cascadia
Mike Griese ccf9f03ed3
Fix exiting a zoomed pane (#7973)
## Summary of the Pull Request

Fixes the bug where `exit`ing inside a closed pane would leave the Terminal blank.

Additionally, removes `Tab::GetRootElement` and replaces it with the _observable_ `Tab::Content`. This should be more resilient in the future.

Also adds some tests, though admittedly not for this exact scenario. This scenario requires a cooperating TerminalConnection that I can drive for the sake of testing, and _ain't nobody got time for that_.

## References
* Introduced in #6989 

## PR Checklist
* [x] Closes #7252
* [x] I work here
* [x] Tests added/passed 🎉 
* [n/a] Requires documentation to be updated

## Detailed Description of the Pull Request / Additional comments

From notes I had left in `Tab.cpp` while I was working on this:
```
OKAY I see what's happening here the ActivePaneChanged Handler in TerminalPage
doesn't re-attach the tab content to the tree, it just updates the title of the
window.

So when the pane is `exit`ed, the pane's control is removed and re-attached to
the parent grid, which _isn't in the XAML tree_. And no one can go tell the
TerminalPage that it needs to re set up the tab content again.

The Page _manually_ does this in a few places, when various pane actions are
about to take place, it'll unzoom. It would be way easier if the Tab could just
manage the content of the page.

Or if the Tab just had a Content that was observable, that when that changed,
the page would auto readjust. That does sound like a LOT of work though.
```

## Validation Steps Performed

Opened panes, closed panes, exited panes, zoomed panes, moved focus between panes, panes, panes, panes
2020-10-21 21:33:56 +00:00
..
CascadiaPackage Revert "Update to a newer MUX prerelease; remove workaround for compact sizing (#7447)" 2020-09-08 09:25:30 -07:00
inc Introduce IconConverter (#7830) 2020-10-08 11:29:04 -07:00
LocalTests_SettingsModel Implement CascadiaSettings::Copy() (#7877) 2020-10-16 15:14:11 -07:00
LocalTests_TerminalApp Fix exiting a zoomed pane (#7973) 2020-10-21 21:33:56 +00:00
PublicTerminalCore wpf: Add AutoFill to control whether the connection/buffer resizes (#7853) 2020-10-09 22:25:18 +00:00
ShellExtension Make the Shell Extension methods STDMETHODIMP (#6238) 2020-05-28 14:09:52 -07:00
TerminalApp Fix exiting a zoomed pane (#7973) 2020-10-21 21:33:56 +00:00
TerminalAzBridge Fix parallel builds by specifying the application type for WAP (#7783) 2020-09-30 13:25:50 -07:00
TerminalConnection Hook up the WIL fallback error tracer in Terminal (#7864) 2020-10-09 22:20:12 +00:00
TerminalControl Fix #5784: Key bindings won't consume dead keys (#7686) 2020-10-19 16:55:56 -07:00
TerminalCore Hash the URI as part of the hyperlink ID (#7940) 2020-10-16 22:08:59 +00:00
TerminalSettingsModel Fix exiting a zoomed pane (#7973) 2020-10-21 21:33:56 +00:00
UnitTests_TerminalCore Hash the URI as part of the hyperlink ID (#7940) 2020-10-16 22:08:59 +00:00
ut_app Add support for more OSC color formats (#7578) 2020-10-14 17:29:10 -07:00
WindowsTerminal 7124: Add focus and maximizedFocus launch modes (#7873) 2020-10-14 22:19:51 +00:00
WindowsTerminalUniversal Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00
WinRTUtils Add support for the Command Palette (#6635) 2020-06-26 20:38:02 +00:00
WpfTerminalControl wpf: fix margin calculations and resize events (#7892) 2020-10-12 18:21:11 -07:00
WpfTerminalTestNetCore/WpfTerminalTestNetCore Fix 3 different bugs in the WPF control (#6464) 2020-06-11 18:05:43 +00:00
wt Build and ship an actual binary named wt that just launches WT (#6860) 2020-07-10 22:41:37 +00:00
CascadiaResources.build.items Introduce TerminalSettingsModel project (#7667) 2020-10-06 09:56:59 -07:00