[PR #15078] [MERGED] Upgrade to MUX 2.8 #30392

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

📋 Pull Request Information

Original PR: https://github.com/microsoft/terminal/pull/15078
Author: @zadjii-msft
Created: 3/31/2023
Status: Merged
Merged: 4/3/2023
Merged by: @DHowett

Base: mainHead: dev/migrie/b/mux-2.8.2-april-2023


📝 Commits (10+)

  • 14ff89d This at least builds. Let's see what happens next
  • a9ca3da for the sake of bookmarking: Add a manual copy of the TabView style
  • c80b6f0 what the heck is going on
  • feeaa67 this is what karen said to try, but I can't even load XAML any more
  • b3de7fe Using a -prerelease at least builds and runs for now
  • 539e1cc Some failed attempts
  • 8cd4b54 Bunch of things that didn't work
  • 82f7766 shorthand
  • ed5ed76 OH SHIT ONE OF THESE CRAZY IDEAS WORKED but I have no idea which, and hovering doesn't work, but it's BETTER
  • 0a8a079 Narrow it down - this works too

📊 Changes

5 files changed (+68 additions, -38 deletions)

View changed files

build/rules/Microsoft.UI.Xaml.Additional.targets (+16 -0)
📝 dep/nuget/packages.config (+2 -1)
📝 src/cascadia/TerminalApp/TabBase.cpp (+36 -35)
📝 src/common.nugetversions.props (+3 -0)
📝 src/common.nugetversions.targets (+11 -2)

📄 Description

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


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/microsoft/terminal/pull/15078 **Author:** [@zadjii-msft](https://github.com/zadjii-msft) **Created:** 3/31/2023 **Status:** ✅ Merged **Merged:** 4/3/2023 **Merged by:** [@DHowett](https://github.com/DHowett) **Base:** `main` ← **Head:** `dev/migrie/b/mux-2.8.2-april-2023` --- ### 📝 Commits (10+) - [`14ff89d`](https://github.com/microsoft/terminal/commit/14ff89d1a8ff5332a0b9ec487856dee398c7196d) This at least builds. Let's see what happens next - [`a9ca3da`](https://github.com/microsoft/terminal/commit/a9ca3da810edc299077f058df58c970b5599d64f) for the sake of bookmarking: Add a manual copy of the TabView style - [`c80b6f0`](https://github.com/microsoft/terminal/commit/c80b6f058e57118e1c0d87bd1910e46056975c88) what the heck is going on - [`feeaa67`](https://github.com/microsoft/terminal/commit/feeaa67e8ec0f830c17dc3cc90abb53e433ff494) this is what karen said to try, but I can't even load XAML any more - [`b3de7fe`](https://github.com/microsoft/terminal/commit/b3de7febd57a1dce1fa00a0f8619056cd64eae5f) Using a -prerelease at least builds and runs for now - [`539e1cc`](https://github.com/microsoft/terminal/commit/539e1cc61786ba444f3a18c0c486f6feb7bbe1f0) Some failed attempts - [`8cd4b54`](https://github.com/microsoft/terminal/commit/8cd4b54d81df211e86b626d89251f3d3e9949f49) Bunch of things that didn't work - [`82f7766`](https://github.com/microsoft/terminal/commit/82f77667cb38ee9db39ed44981c8c656d2eb24de) shorthand - [`ed5ed76`](https://github.com/microsoft/terminal/commit/ed5ed769b99c9ae8445aff4bce441e96755148a5) OH SHIT ONE OF THESE CRAZY IDEAS WORKED but I have no idea which, and hovering doesn't work, but it's BETTER - [`0a8a079`](https://github.com/microsoft/terminal/commit/0a8a079026b846ae37298c820f1db33da9a9f591) Narrow it down - this works too ### 📊 Changes **5 files changed** (+68 additions, -38 deletions) <details> <summary>View changed files</summary> ➕ `build/rules/Microsoft.UI.Xaml.Additional.targets` (+16 -0) 📝 `dep/nuget/packages.config` (+2 -1) 📝 `src/cascadia/TerminalApp/TabBase.cpp` (+36 -35) 📝 `src/common.nugetversions.props` (+3 -0) 📝 `src/common.nugetversions.targets` (+11 -2) </details> ### 📄 Description 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 --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
claunia added the pull-request label 2026-01-31 09:40:34 +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#30392