-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
fix(action-sheet): iOS dismiss animation respects safe area #28915
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
sean-perkins
commented
Jan 30, 2024
sean-perkins
requested review from
liamdebeasi
and removed request for
a team
January 30, 2024 21:29
sean-perkins
commented
Jan 30, 2024
...ion-sheet-rendering.e2e.ts-snapshots/action-sheet-custom-diff-md-ltr-Mobile-Chrome-linux.png
Outdated
Show resolved
Hide resolved
liamdebeasi
reviewed
Feb 1, 2024
liamdebeasi
approved these changes
Feb 5, 2024
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.
One non-blocking comment. Great job!
Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Issue number: resolves #28541
What is the current behavior?
On iOS when dismissing the
ion-action-sheet
, the animation does not account for the safe area of the device. This results in the action sheet not completely animating off the visible viewport on a device with safe area enabled.What is the new behavior?
ion-action-sheet
will animate consistently off the viewport when dismissing, including the safe area.To better support custom animations not needing to account for the safe area, the safe area has been added to the padding of the action sheet container. This results in the height increasing based on the bottom safe area and animating correctly when translating between
100%
and0%
.Kapture.2024-02-01.at.18.08.14.mp4
Kapture.2024-02-01.at.18.05.06.mp4
In the recorded examples the bottom safe area is exaggerated to show the dismiss animation differences.
Does this introduce a breaking change?
Other information
To test this PR, I would recommend adding the following styles to the action sheet basic test:
You can then open dev-tools and slow the animation speed to 10%:
--height
of the action sheet.