[PR #7938] Rip out the mock ObjectModel in the SUI #27033

Closed
opened 2026-01-31 09:19:36 +00:00 by claunia · 0 comments
Owner

Original Pull Request: https://github.com/microsoft/terminal/pull/7938

State: closed
Merged: No


This PR's main goal was to get rid of all our ObjectModel references and replace them with references to TSM. Unfortunately I got a little carried away and didn't stop my changes just at that. There's a lot of places in the SUI where I wasn't able to easily drop in the TSM. Usually those settings types aren't as simple as a boolean, so they'll require some templating and finessing. For those settings, I've either commented them out for now or attempted to replace them (and am currently running into some issues). These two pages are ColorSchemes.xaml and MainPage.xaml.

ColorSchemes.xaml is nearly there. It displays all your color schemes in a ComboBox, and as you select your color scheme, the color table updates. The one part I'm having trouble with currently is retrieving the Index from the ColorPicker's Tag and then updating the colortable at that index.

In MainPage.xaml, I've attempted to bind all our profiles to a subitem of the NavigationView, but it isn't working as expected and I'm currently getting some help from XamlDisc, so I've commented most of it out for now.

One thing I've added that will probably need to be used/expanded upon/tidied up is the EnumMapper. The idea is that it should be taking the JSON_ENUM_MAPPERS we've defined and putting the mappings in a WinRT type so that TSE can data bind to these enums.

Drafting it for now because in my hacking away, things are messy and probably have a lot of TODOs sprinkled, so I'm gonna go through all 80 files changed and see what I actually want to push in.

**Original Pull Request:** https://github.com/microsoft/terminal/pull/7938 **State:** closed **Merged:** No --- This PR's main goal was to get rid of all our `ObjectModel` references and replace them with references to `TSM`. Unfortunately I got a little carried away and didn't stop my changes just at that. There's a lot of places in the SUI where I wasn't able to easily drop in the TSM. Usually those settings types aren't as simple as a boolean, so they'll require some templating and finessing. For those settings, I've either commented them out for now or attempted to replace them (and am currently running into some issues). These two pages are `ColorSchemes.xaml` and `MainPage.xaml`. `ColorSchemes.xaml` is nearly there. It displays all your color schemes in a ComboBox, and as you select your color scheme, the color table updates. The one part I'm having trouble with currently is retrieving the Index from the ColorPicker's Tag and then updating the colortable at that index. In `MainPage.xaml`, I've attempted to bind all our profiles to a subitem of the `NavigationView`, but it isn't working as expected and I'm currently getting some help from XamlDisc, so I've commented most of it out for now. One thing I've added that will probably need to be used/expanded upon/tidied up is the `EnumMapper`. The idea is that it should be taking the `JSON_ENUM_MAPPERS` we've defined and putting the mappings in a WinRT type so that TSE can data bind to these enums. Drafting it for now because in my hacking away, things are messy and probably have a lot of TODOs sprinkled, so I'm gonna go through all 80 files changed and see what I actually want to push in.
claunia added the pull-request label 2026-01-31 09:19:36 +00:00
Sign in to join this conversation.
No Label pull-request
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#27033