Skip to content

Revert default for UseSafeAreaProperty to value from .NET 6 for iOS - #16093

Merged
PureWeen merged 3 commits into
mainfrom
fix-12823
Jul 19, 2023
Merged

PureWeen merged 3 commits into
mainfrom
fix-12823

Conversation

@hartez

@hartez hartez commented Jul 11, 2023 •

Copy link
Copy Markdown
Contributor

Description of Change

#10083 modified the default value for the UseSafeAreaProperty; this change sets it back to the original value from .NET 6 for iOS.

This should be backported for 7 since the original PR caused a behavior change in 7.

Issues Fixed

Fixes #12823

@hartez hartez added the backport/suggested The PR author or issue review has suggested that the change should be backported. label Jul 11, 2023
@Eilon

Eilon commented Jul 12, 2023

Copy link
Copy Markdown
Contributor

Tagging @tj-devel709 - you were looking at something similar recently.

@rachelkang

Copy link
Copy Markdown
Member

yay regression fixing! I'm curious though; why did changing the default break the property entirely?

@PureWeen PureWeen left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

PageAdjustsWhenTopTabsArePresent

Is currently failing on iOS

@hartez

hartez commented Jul 18, 2023

Copy link
Copy Markdown
Contributor Author

yay regression fixing! I'm curious though; why did changing the default break the property entirely?

It didn't.

There are two properties in play - UseSafeArea (on Page) and IgnoreSafeArea (on Layout). In .NET 6, UseSafeArea was false by default, which meant that the Page would lay its content out in the entire screen (even behind the notch). So the value a user set for IgnoreSafeArea made a difference. In .NET 7, the default for UseSafeArea changed to true, which meant that the Page constrained all of its content to the safe area; you could tell a Layout on the Page to ignore the safe area, but it didn't matter because it was already entirely within the safe area.

So you might have a Page in .NET 6 with a Grid marked IgnoreSafeArea = true, and that Grid would layout behind the notch. Then you'd move to .NET 7, and the Grid would stop laying out behind the notch. It looks like IgnoreSafeArea is busted, but it's really just that the default for the Page changed.

@PureWeen

Copy link
Copy Markdown
Member

/backport to net7.0

@github-actions

Copy link
Copy Markdown
Contributor

Started backporting to net7.0: https://github.com/dotnet/maui/actions/runs/5670519752

@github-actions

Copy link
Copy Markdown
Contributor

@PureWeen backporting to net7.0 failed, the patch most likely resulted in conflicts:

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

Applying: Revert default for UseSafeAreaProperty to value from .NET 6 for iOS Fixes #12823
Applying: Update to ignore broken iOS test for now
Using index info to reconstruct a base tree...
M	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs
Falling back to patching base and 3-way merge...
Auto-merging src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs
CONFLICT (content): Merge conflict in src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs
error: Failed to merge in the changes.
hint: Use 'git am --show-current-patch=diff' to see the failed patch
Patch failed at 0002 Update to ignore broken iOS test for now
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
Error: The process '/usr/bin/git' failed with exit code 128

Please backport manually!

@github-actions

Copy link
Copy Markdown
Contributor

@PureWeen an error occurred while backporting to net7.0, please check the run log for details!

Error: git am failed, most likely due to a merge conflict.

@PureWeen PureWeen added the backport/approved After some discussion or review, this PR or change was approved to be backported. label Jul 26, 2023
PureWeen pushed a commit that referenced this pull request Jul 26, 2023
…16093)

* Revert default for UseSafeAreaProperty to value from .NET 6 for iOS
Fixes #12823

* Update to ignore broken iOS test for now

* Fix shell tab test
# Conflicts:
#	src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.iOS.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs
rmarinho pushed a commit that referenced this pull request Aug 19, 2023
…16093) (#16379)

* Revert default for UseSafeAreaProperty to value from .NET 6 for iOS
Fixes #12823

* Update to ignore broken iOS test for now

* Fix shell tab test
# Conflicts:
#	src/Controls/tests/DeviceTests/Elements/Shell/ShellTests.iOS.cs
#	src/Controls/tests/DeviceTests/Elements/TabbedPage/TabbedPageTests.cs

Co-authored-by: E.Z. Hart <hartez@users.noreply.github.com>
rmarinho added a commit that referenced this pull request Sep 18, 2023
PureWeen pushed a commit that referenced this pull request Sep 18, 2023
@github-actions github-actions Bot locked and limited conversation to collaborators Dec 8, 2023
@samhouts samhouts added the fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! label Aug 2, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

backport/approved After some discussion or review, this PR or change was approved to be backported. backport/suggested The PR author or issue review has suggested that the change should be backported. fixed-in-8.0.0-preview.7.8842 Look for this fix in 8.0.0-preview.7.8842! platform/ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[regression/7.0.0] ISafeAreaView.IgnoreSafeArea isn't respected in .NET 7

5 participants