Skip to content

Conversation

@timmo001
Copy link
Member

@timmo001 timmo001 commented Sep 1, 2025

Breaking change

Proposed change

Part of continuation of #25566

Applies safe-area insets to dialogs and more-info components, ensuring content doesn't get clipped on devices with display cutouts while maintaining desktop appearance.

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

  • This PR fixes or closes issue: fixes #
  • This PR is related to issue or discussion: Safe areas #26818
  • Link to documentation pull request:

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:

@timmo001 timmo001 mentioned this pull request Sep 1, 2025
43 tasks
@timmo001 timmo001 changed the title Safe area: dialog content padding and header mobile insets Safe area: dialogs Sep 2, 2025
@timmo001
Copy link
Member Author

timmo001 commented Sep 2, 2025

With app insets manually set in main.globals.ts:

    --app-safe-area-inset-top: 64px;
    --app-safe-area-inset-bottom: 32px;
    --app-safe-area-inset-left: 8px;
    --app-safe-area-inset-right: 8px;
image image

@timmo001 timmo001 marked this pull request as ready for review September 2, 2025 10:16
@timmo001 timmo001 marked this pull request as draft September 2, 2025 10:22
@timmo001
Copy link
Member Author

timmo001 commented Sep 2, 2025

Need to look into other types of dialogs, this one appears to go off screen
image

@timmo001
Copy link
Member Author

timmo001 commented Sep 2, 2025

Now acting much nicer:

image image image image image image image image image

@timmo001 timmo001 marked this pull request as ready for review September 2, 2025 13:12
Comment on lines 152 to 155
margin-top: var(--safe-area-inset-top);
margin-right: var(--safe-area-inset-right);
margin-left: var(--safe-area-inset-left);
margin-bottom: var(--safe-area-inset-bottom);
Copy link
Member

Choose a reason for hiding this comment

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

I get why min-height and max-height are inside @media but I think the margins should be outside. There may be tablets or other large screen devices with safe area insets

@timmo001 timmo001 requested a review from MindFreeze September 3, 2025 09:36
MindFreeze
MindFreeze previously approved these changes Sep 3, 2025
@timmo001 timmo001 marked this pull request as draft September 3, 2025 14:40
@timmo001
Copy link
Member Author

timmo001 commented Sep 3, 2025

Fixed using min-width for container instead, and using padding for top and bottom.

Also fixed two lit-virtualizer height issues

@timmo001 timmo001 marked this pull request as ready for review September 3, 2025 15:24
@timmo001
Copy link
Member Author

timmo001 commented Sep 3, 2025

I think this may be causing double safe areas now as other components set --mdc-dialog-min-width themselves using left and right safe areas.

The best way to solve this would be to remove the calculations from the other components and only do this once in ha-dialog

@timmo001 timmo001 marked this pull request as draft September 3, 2025 15:45
@timmo001 timmo001 marked this pull request as ready for review September 3, 2025 15:52
@silamon silamon merged commit 62714b2 into dev Sep 8, 2025
15 checks passed
@silamon silamon deleted the feature/safe-area-dialogs branch September 8, 2025 07:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants