-
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
feat(modal): add ability to programmatically set current sheet breakpoint #24648
feat(modal): add ability to programmatically set current sheet breakpoint #24648
Conversation
# Conflicts: # core/src/components/modal/gestures/sheet.ts
# Conflicts: # core/src/components/modal/gestures/sheet.ts
# Conflicts: # core/src/components/modal/gestures/sheet.ts
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.
Have one suggested change for the public API naming for setting the breakpoint value.
Reviewed most of the changes here and they align with our internal feature design document. I would like to introduce a set of e2e tests on this new behavior, mainly to verify correct event emission and a few screenshot tests. I'll clone your fork this week and experiment with your changes to verify everything works correctly and will suggest a few tests on the new behavior.
Thanks for the great work here!
@sean-perkins Changes applied 😊 |
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.
We are getting close! Had one question.
I need to sync with the team tomorrow, trying to figure out the best way to test/validate a breakpoint is transitioned to correctly. Currently added coverage for events emitting/breakpoint values being set correctly.
Also due to the way we overwrite the implementation of ion-modal
in Angular, I need to add a small set of e2e tests to our Angular test app to validate event emissions. I should be able to finish this piece tonight.
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 LGTM once those two comments are addressed 👍
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.
Good to merge once my other two comments are addressed.
Great job @EinfachHans and @sean-perkins! This is a great feature addition to Ionic.
Pull request checklist
Please check if your PR fulfills the following requirements:
npm run build
) was run locally and any changes were pushednpm run lint
) has passed locally and any fixes were made for failuresPull request type
Please check the type of change your PR introduces:
What is the current behavior?
Developers cannot programmatically move a sheet modal breakpoint with an API.
Issue Number: #23917
What is the new behavior?
setCurrentBreakpoint(breakpoint: number)
to programmatically change the breakpoint of a sheet modal.getBreakpoint()
to get the active breakpoint value for a sheet modal.ionModalBreakpointWillChange/breakpointWillChange
event when the breakpoint is about to change.ionModalBreakpointDidChange/breakpointDidChange
event when the breakpoint changes.Does this introduce a breaking change?
Other information