Skip to content
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

Unified safe area (insets) for Android and iOS #23811

Open
wants to merge 2 commits into
base: dev
Choose a base branch
from

Conversation

Gregman-js
Copy link

@Gregman-js Gregman-js commented Jan 20, 2025

Proposed change

I noticed minor differences between embedding WebView in iOS and Android.
Now the webview is not drawn under the navigation bar on Android, but on iOS it is.
I want to resolve part of this issue: draw webview under navigation bar on android.
env do not work on android, so I prepared another change for android repo to set --android-safe-area-inset-[...] (variable from this PR) on page load (PR, not required for this PR)
In this way, we can unify safe area on ios and android and create even more immersive views.
With these changes, we can also draw webview under status bar on android and iOS (require future work).
Working POC (left iOS, right android):
Screenshot 2025-01-20 at 17 18 57

Type of change

  • Dependency upgrade
  • Bugfix (non-breaking change which fixes an issue)
  • New feature (thank you!)
  • Breaking change (fix/feature causing existing functionality to break)
  • Code quality improvements to existing code or addition of tests

Example configuration

Additional information

When Google will fix env support on android webview, we can just change property to env
First commit: new properties
Second commit: I've replaced all occurence of env in code for new properties

Checklist

  • The code change is tested and works locally.
  • There is no commented out code in this PR.
  • Tests have been added to verify that the new code works.

If user exposed functionality or configuration variables are added/changed:

Copy link

@home-assistant home-assistant bot left a comment

Choose a reason for hiding this comment

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

Hi @Gregman-js

It seems you haven't yet signed a CLA. Please do so here.

Once you do that we will be able to review and accept this pull request.

Thanks!

@home-assistant
Copy link

Please take a look at the requested changes, and use the Ready for review button when you are done, thanks 👍

Learn more about our pull request process.

@home-assistant home-assistant bot marked this pull request as draft January 20, 2025 16:37
@github-actions github-actions bot added Supervisor Related to the supervisor panel Demo Related to frontend demo content labels Jan 20, 2025
@Gregman-js Gregman-js marked this pull request as ready for review January 20, 2025 16:42
@Gregman-js
Copy link
Author

As @jpelgrom said in the linked issue. We need to think about how to handle situation where user have updated android app and old server which do not support new css variables yet...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed Demo Related to frontend demo content Supervisor Related to the supervisor panel
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant