Skip to content

Fix SafeAreaPaddingModifier#793

Open
Dark-Existed wants to merge 1 commit intoOpenSwiftUIProject:mainfrom
Dark-Existed:fix_safeareapaddingmodifier
Open

Fix SafeAreaPaddingModifier#793
Dark-Existed wants to merge 1 commit intoOpenSwiftUIProject:mainfrom
Dark-Existed:fix_safeareapaddingmodifier

Conversation

@Dark-Existed
Copy link
Contributor

Fix #511

@augmentcode
Copy link

augmentcode bot commented Feb 15, 2026

🤖 Augment PR Summary

Summary: Fixes SafeAreaPaddingModifier to better match SwiftUI behavior by eliminating unintended extra spacing and honoring the requested edges.

Changes: Adds spacing: 0 to the internal safeAreaInset chain, gates each inset by edges.contains(_:), and re-enables the UI snapshot test for #511.

🤖 Was this summary useful? React with 👍 or 👎

Copy link

@augmentcode augmentcode bot left a comment

Choose a reason for hiding this comment

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

Review completed. 1 suggestions posted.

Fix All in Augment

Comment augment review to trigger a new review at any time.

.bug("https://github.com/OpenSwiftUIProject/OpenSwiftUI/issues/511"),
.disabled("Extra spacing value is taken into account. Disable the test case before we fix it.")
)
@Test(.bug("https://github.com/OpenSwiftUIProject/OpenSwiftUI/issues/511"))
Copy link

Choose a reason for hiding this comment

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

Now that SafeAreaPaddingModifier behavior depends on the selected edges, consider adding a snapshot here that exercises a non-.all case (e.g. .safeAreaPadding(.horizontal, 20)) so regressions in edge filtering get caught.

Severity: low

Fix This in Augment

🤖 Was this useful? React with 👍 or 👎, or 🚀 if it prevented an incident/outage.

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.

Bug: safeAreaPadding API not working correctly

1 participant