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

Shadow container (backport #638) #703

Merged
merged 17 commits into from
Aug 19, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion build/workflow/scripts/android-uitest-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export UNO_UITEST_SCREENSHOT_PATH=$BASE_ARTIFACTS_PATH/screenshots
export UNO_UITEST_ANDROIDAPK_PATH=$BUILD_SOURCESDIRECTORY/build/$SAMPLEAPP_ARTIFACT_NAME/$SAMPLEAPP_PACKAGE_NAME-Signed.apk
export UNO_UITEST_PROJECT=$BUILD_SOURCESDIRECTORY/src/Uno.Toolkit.UITest/Uno.Toolkit.UITest.csproj
export UNO_UITEST_ANDROID_PROJECT=$BUILD_SOURCESDIRECTORY/samples/$SAMPLE_PROJECT_NAME/$SAMPLE_PROJECT_NAME.Droid/$SAMPLE_PROJECT_NAME.Droid.csproj
export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/build/toolkit-uitest-binaries/Uno.Toolkit.UITest.dll
export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/build/toolkit-uitest-binaries-$XAML_FLAVOR_BUILD/Uno.Toolkit.UITest.dll
export UNO_UITEST_NUNIT_VERSION=$NUNIT_VERSION
export UNO_UITEST_NUGET_URL=https://dist.nuget.org/win-x86-commandline/v5.7.0/nuget.exe
export UNO_EMULATOR_INSTALLED=$BUILD_SOURCESDIRECTORY/build/.emulator_started
Expand Down
2 changes: 1 addition & 1 deletion build/workflow/scripts/ios-uitest-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ export UNO_UITEST_SCREENSHOT_PATH=$BASE_ARTIFACTS_PATH/screenshots
export UNO_UITEST_PROJECT=$BUILD_SOURCESDIRECTORY/src/Uno.Toolkit.UITest/Uno.Toolkit.UITest.csproj
export UNO_UITEST_LOGFILE=$UNO_UITEST_SCREENSHOT_PATH/nunit-log.txt
export UNO_UITEST_IOS_PROJECT=$BUILD_SOURCESDIRECTORY/samples/$SAMPLE_PROJECT_NAME/$SAMPLE_PROJECT_NAME.iOS/$SAMPLE_PROJECT_NAME.iOS.csproj
export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/build/toolkit-uitest-binaries/Uno.Toolkit.UITest.dll
export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/build/toolkit-uitest-binaries-$XAML_FLAVOR_BUILD/Uno.Toolkit.UITest.dll
export UNO_UITEST_NUNIT_VERSION=3.12.0
export UNO_UITEST_NUGET_URL=https://dist.nuget.org/win-x86-commandline/v5.7.0/nuget.exe
export UNO_ORIGINAL_TEST_RESULTS=$BUILD_SOURCESDIRECTORY/build/$UNO_TEST_RESULTS_FILE_NAME
Expand Down
8 changes: 4 additions & 4 deletions build/workflow/scripts/wasm-uitest-run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ fi

cd $BUILD_SOURCESDIRECTORY/build/$SAMPLEAPP_ARTIFACT_NAME

npm i chromedriver@86.0.0
npm i puppeteer@5.3.1
npm i chromedriver@102.0.0
npm i puppeteer@14.1.0

# install dotnet serve / Remove as needed
dotnet tool uninstall dotnet-serve -g || true
Expand All @@ -27,12 +27,12 @@ export PATH="$PATH:$BUILD_SOURCESDIRECTORY/build/tools"
export BASE_ARTIFACTS_PATH=$BUILD_ARTIFACTSTAGINGDIRECTORY/wasm/$XAML_FLAVOR_BUILD/$UITEST_TEST_MODE_NAME
export UNO_UITEST_TARGETURI=http://localhost:5000
export UNO_UITEST_DRIVERPATH_CHROME=$BUILD_SOURCESDIRECTORY/build/$SAMPLEAPP_ARTIFACT_NAME/node_modules/chromedriver/lib/chromedriver
export UNO_UITEST_CHROME_BINARY_PATH=$BUILD_SOURCESDIRECTORY/build/$SAMPLEAPP_ARTIFACT_NAME/node_modules/puppeteer/.local-chromium/linux-800071/chrome-linux/chrome
export UNO_UITEST_CHROME_BINARY_PATH=$BUILD_SOURCESDIRECTORY/build/$SAMPLEAPP_ARTIFACT_NAME/node_modules/puppeteer/.local-chromium/linux-991974/chrome-linux/chrome
export UNO_UITEST_SCREENSHOT_PATH=$BASE_ARTIFACTS_PATH/screenshots
export UNO_UITEST_PLATFORM=Browser
export UNO_UITEST_CHROME_CONTAINER_MODE=true
export UNO_UITEST_PROJECT=$BUILD_SOURCESDIRECTORY/src/Uno.Toolkit.UITest/Uno.Toolkit.UITest.csproj
export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/build/toolkit-uitest-binaries/Uno.Toolkit.UITest.dll
export UNO_UITEST_BINARY=$BUILD_SOURCESDIRECTORY/build/toolkit-uitest-binaries-$XAML_FLAVOR_BUILD/Uno.Toolkit.UITest.dll
export UNO_UITEST_LOGFILE=$BASE_ARTIFACTS_PATH/nunit-log.txt
export UNO_UITEST_WASM_PROJECT=$BUILD_SOURCESDIRECTORY/samples/$SAMPLE_PROJECT_NAME/$SAMPLE_PROJECT_NAME.Wasm/$SAMPLE_PROJECT_NAME.Wasm.csproj
export UNO_UITEST_WASM_OUTPUT_PATH=$BUILD_SOURCESDIRECTORY/samples/$SAMPLE_PROJECT_NAME/$SAMPLE_PROJECT_NAME.Wasm/bin/Release/net5.0/dist/
Expand Down
2 changes: 1 addition & 1 deletion build/workflow/stage-uitests-android.yml
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@
- task: DownloadBuildArtifacts@0
displayName: 'Download UITest Binaries'
inputs:
artifactName: toolkit-uitest-binaries
artifactName: toolkit-uitest-binaries-$(XAML_FLAVOR_BUILD)
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/dotnet-workload-install-mac.yml
Expand Down
12 changes: 10 additions & 2 deletions build/workflow/stage-uitests-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@ jobs:
- job: Toolkit_UITests_Build
displayName: 'Build Toolkit UI Tests'

strategy:
maxParallel: 2
matrix:
UWP:
XAML_FLAVOR_BUILD: UWP
WinUI:
XAML_FLAVOR_BUILD: WinUI

variables:
CI_Build: true

Expand All @@ -18,7 +26,7 @@ jobs:
displayName: 'Build UI Tests'
inputs:
solution: src/Uno.Toolkit.UITest/Uno.Toolkit.UITest.csproj
msbuildArguments: /r /m /p:Configuration=Release /detailedsummary /m /bl:$(build.artifactstagingdirectory)\build.binlog
msbuildArguments: /r /m /p:Configuration=Release /p:FrameworkLineage=$(XAML_FLAVOR_BUILD) /detailedsummary /m /bl:$(build.artifactstagingdirectory)\build.binlog

- task: CopyFiles@2
displayName: 'Publish UITest binaries'
Expand All @@ -34,5 +42,5 @@ jobs:
retryCountOnTaskFailure: 3
inputs:
PathtoPublish: $(build.artifactstagingdirectory)
ArtifactName: toolkit-uitest-binaries
ArtifactName: toolkit-uitest-binaries-$(XAML_FLAVOR_BUILD)
ArtifactType: Container
2 changes: 1 addition & 1 deletion build/workflow/stage-uitests-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@
- task: DownloadBuildArtifacts@0
displayName: 'Download UITest Binaries'
inputs:
artifactName: toolkit-uitest-binaries
artifactName: toolkit-uitest-binaries-$(XAML_FLAVOR_BUILD)
downloadPath: '$(build.sourcesdirectory)/build'

- template: templates/dotnet-workload-install-mac.yml
Expand Down
2 changes: 1 addition & 1 deletion build/workflow/stage-uitests-wasm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@
- task: DownloadBuildArtifacts@0
displayName: 'Download UITest Binaries'
inputs:
artifactName: toolkit-uitest-binaries
artifactName: toolkit-uitest-binaries-$(XAML_FLAVOR_BUILD)
downloadPath: '$(build.sourcesdirectory)/build'

- task: UseDotNet@2
Expand Down
6 changes: 3 additions & 3 deletions build/workflow/templates/dotnet-workload-install-mac.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
DotNetVersion: '6.0.401'
UnoCheck_Version: '1.5.4'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/34b1a60f5c1c51604b47362781969dde46979fd5/manifests/uno.ui.manifest.json'
DotNetVersion: '7.0.306'
UnoCheck_Version: '1.13.0'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/c3b289d7bb16a2a2df7f7f7f848d76fe1e74036d/manifests/uno.ui.manifest.json'
Dotnet_Root: '/usr/local/share/dotnet/'
Dotnet_Tools: '~/.dotnet/tools'

Expand Down
6 changes: 3 additions & 3 deletions build/workflow/templates/dotnet-workload-install-windows.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
parameters:
DotNetVersion: '6.0.401'
UnoCheck_Version: '1.5.4'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/34b1a60f5c1c51604b47362781969dde46979fd5/manifests/uno.ui.manifest.json'
DotNetVersion: '7.0.306'
UnoCheck_Version: '1.13.0'
UnoCheck_Manifest: 'https://raw.githubusercontent.com/unoplatform/uno.check/c3b289d7bb16a2a2df7f7f7f848d76fe1e74036d/manifests/uno.ui.manifest.json'

steps:

Expand Down
Binary file added doc/assets/shadows-colors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 2 additions & 1 deletion doc/controls-styles.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,9 @@ The `Uno.Toolkit.UI` library adds the following controls:
- [`DrawerControl`](controls/DrawerControl.md): A container to display additional content, in a hidden pane that can be revealed using a swipe gesture, like a drawer.
- [`DrawerFlyoutPresenter`](controls/DrawerFlyoutPresenter.md): A specialized `ContentPresenter` to be used in the template of a `FlyoutPresenter` to enable gesture support.
- [`LoadingView`](controls/LoadingView.md): A control that indicates that the UI is waiting on a task to complete.
- [`TabBar` and `TabBarItem`](controls/TabBarAndTabBarItem.md): A list of selectable items that can be used to facilitate lateral navigation within an application.
- [`NavigationBar`](controls/NavigationBar.md): A custom control that helps implement navigation logic for your application.
- [`ShadowContainer`](controls/ShadowContainer.md): A content control allowing you to add multiple shadows to your content.
- [`TabBar` and `TabBarItem`](controls/TabBarAndTabBarItem.md): A list of selectable items that can be used to facilitate lateral navigation within an application.

## Helpers
The `Uno.Toolkit.UI` library adds the following helper classes:
Expand Down
11 changes: 5 additions & 6 deletions samples/Directory.Packages.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,11 @@
<PackageVersion Include="Microsoft.UI.Xaml" Version="2.8.5" />
<PackageVersion Include="Microsoft.Windows.Compatibility" Version="5.0.1" />
<PackageVersion Include="Microsoft.Windows.SDK.BuildTools" Version="10.0.22621.755" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.1.0" />
<PackageVersion Include="SkiaSharp.Skottie" Version="2.88.2" />
<PackageVersion Include="SkiaSharp.Views" Version="2.80.2" />
<PackageVersion Include="SkiaSharp.Views.Uno" Version="2.88.2" />
<PackageVersion Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.2" />
<PackageVersion Include="Microsoft.WindowsAppSDK" Version="1.1.5" />
<PackageVersion Include="SkiaSharp.Skottie" Version="2.88.4-preview.84" />
<PackageVersion Include="SkiaSharp.Views" Version="2.88.4-preview.84" />
<PackageVersion Include="SkiaSharp.Views.Uno" Version="2.88.4-preview.84" />
<PackageVersion Include="SkiaSharp.Views.Uno.WinUI" Version="2.88.4-preview.84" />
<PackageVersion Include="Uno.Core.Extensions.Compatibility" Version="4.0.1" />
<PackageVersion Include="Uno.Core.Extensions.Logging.Singleton" Version="4.0.1" />
<PackageVersion Include="Uno.Cupertino" Version="2.7.0-dev.102" />
Expand Down Expand Up @@ -48,7 +48,6 @@
<PackageVersion Include="Xamarin.AndroidX.Lifecycle.LiveData" Version="2.3.1.1" />
<PackageVersion Include="Xamarin.Jetbrains.Annotations" Version="23.0.0.4" />
<PackageVersion Include="Xamarin.TestCloud.Agent" Version="0.23.0" />
<PackageVersion Include="Microsoft.Net.Compilers.Toolset" Version="4.5.0-2.final" />
<PackageVersion Include="Microsoft.CodeAnalysis.NetAnalyzers" Version="7.0.0-preview1.22518.1" />
</ItemGroup>
</Project>
7 changes: 7 additions & 0 deletions samples/Uno.Toolkit.Samples/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<Project ToolsVersion="15.0">
<Import Project="$([MSBuild]::GetPathOfFileAbove('Directory.Build.props', '$(MSBuildThisFileDirectory)../'))" />

<PropertyGroup>
<FrameworkLineage>UWP</FrameworkLineage>
</PropertyGroup>
</Project>
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,11 @@ private void AddNavigationItems(MUXC.NavigationView nv)
.OrderByDescending(x => x.SortOrder.HasValue)
.ThenBy(x => x.SortOrder)
.ThenBy(x => x.Title)
.GroupBy(x => x.Category);
.GroupBy(x => x.Category)
#if !DEBUG
.Where(x => x.Key != SampleCategory.Tests)
#endif
;

foreach (var category in categories.OrderBy(x => x.Key))
{
Expand Down
Loading