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 Microsoft.UI.Xaml 2.2 #3027

Merged
merged 8 commits into from Oct 15, 2019
Merged

Upgrade to Microsoft.UI.Xaml 2.2 #3027

merged 8 commits into from Oct 15, 2019

Conversation

DHowett-MSFT
Copy link
Contributor

@DHowett-MSFT DHowett-MSFT commented Oct 2, 2019

This pull request introduces the code changes required to move to MUX 2.2
final.

  • We had to move to the final API:
    • Items -> TabItems
    • Items.VectorChanged -> TabItemsChanged
    • TabClose -> TabCloseRequested
    • TabViewItem.Icon -> TabViewItem.IconSource
  • TabRowControl has been converted to a ContentPresenter, which
    simplifies its logic a little bit.
  • TerminalPage now differentiates MUX and WUX a little better
  • Because of the change from Icon to IconSource in TabViewItem,
    Utils::GetColoredIcon needed to be augmented to support MUX IconSources.
    It was still necessary to use for WUX, so it's been templatized.
  • I moved us from WUX SplitButton to MUX SplitButton and brought the
    style in line with the one typically provided by TabView.
  • Some of our local controls have had their backgrounds removed so
    they're more amenable to being placed on other surfaces.
  • I'm suppressing the TabView's padding.
  • I removed a number of apparently dead methods from App.
  • I've simplified the dragbar's sizing logic and eventing.
  • The winmd harvester needed to be taught to not try to copy winmds for framework packages.

PR Checklist

Validation Steps Performed

It's tabs, and they do a good. I tried them all.

image

image

image

image

image

References

This commit introduces the code changes required to move to MUX 2.2
final.

* We had to move to the final API:
   * Items -> TabItems
   * Items.VectorChanged -> TabItemsChanged
   * TabClose -> TabCloseRequested
   * TabViewItem.Icon -> TabViewItem.IconSource
* TabRowControl has been converted to a ContentPresenter, which
  simplifies its logic a little bit.
* TerminalPage now differentiates MUX and WUX a little better
* Because of the change from Icon to IconSource in TabViewItem,
  Utils::GetColoredIcon needed to be augmented to support MUX IconSources.
  It was still necessary to use for WUX, so it's been templatized.
* I moved us from WUX SplitButton to MUX SplitButton and brought the
  style in line with the one typically provided by TabView.
* Some of our local controls have had their backgrounds removed so
  they're more amenable to being placed on other surfaces.
* I'm suppressing the TabView's padding.
* I removed a number of apparently dead methods from App.
* I've simplified the dragbar's sizing logic and eventing.
@DHowett-MSFT
Copy link
Contributor Author

KNOWN ISSUES

  • The terminal will immediately crash on launch because an initialization order change made it so we try to init at 0x0
  • The tab view will only get smaller when resized, it will never get larger. It'll snap to the right size when a tab is added/removed.

feedbackFlyout.Text(_resourceLoader->GetLocalizedString(L"FeedbackMenuItem"));

Controls::FontIcon feedbackIco{};
WUX::Controls::FontIcon feedbackIco{};
Copy link
Member

Choose a reason for hiding this comment

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

While you're here, mind changing the name to feedbackIcon? :)

