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

Fix Titlebar name API and add templates #25390

Merged
merged 7 commits into from
Oct 20, 2024
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
20 changes: 14 additions & 6 deletions eng/pipelines/common/maui-templates.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,12 +24,12 @@ parameters:
- name: BuildCategories
type: object
default:
- WindowsTemplates
- macOSTemplates
- Build
- Blazor
- MultiProject
- AOT
- WindowsTemplates
- macOSTemplates
- Build
- Blazor
- MultiProject
- AOT

- name: RunPlatforms
type: object
Expand Down Expand Up @@ -119,6 +119,14 @@ jobs:
continueOnError: true
condition: succeededOrFailed()

- task: PublishBuildArtifacts@1
displayName: Publish Artifacts
condition: always()
continueOnError: true
inputs:
PathToPublish: '$(Build.StagingDirectory)/IntegrationTestsBuildLogs'
ArtifactName: BuildTemplateBuildLogs

- task: PublishTestResults@2
displayName: Publish the $(PLATFORM_NAME) templates build tests
condition: always()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Microsoft.Maui.Controls.TitleBar.IconHiddenState = "IconCollapsed" -> stri
const Microsoft.Maui.Controls.TitleBar.IconVisibleState = "IconVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingHiddenState = "LeadingContentCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingVisibleState = "LeadingContentVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubTitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubtitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleVisibleState = "SubtitleVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.TemplateRootName = "PART_Root" -> string!
const Microsoft.Maui.Controls.TitleBar.TitleBarActiveState = "TitleBarTitleActive" -> string!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const Microsoft.Maui.Controls.TitleBar.IconHiddenState = "IconCollapsed" -> stri
const Microsoft.Maui.Controls.TitleBar.IconVisibleState = "IconVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingHiddenState = "LeadingContentCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingVisibleState = "LeadingContentVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubTitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubtitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleVisibleState = "SubtitleVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.TemplateRootName = "PART_Root" -> string!
const Microsoft.Maui.Controls.TitleBar.TitleBarActiveState = "TitleBarTitleActive" -> string!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ const Microsoft.Maui.Controls.TitleBar.IconHiddenState = "IconCollapsed" -> stri
const Microsoft.Maui.Controls.TitleBar.IconVisibleState = "IconVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingHiddenState = "LeadingContentCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingVisibleState = "LeadingContentVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubTitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubtitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleVisibleState = "SubtitleVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.TemplateRootName = "PART_Root" -> string!
const Microsoft.Maui.Controls.TitleBar.TitleBarActiveState = "TitleBarTitleActive" -> string!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Microsoft.Maui.Controls.TitleBar.IconHiddenState = "IconCollapsed" -> stri
const Microsoft.Maui.Controls.TitleBar.IconVisibleState = "IconVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingHiddenState = "LeadingContentCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingVisibleState = "LeadingContentVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubTitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubtitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleVisibleState = "SubtitleVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.TemplateRootName = "PART_Root" -> string!
const Microsoft.Maui.Controls.TitleBar.TitleBarActiveState = "TitleBarTitleActive" -> string!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Microsoft.Maui.Controls.TitleBar.IconHiddenState = "IconCollapsed" -> stri
const Microsoft.Maui.Controls.TitleBar.IconVisibleState = "IconVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingHiddenState = "LeadingContentCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingVisibleState = "LeadingContentVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubTitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubtitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleVisibleState = "SubtitleVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.TemplateRootName = "PART_Root" -> string!
const Microsoft.Maui.Controls.TitleBar.TitleBarActiveState = "TitleBarTitleActive" -> string!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Microsoft.Maui.Controls.TitleBar.IconHiddenState = "IconCollapsed" -> stri
const Microsoft.Maui.Controls.TitleBar.IconVisibleState = "IconVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingHiddenState = "LeadingContentCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingVisibleState = "LeadingContentVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubTitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubtitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleVisibleState = "SubtitleVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.TemplateRootName = "PART_Root" -> string!
const Microsoft.Maui.Controls.TitleBar.TitleBarActiveState = "TitleBarTitleActive" -> string!
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ const Microsoft.Maui.Controls.TitleBar.IconHiddenState = "IconCollapsed" -> stri
const Microsoft.Maui.Controls.TitleBar.IconVisibleState = "IconVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingHiddenState = "LeadingContentCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.LeadingVisibleState = "LeadingContentVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubTitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleHiddenState = "SubtitleCollapsed" -> string!
const Microsoft.Maui.Controls.TitleBar.SubtitleVisibleState = "SubtitleVisible" -> string!
const Microsoft.Maui.Controls.TitleBar.TemplateRootName = "PART_Root" -> string!
const Microsoft.Maui.Controls.TitleBar.TitleBarActiveState = "TitleBarTitleActive" -> string!
Expand Down
2 changes: 1 addition & 1 deletion src/Controls/src/Core/TitleBar/TitleBar.cs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public partial class TitleBar : TemplatedView, ITitleBar, ISafeAreaView

public const string TitleBarSubtitle = "PART_Subtitle";
public const string SubtitleVisibleState = "SubtitleVisible";
public const string SubtitleHiddenState = "SubTitleCollapsed";
public const string SubtitleHiddenState = "SubtitleCollapsed";

public const string TitleBarLeading = "PART_LeadingContent";
public const string LeadingVisibleState = "LeadingContentVisible";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@
</Setter>
</Style>

<!--
<Style TargetType="TitleBar">
<Setter Property="MinimumHeightRequest" Value="32"/>
<Setter Property="VisualStateManager.VisualStateGroups">
Expand All @@ -415,7 +414,6 @@
</VisualStateGroupList>
</Setter>
</Style>
-->

<Style TargetType="Page" ApplyToDerivedTypes="True">
<Setter Property="Padding" Value="0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,6 @@
</Setter>
</Style>

<!--
<Style TargetType="TitleBar">
<Setter Property="MinimumHeightRequest" Value="32"/>
<Setter Property="VisualStateManager.VisualStateGroups">
Expand All @@ -415,7 +414,6 @@
</VisualStateGroupList>
</Setter>
</Style>
-->

<Style TargetType="Page" ApplyToDerivedTypes="True">
<Setter Property="Padding" Value="0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public abstract class BaseBuildTest
public const string DotNetCurrent = "net9.0";
public const string DotNetPrevious = "net8.0";

public const string MauiVersionCurrent = "9.0.0-preview.6.24327.7"; // this should not be the same as the last release
public const string MauiVersionCurrent = "9.0.0-rc.2.24503.2"; // this should not be the same as the last release
public const string MauiVersionPrevious = "8.0.60"; // this should not be the same version as the default. aka: MicrosoftMauiPreviousDotNetReleasedVersion in eng/Versions.props

char[] invalidChars = { '{', '}', '(', ')', '$', ':', ';', '\"', '\'', ',', '=', '.', '-', ' ', };
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,10 @@ public void BuildWithMauiVersion(string id, string framework, string config, boo
"</Project>",
$"<PropertyGroup><MauiVersion>{mv}</MauiVersion></PropertyGroup></Project>");

string binlogDir = Path.Combine(TestEnvironment.GetMauiDirectory(), $"artifacts\\log\\{Path.GetFileName(projectDir)}.binlog");

string target = shouldPack ? "Pack" : "";
Assert.IsTrue(DotnetInternal.Build(projectFile, config, target: target, properties: BuildProps),
Assert.IsTrue(DotnetInternal.Build(projectFile, config, target: target, binlogPath: binlogDir, properties: BuildProps),
$"Project {Path.GetFileName(projectFile)} failed to build. Check test output/attachments for errors.");
}

Expand Down