[PR #15078] Upgrade to MUX 2.8 #30397

Open
opened 2026-01-31 09:40:35 +00:00 by claunia · 0 comments
Owner

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

State: closed
Merged: Yes


Updates the Terminal to Microsoft.UI.Xaml v2.8.

  • MUX 2.8 adds a dependency on WebView2, so we need to include that too.
  • See https://github.com/microsoft/microsoft-ui-xaml/pull/7574 for why we're adding the .props
  • The TabView thing:

    tl;dr: In >=MUX 2.7, we were updating our tab colors by doing a "Visual State Dance", as I called it. We'd manually change the TabViewItem's VisualState to one that it wasn't in, then change it back to the one it should be in. This seemingly re-applied the new values of the brushes. However in 2.8, this seemingly didn't work anymore!

    So instead, we do a "Theme Dance", like so:

      const auto& reqTheme = TabViewItem().RequestedTheme();
      TabViewItem().RequestedTheme(ElementTheme::Light);
      TabViewItem().RequestedTheme(ElementTheme::Dark);
      TabViewItem().RequestedTheme(reqTheme);
    

    This causes the ThemeResources to be re-evaluated to the new values.
    We never got to the root cause of why this seems different in 2.8. It literally makes no sense.

checklist

**Original Pull Request:** https://github.com/microsoft/terminal/pull/15078 **State:** closed **Merged:** Yes --- Updates the Terminal to Microsoft.UI.Xaml v2.8. * MUX 2.8 adds a dependency on WebView2, so we need to include that too. * See https://github.com/microsoft/microsoft-ui-xaml/pull/7574 for why we're adding the `.props` * The TabView thing: > tl;dr: In >=MUX 2.7, we were updating our tab colors by doing a "Visual State Dance", as I called it. We'd manually change the `TabViewItem`'s VisualState to one that it wasn't in, then change it back to the one it should be in. This seemingly re-applied the new values of the brushes. However in 2.8, this seemingly didn't work anymore! > > So instead, we do a "Theme Dance", like so: > ```c++ > const auto& reqTheme = TabViewItem().RequestedTheme(); > TabViewItem().RequestedTheme(ElementTheme::Light); > TabViewItem().RequestedTheme(ElementTheme::Dark); > TabViewItem().RequestedTheme(reqTheme); > ``` > This causes the `ThemeResource`s to be re-evaluated to the new values. > We never got to the root cause of why this seems different in 2.8. It literally makes no sense. ### checklist * [x] closes #13495
claunia added the pull-request label 2026-01-31 09:40:35 +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#30397