src/cascadia/TerminalApp/TitlebarControl.idl Show resolved Hide resolved
@@ -16,33 +16,3 @@ std::wstring GetWstringFromJson(const Json::Value& json)
{
Copy link
Member

Choose a reason for hiding this comment

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

Since we just moved GetColoredIcon() to the header file, why not move this one too? One less file to worry about.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i don't hate it. I'd prefer to do that in a separate PR (and make it templatable :P)

carlos-zamora
carlos-zamora previously approved these changes Oct 2, 2019
@zadjii-msft
Copy link
Member

I'd argue that #597 is not closed by this PR - we still need to add some settings to control that. However, now we can add those settings.

@DHowett-MSFT
Copy link
Contributor Author

I'd argue that #597 is not closed by this PR - we still need to add some settings to control that. However, now we can add those settings.

Good call -- yoink it from my desc'n plz 😄

Copy link
Member

@zadjii-msft zadjii-msft left a comment

Choose a reason for hiding this comment

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

re: known issues:

  • How bad is this crashing? How frequently/under what circumstances? Do we have LOS on a root cause? I'd rather not add a totally unknown crash, even if the rest of this PR is goodness.
  • Presumably the tab sizing one is an upstream issue - anything we can do to mitigate in the meantime? Can we link the upstream issue here/somewhere?

@@ -339,4 +339,12 @@
</ItemGroup>
</Target>

<Import Project="..\..\..\packages\Microsoft.UI.Xaml.2.2.190917002\build\native\Microsoft.UI.Xaml.targets" Condition="Exists('..\..\..\packages\Microsoft.UI.Xaml.2.2.190917002\build\native\Microsoft.UI.Xaml.targets')" />
Copy link
Member

Choose a reason for hiding this comment

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

These ^M's look erroneous...

Copy link
Contributor Author

Choose a reason for hiding this comment

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

oops thanks

<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
</PropertyGroup>
<Error Condition="!Exists('..\..\..\packages\Microsoft.UI.Xaml.2.2.190917002\build\native\Microsoft.UI.Xaml.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\..\..\packages\Microsoft.UI.Xaml.2.2.190917002\build\native\Microsoft.UI.Xaml.targets'))" />
</Target>
Copy link
Member

Choose a reason for hiding this comment

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

Also wait why was this added to the packaging project?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

ugh, this is so annoying. this is how the framework pkg dep gets into the appxmanifest

Copy link
Contributor Author

Choose a reason for hiding this comment

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

i'll comment it


// When the size of the titlebar content changes, we want to make sure to
// update the size of the drag region as well.
const auto fwe = content.try_as<winrt::Windows::UI::Xaml::FrameworkElement>();
Copy link
Member

Choose a reason for hiding this comment

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

Why was this safe to remove?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

we had 3 places where we were registering "drag bar size changed" on three different things; all we really need is the one on the real drag bar space.

@DHowett-MSFT
Copy link
Contributor Author

Crashing: 100% of the time all the time

@cinnamon-msft
Copy link
Contributor

KNOWN ISSUES

  • The terminal will immediately crash on launch because an initialization order change made it so we try to init at 0x0

Do we have a way to fix this asap?

@DHowett-MSFT
Copy link
Contributor Author

I have LOS on why it's happening, but i hate my hack fix for it (defer init until first resize)

@DHowett-MSFT
Copy link
Contributor Author

/azp run

@azure-pipelines
Copy link

Pull request contains merge conflicts.

@DHowett-MSFT
Copy link
Contributor Author

Oh. Derp.

@miniksa
Copy link
Member

miniksa commented Oct 3, 2019

Crashing: 100% of the time all the time

I'm not OK taking it until this is resolved one way or another.

Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

This looks fine to me, but I don't want to sign-off while it 100% crashes.

@DHowett-MSFT
Copy link
Contributor Author

Yes, merging it would be dangerous for our community.

@DHowett-MSFT
Copy link
Contributor Author

The crash no longer abides.

@carlos-zamora
Copy link
Member

@DHowett-MSFT What's the deal with x86 failing?

@DHowett-MSFT
Copy link
Contributor Author

Who even knows!

Copy link
Member

@miniksa miniksa left a comment

Choose a reason for hiding this comment

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

The crash no longer abides.

I'm now fine with this.

@DHowett-MSFT
Copy link
Contributor Author

I'm not yet ready to merge this -- I want to make sure the local test infrastructure still works.

@DHowett-MSFT
Copy link
Contributor Author

The local tests are reported broken in an e-mail from @zadjii-msft to the TAEF team; i have not regressed them.

@ghost
Copy link

ghost commented Oct 23, 2019

🎉Windows Terminal Preview v0.6.2951.0 has been released which incorporates this pull request.:tada:

Handy links:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs-Second It's a PR that needs another sign-off
Projects
None yet
6 participants