Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Upgrade to MUX 2.8 #15078

Merged
merged 26 commits into from
Apr 3, 2023
Merged

Upgrade to MUX 2.8 #15078

merged 26 commits into from
Apr 3, 2023

Conversation

zadjii-msft
Copy link
Member

@zadjii-msft zadjii-msft commented Mar 31, 2023

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 Ensure correct .props and .targets order in nuget package microsoft-ui-xaml#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

@github-actions

This comment has been minimized.

@carlos-zamora carlos-zamora added the Needs-Second It's a PR that needs another sign-off label Apr 3, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot removed the Needs-Second It's a PR that needs another sign-off label Apr 3, 2023
@DHowett
Copy link
Member

DHowett commented Apr 3, 2023

Make sure you clean up the PR body!

@zadjii-msft
Copy link
Member Author

@DHowett Should we block while we wait on the WebView2 thing?

Copy link
Member

@DHowett DHowett left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just for a little.

@@ -8,7 +8,8 @@
<package id="Microsoft.VCRTForwarders.140" version="1.0.4" targetFramework="native" />
<package id="Microsoft.Internal.Windows.Terminal.ThemeHelpers" version="0.6.220404001" targetFramework="native" />
<package id="Microsoft.VisualStudio.Setup.Configuration.Native" version="2.3.2262" targetFramework="native" developmentDependency="true" />
<package id="Microsoft.UI.Xaml" version="2.7.3" targetFramework="native" />
<package id="Microsoft.UI.Xaml" version="2.8.2" targetFramework="native" />
<package id="Microsoft.Web.WebView2" version="1.0.1661.34" targetFramework="native" />
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO Dustin: look at the content of this package and see if we can suppress the DLL being copied in.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looked at, fixed.

@microsoft-github-policy-service microsoft-github-policy-service bot added the Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something label Apr 3, 2023
@microsoft-github-policy-service microsoft-github-policy-service bot added Issue-Bug It either shouldn't be doing this or needs an investigation. Area-Settings UI Anything specific to the SUI Priority-3 A description (P3) Product-Terminal The new Windows Terminal. labels Apr 3, 2023
@DHowett DHowett enabled auto-merge (squash) April 3, 2023 22:10
@DHowett DHowett merged commit 17cf44f into main Apr 3, 2023
@DHowett DHowett deleted the dev/migrie/b/mux-2.8.2-april-2023 branch April 3, 2023 22:40
microsoft-github-policy-service bot pushed a commit that referenced this pull request Apr 17, 2023
…15178)

TL;DR: we stopped getting `TabView.TabItemsChanged`. This meant that the
tab view would change its apparent order, but we wouldn't change the
backing tab order.

I'm fixing this by grabbing the index of the tab that starts the drag,
and the index of the tab view item at the end of the drag, and using
that to reorder our backing list.

Closes #15121

Upstream microsoft/microsoft-ui-xaml#8388

Regressed in #15078 - I'm pretty confident about this, since I've got a
1.18.931 build of the Terminal with tear-out, but not MUX 2.8.
zadjii-msft added a commit that referenced this pull request Apr 20, 2023
Set the padding to the default TabViewHeaderPadding (8,0,0,0), but with
-1 on the bottom. This prevents a small 1px gap that can appear on 150%
scale displays between the tab item and the content. The 1 on top helps
keep
the tab the correct relative height within the tab row.


Regressed in #15078 

See also MSFT:40692364
zadjii-msft added a commit that referenced this pull request Apr 24, 2023
Just changing the Theme also doesn't seem to work by itself - there
seems to be a way for the tab to set the deselected foreground onto
itself as it becomes selected. If the mouse isn't over the tab, that can
result in mismatched fg/bg's

Regressed around #15078 

Closes #15184
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area-Settings UI Anything specific to the SUI Issue-Bug It either shouldn't be doing this or needs an investigation. Needs-Author-Feedback The original author of the issue/PR needs to come back and respond to something Priority-3 A description (P3) Product-Terminal The new Windows Terminal.
Projects
None yet
4 participants