Skip to content

Commit

Permalink
Merge branch 'master' into dev/jela/fp-55
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromelaban authored Nov 16, 2024
2 parents c24eec3 + 13eea97 commit 5b60dc2
Show file tree
Hide file tree
Showing 25 changed files with 164 additions and 12 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/uwp-autoconvert.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ concurrency:
cancel-in-progress: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
UnoCheck_Version: '1.26.0-dev.63'
UnoCheck_Version: '1.27.0-dev.8'

jobs:
build:
Expand Down
2 changes: 1 addition & 1 deletion .vsts-ci-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pr:
- legacy/*

variables:
windowsScaledPool: 'Windows2022-20240421'
windowsScaledPool: 'Windows2022-20241021-1'
linuxVMImage: 'ubuntu-latest'

stages:
Expand Down
2 changes: 1 addition & 1 deletion .vsts-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ variables:
DOTNET_SKIP_FIRST_TIME_EXPERIENCE: true
windows2019HostedVMImage: 'windows-2019'
windows2022HostedVMImage: 'windows-2022'
windowsScaledPool: 'Windows2022-20240421'
windowsScaledPool: 'Windows2022-20241021-1'
linuxVMImage: 'ubuntu-latest'
linuxScaledPool: 'Ubuntu2204-20230918'
macOSVMImage: 'macOS-15'
Expand Down
4 changes: 2 additions & 2 deletions build/ci/net9/global.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "9.0.100-rc.2.24474.11",
"version": "9.0.100",
"allowPrerelease": true,
"rollForward": "disable"
},
"tools": {
"dotnet": "9.0.100-rc.2.24474.11"
"dotnet": "9.0.100"
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44",
Expand Down
2 changes: 1 addition & 1 deletion build/ci/templates/dotnet-mobile-install-linux.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
UnoCheck_Version: '1.26.0-dev.63'
UnoCheck_Version: '1.27.0-dev.8'

steps:

Expand Down
2 changes: 1 addition & 1 deletion build/ci/templates/dotnet-mobile-install-mac.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
UnoCheck_Version: '1.26.0-dev.63'
UnoCheck_Version: '1.27.0-dev.8'

steps:

Expand Down
2 changes: 1 addition & 1 deletion build/ci/templates/dotnet-mobile-install-windows.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
parameters:
UnoCheck_Version: '1.26.0-dev.63'
UnoCheck_Version: '1.27.0-dev.8'

steps:

Expand Down
5 changes: 4 additions & 1 deletion build/test-scripts/run-net7-template-linux.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,10 @@ $projects =
@(2, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @(), @()),

# 5.3 Blank with net9
@(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @(), @())
@(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @(), @()),

# 5.3 lib
@(3, "5.3/uno53net9Lib/uno53net9Lib.csproj", @(), @()),

# 5.3 blank publish testing
# Disabled for LXD setup issues
Expand Down
3 changes: 3 additions & 0 deletions build/test-scripts/run-netcore-mobile-template-tests.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -338,6 +338,9 @@ $projects =
@(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop"), @("macOS", "NetCore")),
@(3, "5.3/uno53net9blank/uno53net9blank/uno53net9blank.csproj", @("-f", "net9.0-desktop", $sdkFeatures), @("macOS", "NetCore")),

# 5.3 Library
@(3, "5.3/uno53net9Lib/uno53net9Lib.csproj", @(), @("macOS", "NetCore")),

# Default mode for the template is WindowsAppSDKSelfContained=true, which requires specifying a target platform.
@(4, "5.2/uno52AppWithLib/uno52AppWithLib/uno52AppWithLib.csproj", @("-p:Platform=x86" , "-p:TargetFramework=net8.0-windows10.0.19041"), @()),

Expand Down
2 changes: 1 addition & 1 deletion doc/import_external_docs.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Set-PSDebug -Trace 1

$external_docs = @{
# use either commit, or branch name to use its latest commit
"uno.wasm.bootstrap" = "ad639b3dbeb0234bff2d5c31c041d0438f57ea37" #latest release/stable/9.0 branch commit
"uno.wasm.bootstrap" = "3a06d1cc66c9bfabd85feb89536a3ed3ce7899e5" #latest release/stable/9.0 branch commit
"uno.themes" = "be986dc71ace7e2f5075154321dbf0a68f5d00ce" #latest release/stable/5.3 branch commit
"uno.toolkit.ui" = "490176858d99ca05a8615a11bb4da24a7c49a323" #latest release/stable/6.3 branch commit
"uno.check" = "27e686d9205654375fd2c7861c3ebe5f2ad69e93" #latest main commit
Expand Down
6 changes: 6 additions & 0 deletions src/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,12 @@
<PackageReference Update="Xamarin.UITest" Version="4.3.5" />
<PackageReference Update="Xamarin.TestCloud.Agent" Version="0.23.2" />
<PackageReference Update="System.Numerics.Vectors" Version="4.5.0" />
<PackageReference Update="System.Private.Uri" Version="4.3.2" />
<PackageReference Update="System.Net.Http" Version="4.3.4" />
<PackageReference Update="System.Text.RegularExpressions" Version="4.3.1" />
<PackageReference Update="NuGet.Packaging" Version="6.3.4" />
<PackageReference Update="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Update="System.Text.Json" Version="8.0.5" />

<PackageReference Update="SkiaSharp.Views" Version="$(SkiaSharpVersion)" />
<PackageReference Update="SkiaSharp.Views.Uno" Version="$(SkiaSharpVersion)" />
Expand Down
3 changes: 3 additions & 0 deletions src/SamplesApp/SamplesApp.Windows/SamplesApp.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1" />
<Manifest Include="$(ApplicationManifest)" />

<!-- https://github.com/NuGet/Home/issues/7344 -->
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<!--
Expand Down
6 changes: 6 additions & 0 deletions src/SolutionTemplate/5.3/uno53net9Lib/Class1.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
namespace uno52Lib;

public class Class1
{
}

8 changes: 8 additions & 0 deletions src/SolutionTemplate/5.3/uno53net9Lib/global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"sdk": {
"allowPrerelease": true
},
"msbuild-sdks": {
"Uno.Sdk.Private": "5.2.0-dev.2002"
}
}
41 changes: 41 additions & 0 deletions src/SolutionTemplate/5.3/uno53net9Lib/uno53net9Lib.csproj
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
<Project Sdk="Uno.Sdk.Private">
<PropertyGroup>
<TargetFrameworks>net9.0;net9.0-ios;net9.0-maccatalyst;net9.0-windows10.0.19041;net9.0-browserwasm;net9.0-desktop</TargetFrameworks>

<!-- Disabled for https://github.com/unoplatform/uno.check/issues/241 -->
<TargetFrameworks Condition="!$([MSBuild]::IsOSPlatform('linux'))">$(TargetFrameworks);net9.0-android</TargetFrameworks>

<!-- Disable android on msbuild .NET Framework until android 35 is supported -->
<TargetFrameworks Condition="'$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks.Replace('net9.0-android',''))</TargetFrameworks>
<TargetFrameworks Condition="'$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks.Replace('net9.0-ios',''))</TargetFrameworks>
<TargetFrameworks Condition="'$(MSBuildRuntimeType)' == 'Full'">$(TargetFrameworks.Replace('net9.0-maccatalyst',''))</TargetFrameworks>

<!-- Ensures the .xr.xml files are generated in a proper layout folder -->
<GenerateLibraryLayout>true</GenerateLibraryLayout>
<ImplicitUsings>enable</ImplicitUsings>
<Nullable>enable</Nullable>
<UnoSdkDebugging>true</UnoSdkDebugging>
<OutputType>Library</OutputType>
<TreatWarningsAsErrors>true</TreatWarningsAsErrors>
</PropertyGroup>

<ItemGroup Condition="$([MSBuild]::GetTargetPlatformIdentifier('$(TargetFramework)')) == 'windows'">
<!--
If you encounter this error message:
error NETSDK1148: A referenced assembly was compiled using a newer version of Microsoft.Windows.SDK.NET.dll.
Please update to a newer .NET SDK in order to reference this assembly.
This means that the two packages below must be aligned with the "build" version number of
the "Microsoft.Windows.SDK.BuildTools" package above, and the "revision" version number
must be the highest found in https://www.nuget.org/packages/Microsoft.Windows.SDK.NET.Ref.
-->
<!-- <FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" RuntimeFrameworkVersion="10.0.22621.28" />
<FrameworkReference Update="Microsoft.Windows.SDK.NET.Ref" TargetingPackVersion="10.0.22621.28" /> -->
</ItemGroup>
<Target Name="ValidateIsPackable"
AfterTargets="CoreCompile;Build">
<Error Text="Expected IsPackable='false', however it actually equals '$(IsPackable)'."
Condition="$(IsPackable) == 'true'" />
</Target>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,11 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.SourceGenerators.Testing.MSTest" Version="1.1.2-beta1.23578.3" Condition="'$(UNO_UWP_BUILD)'=='false'" />
<PackageReference Include="FluentAssertions" />
<PackageReference Include="CommunityToolkit.Mvvm" Condition="'$(UNO_UWP_BUILD)'=='false'" />
<PackageReference Include="NuGet.Packaging" Version="6.3.4" />
<PackageReference Include="System.Text.Json" Version="8.0.5" />
<PackageReference Include="System.Formats.Asn1" Version="8.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
<Reference Include="$(NuGetPackageRoot)\communitytoolkit.mvvm\$(CommunityToolkitMvvmVersion)\analyzers\dotnet\roslyn4.3\cs\CommunityToolkit.Mvvm.SourceGenerators.dll" Condition="'$(UNO_UWP_BUILD)'=='false'" />
</ItemGroup>

Expand Down
3 changes: 3 additions & 0 deletions src/SourceGenerators/Uno.UI.Tasks/Uno.UI.Tasks.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<PackageReference Include="Microsoft.Build.Tasks.Core" Version="15.9.20" ExcludeAssets="runtime" />
<PackageReference Include="Microsoft.Build.Utilities.Core" Version="15.9.20" ExcludeAssets="runtime" />
<PackageReference Include="Mono.Cecil" Version="0.11.4" />

<!-- https://github.com/NuGet/Home/issues/7344 -->
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
</ItemGroup>

<ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions src/Uno.Analyzers.Tests/Uno.Analyzers.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,11 @@
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="$(CodeAnalysisVersionForAnalyzersTests)" />

<PackageReference Include="Microsoft.CodeAnalysis.CSharp.CodeFix.Testing.MSTest" Version="1.1.2-beta1.23578.3" />

<PackageReference Include="NuGet.Packaging" Version="6.0.2" />
<PackageReference Include="System.Formats.Asn1" Version="6.0.1" />
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down
3 changes: 3 additions & 0 deletions src/Uno.Sdk/targets/Uno.Common.Wasm.targets
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@
<!-- Disable assets generation for libraries -->
<StaticWebAssetsEnabled Condition=" $(OutputType) != 'Exe' ">false</StaticWebAssetsEnabled>

<!-- Workaround for https://github.com/dotnet/runtime/pull/109866 -->
<IsBrowserWasmProject Condition=" $(OutputType) != 'Exe' ">false</IsBrowserWasmProject>

<IsMSALSupported>true</IsMSALSupported>

<!-- net9.0 validation of CA1418 is case sensitive -->
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,12 @@
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>

<!-- Uno workaround: On Android, the Height of ContentPresenters inside this Grid is not bing calculated correctly -->
<!-- It can be removed once this PR is merged: https://github.com/unoplatform/uno/pull/18261 -->
<android:Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</android:Grid.RowDefinitions>

<Viewbox x:Name="IconBox"
MaxWidth="{ThemeResource TabViewItemHeaderIconSize}"
MaxHeight="{ThemeResource TabViewItemHeaderIconSize}"
Expand Down
5 changes: 5 additions & 0 deletions src/Uno.UI.FluentTheme.v2/themeresources_v2.xaml
Original file line number Diff line number Diff line change
Expand Up @@ -22960,6 +22960,11 @@
<ColumnDefinition Width="*" />
<ColumnDefinition Width="Auto" />
</Grid.ColumnDefinitions>
<!-- Uno workaround: On Android, the Height of ContentPresenters inside this Grid is not bing calculated correctly -->
<!-- It can be removed once this PR is merged: https://github.com/unoplatform/uno/pull/18261 -->
<android:Grid.RowDefinitions>
<RowDefinition Height="Auto" />
</android:Grid.RowDefinitions>
<Viewbox x:Name="IconBox" MaxWidth="{ThemeResource TabViewItemHeaderIconSize}" MaxHeight="{ThemeResource TabViewItemHeaderIconSize}" Margin="{ThemeResource TabViewItemHeaderIconMargin}">
<ContentControl x:Name="IconControl" Content="{Binding RelativeSource={RelativeSource TemplatedParent}, Path=TabViewTemplateSettings.IconElement}" IsTabStop="False" Foreground="{ThemeResource TabViewItemIconForeground}" HighContrastAdjustment="None" />
</Viewbox>
Expand Down
4 changes: 2 additions & 2 deletions src/Uno.UI.RemoteControl.Host/Config/global-net9.0.json
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
{
"sdk": {
"version": "9.0.100-rc.2.24474.11",
"version": "9.0.100",
"allowPrerelease": true,
"rollForward": "latestFeature"
},
"tools": {
"dotnet": "9.0.100-rc.2.24474.11"
"dotnet": "9.0.100"
},
"msbuild-sdks": {
"MSBuild.Sdk.Extras": "3.0.44"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@
using static Uno.UI.Extensions.ViewExtensions;
using static Private.Infrastructure.TestServices;

#if __IOS__
using UIKit;
#elif __MACOS__
using AppKit;
#endif

namespace Uno.UI.RuntimeTests.Tests.Microsoft_UI_Xaml_Controls;

[TestClass]
Expand Down Expand Up @@ -155,6 +161,45 @@ public async Task When_DataBinding()
Assert.AreEqual(0, SUT.SelectedIndex);
}

#if !WINAPPSDK // GetTemplateChild is protected in UWP while public in Uno.
[TestMethod]
public async Task When_Items_Should_ShowHeader()
{
var SUT = new TabView
{
TabItems =
{
new TabViewItem { Header = "Tab 1" },
new TabViewItem { Header = "Tab 2" }
}
};

await UITestHelper.Load(SUT);

var tabviewItem1 = SUT.ContainerFromIndex(0) as TabViewItem;
var headerPresenter1 = (ContentPresenter)tabviewItem1.GetTemplateChild("ContentPresenter");
Assert.IsTrue(headerPresenter1.ActualWidth > 0, "TabViewItem header for index 0 should have a non-zero width.");
Assert.IsTrue(headerPresenter1.ActualHeight > 0, "TabViewItem header for index 0 should have a non-zero height.");

var closeButton1 = (Button)tabviewItem1.GetTemplateChild("CloseButton");

var buttonLabel1 =
#if __IOS__ || __MACOS__
closeButton1.FindFirstChild<ImplicitTextBlock>();
#else
((ContentPresenter)closeButton1.GetTemplateChild("ContentPresenter")).FindFirstChild<ImplicitTextBlock>();
#endif

Assert.IsTrue(buttonLabel1.ActualWidth > 0, "TabViewItem Button for index 0 should have a non-zero width.");
Assert.IsTrue(buttonLabel1.ActualHeight > 0, "TabViewItem Button for index 0 should have a non-zero height.");

var tabviewItem2 = SUT.ContainerFromIndex(1) as TabViewItem;
var headerPresenter2 = (ContentPresenter)tabviewItem2.GetTemplateChild("ContentPresenter");
Assert.IsTrue(headerPresenter2.ActualWidth > 0, "TabViewItem header for index 1 should have a non-zero width.");
Assert.IsTrue(headerPresenter2.ActualHeight > 0, "TabViewItem header for index 1 should have a non-zero height.");
}
#endif

[TestMethod]
public async Task When_SelectedItem_Changed_Binding()
{
Expand Down
5 changes: 5 additions & 0 deletions src/Uno.UI.RuntimeTests/Uno.UI.RuntimeTests.Windows.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,11 @@
<PackageReference Include="Microsoft.WindowsAppSDK" Version="1.6.240829007" />
<PackageReference Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.26100.1" />

<!-- https://github.com/NuGet/Home/issues/7344 -->
<PackageReference Include="System.Private.Uri" Version="4.3.2" />
<!-- https://github.com/NuGet/Home/issues/7344 -->
<PackageReference Include="System.Net.Http" Version="4.3.4" />

<!-- We remove Unit tests imported from MUX on UAP as they are usualy heavily relying on internal classes.-->
<Compile Remove="$(MSBuildThisFileDirectory)MUX\Microsoft_UI_XAML_Controls\**\*.cs" />
</ItemGroup>
Expand Down
5 changes: 5 additions & 0 deletions src/Uno.UI.Tests/Uno.UI.Unit.Tests.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,11 @@
<PackageReference Include="FluentAssertions" />
<PackageReference Include="Moq" Version="4.17.2" />
<PackageReference Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.0-dev.7" PrivateAssets="all" />

<!-- https://github.com/NuGet/Home/issues/7344 -->
<PackageReference Include="System.Net.Http" Version="4.3.4" />
<!-- https://github.com/NuGet/Home/issues/7344 -->
<PackageReference Include="System.Text.RegularExpressions" Version="4.3.1" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 5b60dc2

Please sign in to comment.