-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Fix appBarLayout so it extends correctly full screen #32060
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
Conversation
|
/backport to release/10.0.1xx |
|
Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18618999271 |
There was a problem hiding this 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. |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28986_Shell.cs
Show resolved
Hide resolved
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28986_NavigationPage.cs
Show resolved
Hide resolved
src/Controls/tests/TestCases.HostApp/Issues/Issue28986_Shell.cs
Outdated
Show resolved
Hide resolved
|
/backport to release/10.0.1xx |
|
Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18619646300 |
|
/backport to release/10.0.1xx |
|
Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18620579686 |
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28986_NavigationPage.cs
Outdated
Show resolved
Hide resolved
|
/backport to release/10.0.1xx |
|
Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18687597856 |
|
/rebase |
|
/backport to release/10.0.1xx |
|
Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18729373002 |
0476879 to
f0e909e
Compare
f0e909e to
74bd62b
Compare
|
/backport to release/10.0.1xx |
|
Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18730925262 |
|
/backport to release/10.0.1xx |
|
Started backporting to release/10.0.1xx: https://github.com/dotnet/maui/actions/runs/18733384677 |
|
@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 128Please backport manually! |
* 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
* 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]>
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:
Issue28986_NavigationPageandIssue28986_Shelltest pages to verify per-edge safe area control in navigation and shell scenarios (Issue28986_NavigationPage.cs,Issue28986_Shell.cs). [1] [2]Issue28986_NavigationPage.cs,Issue28986_Shell.cs). [1] [2]Device Compatibility Improvements:
UITest.csto accept both "width x height" and "height x width" formats for better emulator compatibility.Safe Area Padding Logic:
AppBarLayouton 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.