-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Support missing safe areas #25566
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
Support missing safe areas #25566
Conversation
| margin-top: calc( | ||
| var(--dialog-surface-margin-top) + var(--safe-area-inset-top) | ||
| ); | ||
| // TODO support left, right and bottom safe area |
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.
This needs to be done in content probably, this is only on mobile/narrow I guess?
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.
I guess we could ignore the fact that it's mobile or not we just look at the safe areas no?
| #ha-launch-screen .ha-launch-screen-spacer-top { | ||
| flex: 1; | ||
| margin-top: calc( 2 * max(var(--safe-area-inset-bottom), 48px) + 46px ); | ||
| margin-top: calc( 2 * max(var(--safe-area-inset-top), 48px) + 46px ); |
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.
@Madelena was it on purpose to use the bottom inset? If yes I will revert it. In any case the safe-area on the index is broken on Android and should be fully hidden with this #25563 (reply in thread) same for iOS.
src/components/ha-dialog-header.ts
Outdated
| color: var(--secondary-text-color); | ||
| } | ||
| header { | ||
| padding-top: var(--safe-area-inset-top); |
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.
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.
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.
Entity details look good.
Others screens that need adjustment now or later:
- Assistant - missing bottom insets near input area
- quick-bar e.g. search entity - missing all insets
- ha-dialog - missing left, right insets which can be problematic in landscape mode
- logbook,history - missing left,right,bottom insets
|
@bramkragten Could we add in the CC @Gregman-js it would make it possible to know if the server supports it even without being logged in. |
|
This PR would help several people running HA app on Android tablets to get back the full-screen mode on the latest version. For the time being, because of this, I was forced to switch back to 2025.7.1. |
I think you can know the version of HA already, It is in the mdns discovery data. Or is that not easy to get? |
We do also need to handle the case without mDNS. And I don't think we should expose the HA version in the manifest, that's why I proposed a flag that just say if it support edge to edge or not :) |
|
Will close and keep as reference for #26818 now that some of the changes have been merged |



Proposed change
With Android edge to edge feature we found out multiple issues in the usage of the safe area. This PR adds missing safe area usage for the toolbar, drawer and dialogs. It misses other places and I've added todo on the parts that I don't know how to handle properly.
Type of change
Additional information
Checklist