Skip to content

Conversation

Chuckytuh
Copy link
Contributor

@Chuckytuh Chuckytuh commented Oct 8, 2025

Platforms affected

Android

Motivation and Context

With the changes added on #1817, when the app is in edge to edge mode or fullscreen, the left and right margin values are being read directly from the insets thus causing the webview to not take the full width/height in fullscreen or not be overlaid by navigation/gesture bar when rotation the device.

It's unclear to me whether this was intentional but, if it wasn't, this is an attempt to fix it to what I'd expect is the correct behavior.

Description

Testing

Created a dummy application and manually ran it on Android 10 and 16 and compared the results visually.

Current behavior:

non-e2e e2e fullscreen
Android 16 Screenshot 2025-10-07 at 20 55 50 Screenshot 2025-10-07 at 20 55 58 Screenshot 2025-10-07 at 20 57 26 Screenshot 2025-10-07 at 20 57 35 Screenshot 2025-10-07 at 20 58 45 Screenshot 2025-10-07 at 20 58 51
Android 10 Screenshot 2025-10-07 at 20 56 32 Screenshot 2025-10-07 at 20 56 36 Screenshot 2025-10-07 at 20 58 04 Screenshot 2025-10-07 at 20 58 09 Screenshot 2025-10-07 at 20 59 06 Screenshot 2025-10-07 at 20 59 10

Behavior after the fix on this PR:

non-e2e e2e fullscreen
Android 16 Screenshot 2025-10-07 at 21 00 12 Screenshot 2025-10-07 at 21 00 22 Screenshot 2025-10-07 at 21 01 07 Screenshot 2025-10-07 at 21 01 12 Screenshot 2025-10-07 at 21 02 48 Screenshot 2025-10-07 at 21 02 52
Android 10 Screenshot 2025-10-07 at 21 00 48 Screenshot 2025-10-07 at 21 00 53 Screenshot 2025-10-07 at 21 01 31 Screenshot 2025-10-07 at 21 01 45 Screenshot 2025-10-07 at 21 03 36 Screenshot 2025-10-07 at 21 03 40

Thanks Kepa for the help!

Checklist

  • I've run the tests to see all new and existing tests pass
  • I added automated test coverage as appropriate for this change
  • Commit is prefixed with (platform) if this change only applies to one platform (e.g. (android))
  • If this Pull Request resolves an issue, I linked to the issue in the text above (and used the correct keyword to close issues using keywords)
  • I've updated the documentation if necessary

Ensures that when in edge to edge or fullscreen modes the values for
margin left and right are 0

Co-authored-by: Kepa Totorica <[email protected]>
@codecov-commenter
Copy link

codecov-commenter commented Oct 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 60.79%. Comparing base (5bca218) to head (7faa0c4).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1847   +/-   ##
=======================================
  Coverage   60.79%   60.79%           
=======================================
  Files          23       23           
  Lines        4811     4811           
=======================================
  Hits         2925     2925           
  Misses       1886     1886           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@erisu erisu left a comment

Choose a reason for hiding this comment

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

It's unclear to me whether this was intentional but, if it wasn't, this is an attempt to fix it to what I'd expect is the correct behavior.

I do not remember why left and right was not handled, but I believe the behavior of the PR is correct and preferred.

The code changes looks good to me. I also tested with emulator SDK 36, 35, 30, and 24.

@Chuckytuh Chuckytuh mentioned this pull request Oct 8, 2025
5 tasks
@erisu erisu merged commit 360be21 into apache:master Oct 9, 2025
11 checks passed
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.

3 participants