Skip to content

Conversation

thetaPC
Copy link
Contributor

@thetaPC thetaPC commented Sep 5, 2023

Issue number: internal


What is the current behavior?

The --ion-safe-area-left and --ion-safe-area-right variables in ion-menu are being set as if they use the app's direction. It's been determined that safe area is not logical and uses the device's direction. The current implementation is adding padding in the wrong sides for ion-toolbar and ion-content within a ion-menu.

Additionally, ion-menu does not use the entire screen so the safe area only needs to be applied to the side that is touching the device screen.

What is the new behavior?

  • Set the --ion-safe-area-left and --ion-safe-area-right variables to the correct values based on the device's direction.
  • Padding is only added to the side that is not in the safe area.
  • ion-toolbar is adding --ion-safe-area-left and --ion-safe-area-right based on the device's direction.
  • ion-toolbar can now inherit the correct values from --ion-safe-area-left and --ion-safe-area-right.
  • ion-content can now inherit the correct values from --ion-safe-area-left and --ion-safe-area-right.

Does this introduce a breaking change?

  • Yes
  • No

Other information

Dev build: 7.3.4-dev.11694015543.18bc484f

@github-actions github-actions bot added the package: core @ionic/core package label Sep 5, 2023
@thetaPC thetaPC marked this pull request as ready for review September 6, 2023 18:25
Copy link
Contributor

@averyjohnston averyjohnston left a comment

Choose a reason for hiding this comment

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

This looks good, just had a quick comment on... well, the comments. 😆

Copy link
Contributor

@averyjohnston averyjohnston left a comment

Choose a reason for hiding this comment

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

Thank you!

@thetaPC thetaPC added this pull request to the merge queue Sep 7, 2023
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Sep 7, 2023
@thetaPC thetaPC added this pull request to the merge queue Sep 7, 2023
Merged via the queue into main with commit e0542a7 Sep 7, 2023
@thetaPC thetaPC deleted the FW-5064 branch September 7, 2023 18:51
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants