Skip to content

Commit 2d6bce1

Browse files
authored
Merge branch 'main' into marquee/pausing
2 parents b18b67d + b094c4c commit 2d6bce1

File tree

54 files changed

+2448
-75
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

54 files changed

+2448
-75
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"isRoot": true,
44
"tools": {
55
"uno.check": {
6-
"version": "1.27.4",
6+
"version": "1.33.1",
77
"commands": [
88
"uno-check"
99
]
1010
},
1111
"xamlstyler.console": {
12-
"version": "3.2206.4",
12+
"version": "3.2501.8",
1313
"commands": [
1414
"xstyler"
1515
]

.github/workflows/build.yml

Lines changed: 38 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,16 @@ on:
99
# Triggers the workflow on push or pull request events but only for the main branch
1010
push:
1111
branches: [ main ]
12-
tags: [ 'release/weekly/*' ]
12+
tags: [ 'release/weekly/**' ]
1313
pull_request:
1414
branches: [ main ]
1515

16+
# Triggers on release publication (including automated weekly releases)
17+
# Note: Tag events don't trigger from GitHub Actions, but release events do
18+
# This allows scheduled-releases.yml to trigger builds via gh release create
19+
release:
20+
types: [published]
21+
1622
# Allows you to run this workflow manually from the Actions tab
1723
workflow_dispatch:
1824
merge_group:
@@ -30,16 +36,10 @@ env:
3036
jobs:
3137
# This workflow contains a single job called "Xaml-Style-Check"
3238
Xaml-Style-Check:
33-
runs-on: windows-latest
39+
runs-on: windows-2022
3440

3541
# Steps represent a sequence of tasks that will be executed as part of the job
3642
steps:
37-
# .NET 6 SDK is required for xamlstyler.console to run.
38-
- name: Install .NET SDK v6
39-
uses: actions/setup-dotnet@v4
40-
with:
41-
dotnet-version: 6.0.x
42-
4343
- name: Install .NET SDK v${{ env.DOTNET_VERSION }}
4444
uses: actions/setup-dotnet@v4
4545
with:
@@ -64,7 +64,7 @@ jobs:
6464
# Build both Uno.UI/WinUI2/UWP and Uno.WinUI/WinUI3/WindowsAppSDK versions of our packages using a matrix
6565
build:
6666
needs: [Xaml-Style-Check]
67-
runs-on: windows-latest-large
67+
runs-on: windows-2022
6868

6969
# See https://docs.github.com/actions/using-jobs/using-a-matrix-for-your-jobs
7070
strategy:
@@ -82,10 +82,26 @@ jobs:
8282

8383
env:
8484
MULTI_TARGET_DIRECTORY: tooling/MultiTarget
85-
VERSION_PROPERTY: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
85+
VERSION_PROPERTY: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/') || startsWith(github.ref, 'refs/tags/release/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
8686

8787
# Steps represent a sequence of tasks that will be executed as part of the job
8888
steps:
89+
# Filter release events to only process weekly releases
90+
# Note: Release events don't support pattern filtering, so we filter manually
91+
# This allows both manual releases and automated weekly releases to trigger builds
92+
- name: Filter release events
93+
if: github.event_name == 'release'
94+
id: filter-release
95+
run: |
96+
$tagName = "${{ github.event.release.tag_name }}"
97+
if ($tagName -match "^release/weekly/") {
98+
Write-Host "Matched weekly release tag: $tagName"
99+
exit 0
100+
} else {
101+
Write-Host "Tag does not match weekly pattern: $tagName - skipping build"
102+
exit 1
103+
}
104+
89105
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
90106
- name: Checkout Repository
91107
uses: actions/checkout@v4
@@ -155,6 +171,7 @@ jobs:
155171
--skip wsl
156172
--skip androidemulator
157173
--skip vswinworkloads
174+
--skip vswin
158175
--verbose
159176
160177
- name: Add msbuild to PATH
@@ -242,15 +259,15 @@ jobs:
242259
dotnet-dump analyze ${{ steps.filter.outputs.dump_files }} -c "clrstack" -c "pe -lines" -c "exit"
243260
244261
package:
245-
runs-on: windows-latest-large
262+
runs-on: windows-2022
246263
needs: [build]
247264
strategy:
248265
fail-fast: false # prevent one matrix pipeline from being cancelled if one fails, we want them all to run to completion.
249266
matrix:
250267
winui: [0, 2, 3]
251268

252269
env:
253-
VERSION_PROPERTY: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
270+
VERSION_PROPERTY: ${{ (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/rel/') || startsWith(github.ref, 'refs/tags/release/')) && format('build.{0}', github.run_number) || format('pull-{0}.{1}', github.event.number, github.run_number) }}
254271

255272
steps:
256273
- name: Install .NET SDK v${{ env.DOTNET_VERSION }}
@@ -271,9 +288,11 @@ jobs:
271288
fetch-depth: 0
272289
fetch-tags: true
273290

274-
- name: Format Date/Time of Commit for Package Version
291+
- name: Format Date/Time for Package Version (Tag builds only)
292+
if: ${{ startsWith(github.ref, 'refs/tags/') }}
275293
run: |
276-
echo "VERSION_DATE=$(git log -1 --format=%cd --date=format:%y%m%d)" >> $env:GITHUB_ENV
294+
$dateString = "${{ github.ref }}" -replace '^refs/tags/release/weekly/', ''
295+
echo "VERSION_DATE=$dateString" >> $env:GITHUB_ENV
277296
278297
- name: Restore dotnet tools
279298
run: dotnet tool restore
@@ -287,6 +306,7 @@ jobs:
287306
--skip wsl
288307
--skip androidemulator
289308
--skip vswinworkloads
309+
--skip vswin
290310
--verbose
291311
292312
- name: Add msbuild to PATH
@@ -314,7 +334,7 @@ jobs:
314334
# Build and pack component nupkg
315335
- name: Build and pack component packages
316336
if: ${{ env.HAS_BUILDABLE_COMPONENTS == 'true' }}
317-
run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -Components ${{ env.CHANGED_COMPONENTS_LIST }} -WinUIMajorVersion ${{ matrix.winui }} -DateForVersion ${{ env.VERSION_DATE }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release
337+
run: ./tooling/Build-Toolkit-Components.ps1 -MultiTargets all -Components ${{ env.CHANGED_COMPONENTS_LIST }} -WinUIMajorVersion ${{ matrix.winui }} ${{ env.VERSION_DATE != '' && format('-DateForVersion {0}', env.VERSION_DATE) || '' }} ${{ env.VERSION_PROPERTY != '' && format('-PreviewVersion "{0}"', env.VERSION_PROPERTY) || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-EnableBinlogs' || '' }} ${{ env.ENABLE_DIAGNOSTICS == 'true' && '-Verbose' || '' }} -BinlogOutput ./ -NupkgOutput ./ -Release
318338

319339
- name: Validate package names
320340
if: ${{ env.VERSION_PROPERTY != '' && env.HAS_BUILDABLE_COMPONENTS == 'true' }}
@@ -366,14 +386,14 @@ jobs:
366386
sign:
367387
needs: [package]
368388
if: ${{ startsWith(github.ref, 'refs/heads/rel/') || startsWith(github.ref, 'refs/tags/') }}
369-
runs-on: windows-latest
389+
runs-on: windows-2022
370390
permissions:
371391
id-token: write # Required for requesting the JWT
372392

373393
strategy:
374394
fail-fast: false # prevent one matrix pipeline from being cancelled if one fails, we want them both to run to completion.
375395
matrix:
376-
winui: [2, 3]
396+
winui: [0, 2, 3]
377397

378398
steps:
379399
- name: Install .NET SDK v${{ env.DOTNET_VERSION }}
@@ -438,7 +458,7 @@ jobs:
438458
strategy:
439459
fail-fast: false # prevent one matrix pipeline from being cancelled if one fails, we want them both to run to completion.
440460
matrix:
441-
winui: [2, 3]
461+
winui: [0, 2, 3]
442462

443463
steps:
444464
- name: Install .NET SDK v${{ env.DOTNET_VERSION }}

.github/workflows/scheduled-releases.yml

Lines changed: 0 additions & 37 deletions
This file was deleted.
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
@ECHO OFF
2+
3+
powershell ..\..\tooling\ProjectHeads\GenerateSingleSampleHeads.ps1 -componentPath %CD% %*
214 KB
Loading
18.2 KB
Loading
149 KB
Loading
2.16 KB
Loading
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
<Project>
2+
<Import Project="$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))" Condition="Exists('$([MSBuild]::GetPathOfFileAbove(Directory.Build.props))')" />
3+
4+
<PropertyGroup>
5+
<ToolkitComponentName>ColorAnalyzer</ToolkitComponentName>
6+
</PropertyGroup>
7+
8+
<!-- Sets this up as a toolkit component's sample project -->
9+
<Import Project="$(ToolingDirectory)\ToolkitComponent.SampleProject.props" />
10+
<ItemGroup>
11+
<Content Include="Assets\StockImages\Flowers.jpg">
12+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
13+
</Content>
14+
<Content Include="Assets\StockImages\Headphones.jpg">
15+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
16+
</Content>
17+
<Content Include="Assets\StockImages\Paint.jpg">
18+
<CopyToOutputDirectory>PreserveNewest</CopyToOutputDirectory>
19+
</Content>
20+
</ItemGroup>
21+
</Project>
Lines changed: 113 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,113 @@
1+
<!-- Licensed to the .NET Foundation under one or more agreements. The .NET Foundation licenses this file to you under the MIT license. See the LICENSE file in the project root for more information. -->
2+
<local:ColorPaletteSamplerToolkitSampleBase x:Class="ColorAnalyzerExperiment.Samples.AccentColorSample"
3+
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
4+
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
5+
xmlns:behaviors="using:CommunityToolkit.WinUI.Behaviors"
6+
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
7+
xmlns:helpers="using:CommunityToolkit.WinUI.Helpers"
8+
xmlns:interactivity="using:Microsoft.Xaml.Interactivity"
9+
xmlns:local="using:ColorAnalyzerExperiment.Samples"
10+
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
11+
mc:Ignorable="d">
12+
13+
<local:ColorPaletteSamplerToolkitSampleBase.Resources>
14+
<helpers:ColorPaletteSampler x:Name="ColorPaletteSampler"
15+
Source="{x:Bind SampledImage}">
16+
<helpers:AccentColorPaletteSelector x:Name="AccentPalette"
17+
MinColorCount="3" />
18+
</helpers:ColorPaletteSampler>
19+
</local:ColorPaletteSamplerToolkitSampleBase.Resources>
20+
21+
<!--
22+
ConstrastHelper is used in this sample to auto-adjust text Foreground to ensure
23+
readability against dynamic background. This is not the ContrastHelper sample.
24+
(though it is a fantastic example use case for it!)
25+
-->
26+
<Grid Margin="20">
27+
<Grid.ColumnDefinitions>
28+
<ColumnDefinition Width="*" />
29+
<ColumnDefinition Width="*" />
30+
</Grid.ColumnDefinitions>
31+
32+
<Grid Margin="20"
33+
VerticalAlignment="Center">
34+
<Image x:Name="SampledImage"
35+
HorizontalAlignment="Center"
36+
Source="{x:Bind SelectedImage, Mode=OneWay}"
37+
Stretch="Uniform">
38+
<interactivity:Interaction.Behaviors>
39+
<interactivity:EventTriggerBehavior EventName="ImageOpened">
40+
<interactivity:CallMethodAction MethodName="UpdatePalette"
41+
TargetObject="{x:Bind ColorPaletteSampler}" />
42+
</interactivity:EventTriggerBehavior>
43+
</interactivity:Interaction.Behaviors>
44+
</Image>
45+
</Grid>
46+
47+
<Grid Grid.Column="1"
48+
MaxWidth="400"
49+
MaxHeight="250"
50+
Margin="20"
51+
HorizontalAlignment="Stretch"
52+
VerticalAlignment="Stretch">
53+
<Grid.ColumnDefinitions>
54+
<ColumnDefinition />
55+
<ColumnDefinition />
56+
</Grid.ColumnDefinitions>
57+
<Grid.RowDefinitions>
58+
<RowDefinition />
59+
<RowDefinition Height="0.6*" />
60+
<RowDefinition Height="0.4*" />
61+
</Grid.RowDefinitions>
62+
63+
<!-- Primary Accent Color -->
64+
<Border Grid.ColumnSpan="2"
65+
Margin="4"
66+
Padding="2">
67+
<Border.Background>
68+
<SolidColorBrush Color="{x:Bind AccentPalette.SelectedColors[0], FallbackValue=Transparent, Mode=OneWay}" />
69+
</Border.Background>
70+
<TextBlock helpers:ContrastHelper.Opponent="{x:Bind AccentPalette.SelectedColors[0], FallbackValue=Transparent, Mode=OneWay}"
71+
Text="Primary Accent" />
72+
</Border>
73+
74+
<!-- Secondary Accent Color -->
75+
<Border Grid.Row="1"
76+
Margin="4"
77+
Padding="2">
78+
<Border.Background>
79+
<SolidColorBrush Color="{x:Bind AccentPalette.SelectedColors[1], FallbackValue=Transparent, Mode=OneWay}" />
80+
</Border.Background>
81+
<TextBlock helpers:ContrastHelper.Opponent="{x:Bind AccentPalette.SelectedColors[1], FallbackValue=Transparent, Mode=OneWay}"
82+
Text="Secondary Accent" />
83+
</Border>
84+
85+
<!-- Tertiary Accent Color -->
86+
<Border Grid.Row="1"
87+
Grid.Column="1"
88+
Margin="4"
89+
Padding="2">
90+
<Border.Background>
91+
<SolidColorBrush Color="{x:Bind AccentPalette.SelectedColors[2], FallbackValue=Transparent, Mode=OneWay}" />
92+
</Border.Background>
93+
<TextBlock helpers:ContrastHelper.Opponent="{x:Bind AccentPalette.SelectedColors[2], FallbackValue=Transparent, Mode=OneWay}"
94+
Text="Tertiary Accent" />
95+
</Border>
96+
97+
<!-- Accent Colors Gradient -->
98+
<Rectangle Grid.Row="3"
99+
Grid.ColumnSpan="2"
100+
Margin="4">
101+
<Rectangle.Fill>
102+
<LinearGradientBrush StartPoint="0,0.5" EndPoint="1,0.5">
103+
<GradientStopCollection>
104+
<GradientStop Offset="0" Color="{x:Bind AccentPalette.SelectedColors[0], FallbackValue=Transparent, Mode=OneWay}" />
105+
<GradientStop Offset="0.6" Color="{x:Bind AccentPalette.SelectedColors[1], FallbackValue=Transparent, Mode=OneWay}" />
106+
<GradientStop Offset="1" Color="{x:Bind AccentPalette.SelectedColors[2], FallbackValue=Transparent, Mode=OneWay}" />
107+
</GradientStopCollection>
108+
</LinearGradientBrush>
109+
</Rectangle.Fill>
110+
</Rectangle>
111+
</Grid>
112+
</Grid>
113+
</local:ColorPaletteSamplerToolkitSampleBase>

0 commit comments

Comments
 (0)