Skip to content

Conversation

@PureWeen
Copy link
Member

@PureWeen PureWeen commented Oct 18, 2025

Description of Change

This pull request adds new test cases and improves safe area handling for navigation and shell pages on Android and iOS. It also enhances device compatibility checks for UI tests and clarifies padding logic for the Android app bar layout.

New Safe Area Test Cases:

  • Added Issue28986_NavigationPage and Issue28986_Shell test pages to verify per-edge safe area control in navigation and shell scenarios (Issue28986_NavigationPage.cs, Issue28986_Shell.cs). [1] [2]
  • Implemented corresponding UI tests for these pages to ensure toolbars extend fully left and right in both portrait and landscape orientations (Issue28986_NavigationPage.cs, Issue28986_Shell.cs). [1] [2]

Device Compatibility Improvements:

  • Updated device screen size checks in UITest.cs to accept both "width x height" and "height x width" formats for better emulator compatibility.

Safe Area Padding Logic:

  • Refined padding for AppBarLayout on Android to correctly account for system bars and navigation bar placement, improving toolbar visibility and interaction across device orientations (GlobalWindowInsetListener.cs).

Generate any new Notch related screen shots
I did a local rerun of all the notch images just to make sure those are all up to date once we get that CI running.

Before and After

The picture below is on a Pixel 9.
The white part is where the camera is on the front of the screen, it's basically a NOTCH.

image

Copilot AI review requested due to automatic review settings October 18, 2025 17:51
@PureWeen
Copy link
Member Author

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18618999271

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adjusts Android AppBarLayout padding logic for correct full-screen extension, enhances device screen size compatibility checks in UI tests, and adds new safe area test cases for Shell and Navigation pages on iOS/Android.

  • Updated AppBarLayout padding to use system bar insets for left/right edges.
  • Added Shell and NavigationPage safe area UI tests plus corresponding HostApp pages.
  • Expanded emulator screen size validation to accept rotated width/height formats.

Reviewed Changes

Copilot reviewed 6 out of 10 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/Core/src/Platform/Android/GlobalWindowInsetListener.cs Modifies AppBarLayout padding to use system bar insets for better safe area handling.
src/Controls/tests/TestCases.Shared.Tests/UITest.cs Broadens device screen size checks to accept alternative orientation formats.
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28986_Shell.cs Adds Shell safe area UI test exercising landscape/portrait transitions.
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28986_NavigationPage.cs Adds NavigationPage safe area UI test for edge extension validation.
src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Shell.cs Introduces Shell host page used by the new safe area test.
src/Controls/tests/TestCases.HostApp/Issues/Issue28986_NavigationPage.cs Introduces NavigationPage host page used by the new safe area test.

@PureWeen
Copy link
Member Author

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18619646300

@PureWeen
Copy link
Member Author

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18620579686

@github-project-automation github-project-automation bot moved this from Todo to Changes Requested in MAUI SDK Ongoing Oct 21, 2025
@PureWeen
Copy link
Member Author

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18687597856

@PureWeen PureWeen requested a review from jsuarezruiz October 22, 2025 15:46
@PureWeen
Copy link
Member Author

/rebase

@PureWeen
Copy link
Member Author

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18729373002

@github-actions github-actions bot force-pushed the fix_notch_padding_AppbarLayout branch from 0476879 to f0e909e Compare October 22, 2025 20:45
@PureWeen PureWeen force-pushed the fix_notch_padding_AppbarLayout branch from f0e909e to 74bd62b Compare October 22, 2025 21:53
@PureWeen
Copy link
Member Author

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18730925262

@PureWeen
Copy link
Member Author

/backport to release/10.0.1xx

@github-actions
Copy link
Contributor

Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18733384677

@github-actions
Copy link
Contributor

@PureWeen backporting to "release/10.0.1xx" failed, the patch most likely resulted in conflicts:

$ git am --3way --empty=keep --ignore-whitespace --keep-non-patch changes.patch

Applying: Fix appBarLayout so it extends correctly full screen
Applying: - update screen shots
Applying: - update notch images
Applying: - generate iOS images
Applying: - fix based on review comments
Applying: - fix insetting on MaterialToolBar so its content doesn't go into the display cutout
Applying: - fix insets
Applying: - fix screen shots
Using index info to reconstruct a base tree...
A	src/Controls/tests/TestCases.Android.Tests/snapshots/android/CollectionViewSelectionModeOnDarkTheme.png
A	src/Controls/tests/TestCases.Android.Tests/snapshots/android/CollectionViewSelectionModeOnLightTheme.png
Falling back to patching base and 3-way merge...
CONFLICT (modify/delete): src/Controls/tests/TestCases.Android.Tests/snapshots/android/CollectionViewSelectionModeOnLightTheme.png deleted in HEAD and modified in - fix screen shots.  Version - fix screen shots of src/Controls/tests/TestCases.Android.Tests/snapshots/android/CollectionViewSelectionModeOnLightTheme.png left in tree.
warning: Cannot merge binary files: src/Controls/tests/TestCases.Android.Tests/snapshots/android/SelectedTabIconShouldChangeColor.png (HEAD:src/Controls/tests/TestCases.Android.Tests/snapshots/android/SelectedTabIconShouldChangeColor.png vs. - fix screen shots:src/Controls/tests/TestCases.Android.Tests/snapshots/android/CollectionViewSelectionModeOnDarkTheme.png)
Auto-merging src/Controls/tests/TestCases.Android.Tests/snapshots/android/SelectedTabIconShouldChangeColor.png
CONFLICT (content): Merge conflict in src/Controls/tests/TestCases.Android.Tests/snapshots/android/SelectedTabIconShouldChangeColor.png
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
hint: When you have resolved this problem, run "git am --continue".
hint: If you prefer to skip this patch, run "git am --skip" instead.
hint: To restore the original branch and stop patching, run "git am --abort".
hint: Disable this message with "git config set advice.mergeConflict false"
Patch failed at 0008 - fix screen shots
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@PureWeen PureWeen merged commit 44d22ad into net10.0 Oct 24, 2025
164 of 168 checks passed
@github-project-automation github-project-automation bot moved this from Changes Requested to Done in MAUI SDK Ongoing Oct 24, 2025
@PureWeen PureWeen deleted the fix_notch_padding_AppbarLayout branch October 24, 2025 02:53
PureWeen added a commit that referenced this pull request Oct 24, 2025
* Fix appBarLayout so it extends correctly full screen

* - update screen shots

* - update notch images

* - generate iOS images

* - fix based on review comments

* - fix insetting on MaterialToolBar so its content doesn't go into the display cutout

* - fix insets

* - fix screen shots
# Conflicts:
#	src/Controls/tests/TestCases.Android.Tests/snapshots/android/CollectionViewSelectionModeOnDarkTheme.png
#	src/Controls/tests/TestCases.Android.Tests/snapshots/android/CollectionViewSelectionModeOnLightTheme.png
rmarinho pushed a commit that referenced this pull request Oct 24, 2025
* Fix appBarLayout so it extends correctly full screen

* - update screen shots

* - update notch images

* - generate iOS images

* - fix based on review comments

* - fix insetting on MaterialToolBar so its content doesn't go into the display cutout

* - fix insets

* - fix screen shots
# Conflicts:
#	src/Controls/tests/TestCases.Android.Tests/snapshots/android/CollectionViewSelectionModeOnDarkTheme.png
#	src/Controls/tests/TestCases.Android.Tests/snapshots/android/CollectionViewSelectionModeOnLightTheme.png

Co-authored-by: Shane Neuville <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants