Currently, Tab is a regular C++ class. This gives us some annoying headaches when trying to tie Tabs to the UI. For example, as described in #2740, TerminalPage keeps track of two separate vectors of Tab that need to be kept in sync. There's one vector of TabViewItems specifically used by the TabView and another vector of <shared_ptr<Tab>>. Updating one requires an update on the other one.
This could be avoided by using an observable vector of Tab that's bound to the XAML control. However, this requires Tab to be converted to a WinRT class. This would also make future attempts to use Tab in XAML controls much easier. (such as in #1502)
EDIT: as of #4350, Tab has been converted into a WinRT type, and TerminalPage::_tabs has been converted to an IObservableVector. What's left is to bind TerminalPage's TabView to that vector.
(minor warning callout to @mkitzan as well: he requested this on a recent code review, and we're officially booking team work on it. :smile:)
I'm yanking triage and scoping it into 1912. :smile:
Closing because we actually need access to the TabViewItem to perform some of our custom modifications like tab color and tab title boxes (and maybe future modifications), and so letting us have total control of our TabViewItems is needed, so this in fact _is the way_
Most helpful comment
(minor warning callout to @mkitzan as well: he requested this on a recent code review, and we're officially booking team work on it. :smile:)