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
bug: Action sheet does not completely translate off bottom of page with safe areas #28541
Closed
3 tasks done
Labels
Comments
liamdebeasi
added
package: core
@ionic/core package
type: bug
a confirmed bug report
labels
Nov 16, 2023
2 tasks
github-merge-queue bot
pushed a commit
that referenced
this issue
Feb 6, 2024
Issue number: resolves #28541 --------- <!-- Please do not submit updates to dependencies unless it fixes an issue. --> <!-- Please try to limit your pull request to one type (bugfix, feature, etc). Submit multiple pull requests if needed. --> ## What is the current behavior? <!-- Please describe the current behavior that you are modifying. --> 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? <!-- Please describe the behavior or changes that are being added by this PR. --> - The `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%` and `0%`](https://github.com/ionic-team/ionic-framework/blob/9d57758e3ec1095c6eb951d2640b95084b711bbc/core/src/components/action-sheet/animations/ios.enter.ts#L23). |Before|After| |---|---| |<video src="https://github.com/ionic-team/ionic-framework/assets/13732623/d9475a54-f1b9-4283-ae1a-86e2b71a9d9e"></video>|<video src="https://github.com/ionic-team/ionic-framework/assets/13732623/d051b4d9-4f45-4a51-b522-510f8cddef74"></video>| In the recorded examples the bottom safe area is exaggerated to show the dismiss animation differences. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change: 1. Describe the impact and migration path for existing applications below. 2. Update the BREAKING.md file with the breaking change. 3. Add "BREAKING CHANGE: [...]" to the commit description when merging. See https://github.com/ionic-team/ionic-framework/blob/main/.github/CONTRIBUTING.md#footer for more information. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. --> To test this PR, I would recommend adding the following styles to the action sheet basic test: ```html <style> ion-action-sheet { --ion-safe-area-bottom: 100px; } </style> ``` You can then open dev-tools and slow the animation speed to 10%: ![CleanShot 2024-01-29 at 19 49 32@2x](https://github.com/ionic-team/ionic-framework/assets/13732623/535fa663-213c-4a09-b94a-db334e4d3d29) - Open and dismiss the action sheet tied to the "Basic" button. - Verify that the action sheet animates completely off the view when dismissed. - Open the and dismiss the action sheet tied to the "Custom CSS Class" button. This implementation customizes the `--height` of the action sheet. - Verify that the action sheet animates completely off the view when dismissed. --------- Co-authored-by: ionitron <hi@ionicframework.com> Co-authored-by: Liam DeBeasi <liamdebeasi@users.noreply.github.com>
Thanks for the issue! This issue is being locked to prevent comments that are not relevant to the original issue. If this is still an issue with the latest version of Ionic, please create a new issue and ensure the template is fully filled out. |
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Prerequisites
Ionic Framework Version
v7.x
Current Behavior
When you dismiss an action sheet on a screen with safe areas, the action sheet does not fully transition off the screen before being destroyed.
Once you see it, you cannot unsee :)
Expected Behavior
Action sheet should fully transition off screen before destroy
Steps to Reproduce
Code Reproduction URL
https://github.com/aeharding/action-sheet-dismiss
Ionic Info
Ionic:
Ionic CLI : 7.1.1 (/Users/aeharding/.nvm/versions/node/v20.8.1/lib/node_modules/@ionic/cli)
Ionic Framework : @ionic/react 7.5.5
Capacitor:
Capacitor CLI : 5.5.1
@capacitor/android : not installed
@capacitor/core : 5.5.1
@capacitor/ios : not installed
Utility:
cordova-res : not installed globally
native-run : not installed globally
System:
NodeJS : v20.8.1 (/Users/aeharding/.nvm/versions/node/v20.8.1/bin/node)
npm : 10.1.0
OS : macOS Unknown
Additional Information
RPReplay_Final1700098414.MP4
The text was updated successfully, but these errors were encountered: