Skip to content

[inflight/candidate] [iOS 27] Fix TitleView sizing before navigation bar layout (#39285) - #39389

Merged
kubaflo merged 1 commit into
inflight/candidatefrom
kubaflo-titleview-candidate-backport
Oct 14, 2026
Merged

kubaflo merged 1 commit into
inflight/candidatefrom
kubaflo-titleview-candidate-backport

Conversation

@kubaflo

@kubaflo kubaflo commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could test the resulting artifacts from this PR and let us know in a comment if this change resolves your issue. Thank you!

Description of Change

Backport of #39285 from inflight/current, carrying only the final merged commit's parent delta: 3a8ea1dbacccddf37d266a2988ddb78735fa4722 -> 4cfbcb9fc333559a57cff026c9cc84a183542a9a.

Target exception: inflight/candidate is explicitly requested for this backport; this PR intentionally does not target main.

Preserves the merged TitleView fix without redesign: when the active container's cached navigation-bar height differs from UIKit's positive laid-out height, recreate it through UpdateTitleArea, retaining the original iOS 27.1+ and non-MacCatalyst guard, weak ownership, and disposal checks. Includes the original Issue39155 HostApp page, NUnit test, and all five Android/iOS/Windows/Mac snapshot binaries. Candidate's unrelated toolbar-menu changes remain intact. No other inflight/current changes or public API changes are included.

Patch identity: the original merged commit, its rebased inflight/current equivalent 81ff12a08bd600353a94d013031c798571a1ca97, and this backport all have stable patch ID 0d2f1e2fdac735c8309e67618219d030b4f79eb8. Exactly eight files changed; the two added C# files and all five binary snapshots match the source blobs byte-for-byte. The source patch applied cleanly to Candidate e741040bbd9ed84f5ee9fadab207501e4fa0e0a2; a fresh search found no open or merged Candidate duplicate by source PR, issue, or TitleView title.

Validation: prerequisite builds, iOS Controls.Core, HostApp C# compilation, and the iOS NUnit driver build passed with zero warnings/errors. The compiled HostApp contains the new Issue39155 types, and the compiled NUnit assembly contains the regression fixture and method. Scoped whitespace and committed-diff checks passed.

Why draft / deferred validation: local commands selected SDK 11.0.100-preview.6.26359.118; the repository's global.json toolset 10.0.113-servicing.26454.107 is not installed. Canonical-toolset/CI validation is therefore still pending. The initial full-solution formatter returned exit 0 but reported required references that did not load, so that run is not counted as a complete formatting pass; the reference-free scoped whitespace check passed instead. Native/manual UI tests, XCTest, MacCatalyst testing, deployment, app packaging/linking/signing, and foreground UI automation were not run. This PR does not claim runtime validation of the backport.

Exact local validation commands and results

The fresh worktree initially lacked restored assets/reference assemblies. Restoring the relevant project graphs resolved those initial build failures; final results follow.

# PASS: prerequisite restore.
dotnet restore Microsoft.Maui.BuildTasks.slnf -p:BuildTaskOnlyBuild=true -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal

# PASS: prerequisite build; 0 warnings, 0 errors.
dotnet build Microsoft.Maui.BuildTasks.slnf --no-restore -p:BuildTaskOnlyBuild=true -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal --nologo

# PASS: iOS library restore.
dotnet restore src/Controls/src/Core/Controls.Core.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal

# PASS: iOS library build; 0 warnings, 0 errors.
dotnet build src/Controls/src/Core/Controls.Core.csproj -f net10.0-ios26.0 --no-restore -p:IncludeAndroidTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal --nologo

# PASS: HostApp restore.
dotnet restore src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -p:RuntimeIdentifier=iossimulator-arm64 -p:IncludeAndroidTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal

# PASS: HostApp C# compilation only; 0 warnings, 0 errors. No deployment or execution.
dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net10.0-ios -t:Compile --no-restore -p:RuntimeIdentifier=iossimulator-arm64 -p:EnableCodeSigning=false -p:IncludeAndroidTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal --nologo

# PASS: NUnit driver restore.
dotnet restore src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal

# PASS: NUnit driver build; 0 warnings, 0 errors. Tests were not executed.
dotnet build src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj --no-restore -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal --nologo

# PASS: scoped whitespace check; exit 0, no changes required.
dotnet format whitespace --folder . --include src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs src/Controls/tests/TestCases.HostApp/Issues/Issue39155.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue39155.cs --verify-no-changes --verbosity minimal

# INCONCLUSIVE: initial solution formatting exited 0 but reported unloaded required references.
dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs src/Controls/tests/TestCases.HostApp/Issues/Issue39155.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue39155.cs --verify-no-changes --verbosity minimal

# PASS: committed diff whitespace check.
git diff HEAD^ HEAD --check

# PASS: both stable patch IDs are 0d2f1e2fdac735c8309e67618219d030b4f79eb8.
git diff --binary 4cfbcb9fc333559a57cff026c9cc84a183542a9a^ 4cfbcb9fc333559a57cff026c9cc84a183542a9a | git patch-id --stable
git diff --binary HEAD^ HEAD | git patch-id --stable

Issues Fixed

Fixes #39155 in inflight/candidate by backporting #39285.

…bar layout

Backport #39285 for #39155 from inflight/current, carrying the exact merged fix, HostApp regression page, NUnit test, and all five platform snapshots. Retain Candidate-only toolbar behavior.

(cherry picked from commit 4cfbcb9)
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: fa2910ab-0a80-4177-a5a9-2642c05e5502
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 14, 2026 16:12 — with GitHub Actions Inactive
@azure-pipelines

Copy link
Copy Markdown
Azure Pipelines:
Successfully started running 1 pipeline(s).
There may be pipelines that require an authorized user to comment /azp run to run.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 14, 2026 16:12 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 14, 2026 16:13 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 14, 2026 16:15 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 14, 2026 16:17 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 14, 2026 16:17 — with GitHub Actions Inactive
@kubaflo
kubaflo marked this pull request as ready for review October 14, 2026 16:20
@kubaflo
kubaflo merged commit 40a966c into inflight/candidate Oct 14, 2026
9 of 18 checks passed
@kubaflo
kubaflo deleted the kubaflo-titleview-candidate-backport branch October 14, 2026 16:20
@github-actions github-actions Bot added this to the .NET 10 SR12 milestone Oct 14, 2026
kubaflo added a commit that referenced this pull request Oct 18, 2026
…bar layout (#39285) (#39389)

<!-- Please let the below note in for people that find this PR -->
[!NOTE]
Are you waiting for the changes in this PR to be merged?
It would be very helpful if you could [test the resulting
artifacts](https://github.com/dotnet/maui/wiki/Testing-PR-Builds) from
this PR and let us know in a comment if this change resolves your issue.
Thank you!

<!--
!!!!!!! MAIN IS THE ONLY ACTIVE BRANCH. MAKE SURE THIS PR IS TARGETING
MAIN. !!!!!!!
-->

### Description of Change

<!-- Enter description of the fix in this section -->

Backport of [#39285](#39285) from
`inflight/current`, carrying only the final merged commit's parent
delta: `3a8ea1dbacccddf37d266a2988ddb78735fa4722` ->
[`4cfbcb9fc333559a57cff026c9cc84a183542a9a`](4cfbcb9).

**Target exception:** `inflight/candidate` is explicitly requested for
this backport; this PR intentionally does not target `main`.

Preserves the merged TitleView fix without redesign: when the active
container's cached navigation-bar height differs from UIKit's positive
laid-out height, recreate it through `UpdateTitleArea`, retaining the
original iOS 27.1+ and non-MacCatalyst guard, weak ownership, and
disposal checks. Includes the original Issue39155 HostApp page, NUnit
test, and all five Android/iOS/Windows/Mac snapshot binaries.
Candidate's unrelated toolbar-menu changes remain intact. No other
`inflight/current` changes or public API changes are included.

**Patch identity:** the original merged commit, its rebased
`inflight/current` equivalent
[`81ff12a08bd600353a94d013031c798571a1ca97`](81ff12a),
and this backport all have stable patch ID
`0d2f1e2fdac735c8309e67618219d030b4f79eb8`. Exactly eight files changed;
the two added C# files and all five binary snapshots match the source
blobs byte-for-byte. The source patch applied cleanly to Candidate
`e741040bbd9ed84f5ee9fadab207501e4fa0e0a2`; a fresh search found no open
or merged Candidate duplicate by source PR, issue, or TitleView title.

**Validation:** prerequisite builds, iOS Controls.Core, HostApp C#
compilation, and the iOS NUnit driver build passed with zero
warnings/errors. The compiled HostApp contains the new Issue39155 types,
and the compiled NUnit assembly contains the regression fixture and
method. Scoped whitespace and committed-diff checks passed.

**Why draft / deferred validation:** local commands selected SDK
`11.0.100-preview.6.26359.118`; the repository's `global.json` toolset
`10.0.113-servicing.26454.107` is not installed. Canonical-toolset/CI
validation is therefore still pending. The initial full-solution
formatter returned exit 0 but reported required references that did not
load, so that run is not counted as a complete formatting pass; the
reference-free scoped whitespace check passed instead. Native/manual UI
tests, XCTest, MacCatalyst testing, deployment, app
packaging/linking/signing, and foreground UI automation were not run.
This PR does not claim runtime validation of the backport.

<details>
<summary>Exact local validation commands and results</summary>

The fresh worktree initially lacked restored assets/reference
assemblies. Restoring the relevant project graphs resolved those initial
build failures; final results follow.

```bash
# PASS: prerequisite restore.
dotnet restore Microsoft.Maui.BuildTasks.slnf -p:BuildTaskOnlyBuild=true -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal

# PASS: prerequisite build; 0 warnings, 0 errors.
dotnet build Microsoft.Maui.BuildTasks.slnf --no-restore -p:BuildTaskOnlyBuild=true -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal --nologo

# PASS: iOS library restore.
dotnet restore src/Controls/src/Core/Controls.Core.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal

# PASS: iOS library build; 0 warnings, 0 errors.
dotnet build src/Controls/src/Core/Controls.Core.csproj -f net10.0-ios26.0 --no-restore -p:IncludeAndroidTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal --nologo

# PASS: HostApp restore.
dotnet restore src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -p:RuntimeIdentifier=iossimulator-arm64 -p:IncludeAndroidTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal

# PASS: HostApp C# compilation only; 0 warnings, 0 errors. No deployment or execution.
dotnet build src/Controls/tests/TestCases.HostApp/Controls.TestCases.HostApp.csproj -f net10.0-ios -t:Compile --no-restore -p:RuntimeIdentifier=iossimulator-arm64 -p:EnableCodeSigning=false -p:IncludeAndroidTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal --nologo

# PASS: NUnit driver restore.
dotnet restore src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal

# PASS: NUnit driver build; 0 warnings, 0 errors. Tests were not executed.
dotnet build src/Controls/tests/TestCases.iOS.Tests/Controls.TestCases.iOS.Tests.csproj --no-restore -p:IncludeAndroidTargetFrameworks=false -p:IncludeIosTargetFrameworks=false -p:IncludeMacCatalystTargetFrameworks=false -p:IncludeMacOSTargetFrameworks=false -p:IncludeWindowsTargetFrameworks=false -p:IncludeTizenTargetFrameworks=false --verbosity minimal --nologo

# PASS: scoped whitespace check; exit 0, no changes required.
dotnet format whitespace --folder . --include src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs src/Controls/tests/TestCases.HostApp/Issues/Issue39155.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue39155.cs --verify-no-changes --verbosity minimal

# INCONCLUSIVE: initial solution formatting exited 0 but reported unloaded required references.
dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include src/Controls/src/Core/Compatibility/Handlers/NavigationPage/iOS/NavigationRenderer.cs src/Controls/tests/TestCases.HostApp/Issues/Issue39155.cs src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue39155.cs --verify-no-changes --verbosity minimal

# PASS: committed diff whitespace check.
git diff HEAD^ HEAD --check

# PASS: both stable patch IDs are 0d2f1e2fdac735c8309e67618219d030b4f79eb8.
git diff --binary 4cfbcb9^ 4cfbcb9 | git patch-id --stable
git diff --binary HEAD^ HEAD | git patch-id --stable
```

</details>

### Issues Fixed

<!-- Please make sure that there is a bug logged for the issue being
fixed. The bug should describe the problem and how to reproduce it. -->

Fixes [#39155](#39155) in
`inflight/candidate` by backporting
[#39285](#39285).

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->
@github-actions github-actions Bot locked and limited conversation to collaborators Nov 14, 2026

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 14df3222 Deployed Oct 14, 2026 by kubaflo via conclusion #2354
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants