Skip to content

[inflight/current] Add iPhone Duo support to Controls.Foldable - #39596

Merged
kubaflo merged 1 commit into
inflight/currentfrom
kubaflo-backport-iphone-duo-support
Oct 23, 2026
Merged

kubaflo merged 1 commit into
inflight/currentfrom
kubaflo-backport-iphone-duo-support

Conversation

@kubaflo

@kubaflo kubaflo commented Oct 23, 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

Backports #38915, "Add iPhone Duo support to Controls.Foldable", from squash commit a561eaec4aacbe962416c64491aa5ffbc6bde9ae to inflight/current, as explicitly requested.

Preserves the source implementation: view/window-scoped reserved-region geometry, hinge monitoring and lifecycle cleanup, scene activation support, shared layout refresh, state triggers, sample updates, and Foldable unit tests. Original author and source coauthors are preserved.

The only cherry-pick conflicts were in .github/scripts/RunTests.ps1 and .github/scripts/shared/Detect-TestsInDiff.ps1. Resolution retains this branch's Compatibility test entries and adds the source Foldable mappings. Formatting is scoped to changed C# files; the formatter's unrelated Android null-conditional event rewrite was not retained.

SDK limitation: the source's native Duo path is enabled only for iOS target platform version 27.1+ (or an explicit IosDuoBindingsAvailable override with compatible bindings). This target branch currently defaults to iOS 26.0, so its default build retains fallback behavior rather than enabling Duo APIs. This PR does not upgrade the branch-wide SDK/workload or remove capability/runtime guards. Publishing actual Duo-enabled artifacts requires a compatible iOS 27.1 SDK build configuration.

Validation run in this backport worktree using .NET SDK 11.0.100-preview.6.26359.118, targeting this branch's net10.0 TFMs, and Xcode 26.6:

Command Result
dotnet test src/Controls/Foldable/test/Controls.Foldable.UnitTests.csproj --nologo --verbosity minimal Passed: 39, failed: 0, skipped: 0; rerun after formatting and normal restore.
dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f net10.0-ios26.0 --nologo --verbosity minimal Passed: 0 warnings, 0 errors.
dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f net10.0-maccatalyst26.0 --no-restore --nologo --verbosity minimal Passed: 0 warnings, 0 errors.
dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f net10.0-android36.0 --no-restore --nologo --verbosity minimal Passed: 3 Gradle Java 8 obsolescence warnings, 0 errors.
dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f net10.0-ios27.1 -p:TargetFrameworks=net10.0-ios27.1 --nologo --verbosity minimal Blocked: NETSDK1140, local SDK supports iOS 26.0/26.5, not 27.1.
git diff --cached --check Passed.
git diff --check Passed.

Formatting command (passed; changed_files contains staged changed .cs paths):

changed_files=()
while IFS= read -r file; do changed_files+=("$file"); done < <(git diff --cached --name-only -- '*.cs')
dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include "${changed_files[@]}" --verbosity quiet

PowerShell syntax check (passed for all three source script files):

$files=@(".github/scripts/RunTests.ps1", ".github/scripts/shared/Detect-TestsInDiff.ps1", ".github/scripts/shared/Detect-TestsInDiff.Tests.ps1")
foreach ($file in $files) {
    $tokens=$null; $errors=$null
    [System.Management.Automation.Language.Parser]::ParseFile((Join-Path $PWD $file), [ref]$tokens, [ref]$errors) > $null
    if ($errors.Count) { $errors | Write-Error; exit 1 }
    Write-Output "Parsed $file"
}

Build/test/format subprocesses ran with GH_TOKEN, GITHUB_TOKEN, and COPILOT_GITHUB_TOKEN removed from their environments. A --no-restore test attempt after the explicit 27.1 restore probe encountered changed assets; normal restore and the full 39-test rerun above succeeded.

Not run: native iOS 27.1/Duo compilation or simulator/device runtime validation, sample app build/runtime validation, Windows validation, or pipeline Pester tests. No XCTest or host UI automation was used. Source PR validation is not claimed as a result of this backport.

Issues Fixed

Backport of #38915; no separate issue.

Backport the complete implementation while retaining inflight/current's
Compatibility test mappings in the two script conflicts.

(cherry picked from commit a561eae)

Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Co-authored-by: Jakub Florkowski <kubaflo123@gmail.com>
Copilot-Session: 741e14bf-fe5c-4150-857c-40b354de3403
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 23, 2026 18:07 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 23, 2026 18:07 — with GitHub Actions Inactive
@azure-pipelines

This comment has been minimized.

@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 23, 2026 18:08 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 23, 2026 18:10 — with GitHub Actions Inactive
@kubaflo
kubaflo merged commit 5f4a515 into inflight/current Oct 23, 2026
7 of 17 checks passed
@kubaflo
kubaflo deleted the kubaflo-backport-iphone-duo-support branch October 23, 2026 18:10
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 23, 2026 18:12 — with GitHub Actions Inactive
@kubaflo
kubaflo temporarily deployed to copilot-pat-pool October 23, 2026 18:12 — with GitHub Actions Inactive
@github-actions github-actions Bot added this to the .NET 10 SR13 milestone Oct 23, 2026
kubaflo added a commit that referenced this pull request Oct 25, 2026
<!-- 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 -->

Backports [#38915](#38915), "Add
iPhone Duo support to Controls.Foldable", from squash commit
`a561eaec4aacbe962416c64491aa5ffbc6bde9ae` to **`inflight/current`**, as
explicitly requested.

Preserves the source implementation: view/window-scoped reserved-region
geometry, hinge monitoring and lifecycle cleanup, scene activation
support, shared layout refresh, state triggers, sample updates, and
Foldable unit tests. Original author and source coauthors are preserved.

The only cherry-pick conflicts were in `.github/scripts/RunTests.ps1`
and `.github/scripts/shared/Detect-TestsInDiff.ps1`. Resolution retains
this branch's Compatibility test entries and adds the source Foldable
mappings. Formatting is scoped to changed C# files; the formatter's
unrelated Android null-conditional event rewrite was not retained.

**SDK limitation:** the source's native Duo path is enabled only for iOS
target platform version 27.1+ (or an explicit `IosDuoBindingsAvailable`
override with compatible bindings). This target branch currently
defaults to iOS 26.0, so its default build retains fallback behavior
rather than enabling Duo APIs. This PR does not upgrade the branch-wide
SDK/workload or remove capability/runtime guards. Publishing actual
Duo-enabled artifacts requires a compatible iOS 27.1 SDK build
configuration.

**Validation run in this backport worktree** using .NET SDK
`11.0.100-preview.6.26359.118`, targeting this branch's `net10.0` TFMs,
and Xcode 26.6:

| Command | Result |
| --- | --- |
| `dotnet test
src/Controls/Foldable/test/Controls.Foldable.UnitTests.csproj --nologo
--verbosity minimal` | Passed: 39, failed: 0, skipped: 0; rerun after
formatting and normal restore. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-ios26.0 --nologo --verbosity minimal` | Passed: 0 warnings, 0
errors. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-maccatalyst26.0 --no-restore --nologo --verbosity minimal` |
Passed: 0 warnings, 0 errors. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-android36.0 --no-restore --nologo --verbosity minimal` | Passed:
3 Gradle Java 8 obsolescence warnings, 0 errors. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-ios27.1 -p:TargetFrameworks=net10.0-ios27.1 --nologo --verbosity
minimal` | Blocked: NETSDK1140, local SDK supports iOS 26.0/26.5, not
27.1. |
| `git diff --cached --check` | Passed. |
| `git diff --check` | Passed. |

Formatting command (passed; `changed_files` contains staged changed
`.cs` paths):

```bash
changed_files=()
while IFS= read -r file; do changed_files+=("$file"); done < <(git diff --cached --name-only -- '*.cs')
dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include "${changed_files[@]}" --verbosity quiet
```

PowerShell syntax check (passed for all three source script files):

```powershell
$files=@(".github/scripts/RunTests.ps1", ".github/scripts/shared/Detect-TestsInDiff.ps1", ".github/scripts/shared/Detect-TestsInDiff.Tests.ps1")
foreach ($file in $files) {
    $tokens=$null; $errors=$null
    [System.Management.Automation.Language.Parser]::ParseFile((Join-Path $PWD $file), [ref]$tokens, [ref]$errors) > $null
    if ($errors.Count) { $errors | Write-Error; exit 1 }
    Write-Output "Parsed $file"
}
```

Build/test/format subprocesses ran with `GH_TOKEN`, `GITHUB_TOKEN`, and
`COPILOT_GITHUB_TOKEN` removed from their environments. A `--no-restore`
test attempt after the explicit 27.1 restore probe encountered changed
assets; normal restore and the full 39-test rerun above succeeded.

**Not run:** native iOS 27.1/Duo compilation or simulator/device runtime
validation, sample app build/runtime validation, Windows validation, or
pipeline Pester tests. No XCTest or host UI automation was used. Source
PR validation is not claimed as a result of this backport.

### 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. -->

Backport of [#38915](#38915); no
separate issue.

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e14bf-fe5c-4150-857c-40b354de3403
kubaflo added a commit that referenced this pull request Oct 26, 2026
<!-- 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 -->

Backports [#38915](#38915), "Add
iPhone Duo support to Controls.Foldable", from squash commit
`a561eaec4aacbe962416c64491aa5ffbc6bde9ae` to **`inflight/current`**, as
explicitly requested.

Preserves the source implementation: view/window-scoped reserved-region
geometry, hinge monitoring and lifecycle cleanup, scene activation
support, shared layout refresh, state triggers, sample updates, and
Foldable unit tests. Original author and source coauthors are preserved.

The only cherry-pick conflicts were in `.github/scripts/RunTests.ps1`
and `.github/scripts/shared/Detect-TestsInDiff.ps1`. Resolution retains
this branch's Compatibility test entries and adds the source Foldable
mappings. Formatting is scoped to changed C# files; the formatter's
unrelated Android null-conditional event rewrite was not retained.

**SDK limitation:** the source's native Duo path is enabled only for iOS
target platform version 27.1+ (or an explicit `IosDuoBindingsAvailable`
override with compatible bindings). This target branch currently
defaults to iOS 26.0, so its default build retains fallback behavior
rather than enabling Duo APIs. This PR does not upgrade the branch-wide
SDK/workload or remove capability/runtime guards. Publishing actual
Duo-enabled artifacts requires a compatible iOS 27.1 SDK build
configuration.

**Validation run in this backport worktree** using .NET SDK
`11.0.100-preview.6.26359.118`, targeting this branch's `net10.0` TFMs,
and Xcode 26.6:

| Command | Result |
| --- | --- |
| `dotnet test
src/Controls/Foldable/test/Controls.Foldable.UnitTests.csproj --nologo
--verbosity minimal` | Passed: 39, failed: 0, skipped: 0; rerun after
formatting and normal restore. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-ios26.0 --nologo --verbosity minimal` | Passed: 0 warnings, 0
errors. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-maccatalyst26.0 --no-restore --nologo --verbosity minimal` |
Passed: 0 warnings, 0 errors. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-android36.0 --no-restore --nologo --verbosity minimal` | Passed:
3 Gradle Java 8 obsolescence warnings, 0 errors. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-ios27.1 -p:TargetFrameworks=net10.0-ios27.1 --nologo --verbosity
minimal` | Blocked: NETSDK1140, local SDK supports iOS 26.0/26.5, not
27.1. |
| `git diff --cached --check` | Passed. |
| `git diff --check` | Passed. |

Formatting command (passed; `changed_files` contains staged changed
`.cs` paths):

```bash
changed_files=()
while IFS= read -r file; do changed_files+=("$file"); done < <(git diff --cached --name-only -- '*.cs')
dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include "${changed_files[@]}" --verbosity quiet
```

PowerShell syntax check (passed for all three source script files):

```powershell
$files=@(".github/scripts/RunTests.ps1", ".github/scripts/shared/Detect-TestsInDiff.ps1", ".github/scripts/shared/Detect-TestsInDiff.Tests.ps1")
foreach ($file in $files) {
    $tokens=$null; $errors=$null
    [System.Management.Automation.Language.Parser]::ParseFile((Join-Path $PWD $file), [ref]$tokens, [ref]$errors) > $null
    if ($errors.Count) { $errors | Write-Error; exit 1 }
    Write-Output "Parsed $file"
}
```

Build/test/format subprocesses ran with `GH_TOKEN`, `GITHUB_TOKEN`, and
`COPILOT_GITHUB_TOKEN` removed from their environments. A `--no-restore`
test attempt after the explicit 27.1 restore probe encountered changed
assets; normal restore and the full 39-test rerun above succeeded.

**Not run:** native iOS 27.1/Duo compilation or simulator/device runtime
validation, sample app build/runtime validation, Windows validation, or
pipeline Pester tests. No XCTest or host UI automation was used. Source
PR validation is not claimed as a result of this backport.

### 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. -->

Backport of [#38915](#38915); no
separate issue.

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e14bf-fe5c-4150-857c-40b354de3403
github-actions Bot pushed a commit that referenced this pull request Oct 28, 2026
<!-- 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 -->

Backports [#38915](#38915), "Add
iPhone Duo support to Controls.Foldable", from squash commit
`a561eaec4aacbe962416c64491aa5ffbc6bde9ae` to **`inflight/current`**, as
explicitly requested.

Preserves the source implementation: view/window-scoped reserved-region
geometry, hinge monitoring and lifecycle cleanup, scene activation
support, shared layout refresh, state triggers, sample updates, and
Foldable unit tests. Original author and source coauthors are preserved.

The only cherry-pick conflicts were in `.github/scripts/RunTests.ps1`
and `.github/scripts/shared/Detect-TestsInDiff.ps1`. Resolution retains
this branch's Compatibility test entries and adds the source Foldable
mappings. Formatting is scoped to changed C# files; the formatter's
unrelated Android null-conditional event rewrite was not retained.

**SDK limitation:** the source's native Duo path is enabled only for iOS
target platform version 27.1+ (or an explicit `IosDuoBindingsAvailable`
override with compatible bindings). This target branch currently
defaults to iOS 26.0, so its default build retains fallback behavior
rather than enabling Duo APIs. This PR does not upgrade the branch-wide
SDK/workload or remove capability/runtime guards. Publishing actual
Duo-enabled artifacts requires a compatible iOS 27.1 SDK build
configuration.

**Validation run in this backport worktree** using .NET SDK
`11.0.100-preview.6.26359.118`, targeting this branch's `net10.0` TFMs,
and Xcode 26.6:

| Command | Result |
| --- | --- |
| `dotnet test
src/Controls/Foldable/test/Controls.Foldable.UnitTests.csproj --nologo
--verbosity minimal` | Passed: 39, failed: 0, skipped: 0; rerun after
formatting and normal restore. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-ios26.0 --nologo --verbosity minimal` | Passed: 0 warnings, 0
errors. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-maccatalyst26.0 --no-restore --nologo --verbosity minimal` |
Passed: 0 warnings, 0 errors. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-android36.0 --no-restore --nologo --verbosity minimal` | Passed:
3 Gradle Java 8 obsolescence warnings, 0 errors. |
| `dotnet build src/Controls/Foldable/src/Controls.Foldable.csproj -f
net10.0-ios27.1 -p:TargetFrameworks=net10.0-ios27.1 --nologo --verbosity
minimal` | Blocked: NETSDK1140, local SDK supports iOS 26.0/26.5, not
27.1. |
| `git diff --cached --check` | Passed. |
| `git diff --check` | Passed. |

Formatting command (passed; `changed_files` contains staged changed
`.cs` paths):

```bash
changed_files=()
while IFS= read -r file; do changed_files+=("$file"); done < <(git diff --cached --name-only -- '*.cs')
dotnet format Microsoft.Maui.sln --no-restore --exclude Templates/src --exclude-diagnostics CA1822 --include "${changed_files[@]}" --verbosity quiet
```

PowerShell syntax check (passed for all three source script files):

```powershell
$files=@(".github/scripts/RunTests.ps1", ".github/scripts/shared/Detect-TestsInDiff.ps1", ".github/scripts/shared/Detect-TestsInDiff.Tests.ps1")
foreach ($file in $files) {
    $tokens=$null; $errors=$null
    [System.Management.Automation.Language.Parser]::ParseFile((Join-Path $PWD $file), [ref]$tokens, [ref]$errors) > $null
    if ($errors.Count) { $errors | Write-Error; exit 1 }
    Write-Output "Parsed $file"
}
```

Build/test/format subprocesses ran with `GH_TOKEN`, `GITHUB_TOKEN`, and
`COPILOT_GITHUB_TOKEN` removed from their environments. A `--no-restore`
test attempt after the explicit 27.1 restore probe encountered changed
assets; normal restore and the full 39-test rerun above succeeded.

**Not run:** native iOS 27.1/Duo compilation or simulator/device runtime
validation, sample app build/runtime validation, Windows validation, or
pipeline Pester tests. No XCTest or host UI automation was used. Source
PR validation is not claimed as a result of this backport.

### 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. -->

Backport of [#38915](#38915); no
separate issue.

<!--
Are you targeting main? All PRs should target the main branch unless
otherwise noted.
-->

Co-authored-by: Gerald Versluis <gerald.versluis@microsoft.com>
Co-authored-by: Copilot App <223556219+Copilot@users.noreply.github.com>
Copilot-Session: 741e14bf-fe5c-4150-857c-40b354de3403

This branch was previously deployed

1 inactive deployment
copilot-pat-pool — 7a306eab Deployed Oct 23, 2026 by kubaflo via conclusion #2486
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants