-
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(toast): add 'swipeGesture' property to dismiss toasts via swipe(… #23124
Conversation
…TakumaKira) - expanded
Thanks for the PR. What is the difference between this PR and the previous toast swipe gesture PR? (#22133). |
@liamdebeasi Please check the extended version of the PR [ @TakumaKira ] #22133 |
@liamdebeasi Added "vertical" and "horizontal" swipe |
What is the difference between a horizontal swipe and a swipe from the left or right? |
@liamdebeasi You can swipe in both directions instead of just one. |
Do you have any use cases for this? I wonder if it makes sense to just have the options be For example, if the toast was presented from the bottom and I had Similarly, is there any benefit to only letting someone swipe to the left to dismiss versus being able to swipe to the left or the right? |
@liamdebeasi In any case, if you do not see any use in them, then they can be removed. |
Thanks for the clarification, that makes sense. I think in that case we can infer the direction based upon the If Do you have any examples of the horizontal swipe in existing applications? I like the vertical swipe, but my concern with the horizontal swipe is that it is does not seem to exist in the Material Design spec. |
20210331_195252.mp4Samsung allows you to swipe in both directions |
Those looks like Android-specific notification center components, not a toast/snackbar. Do you have any examples of this horizontal gesture with a toast/snackbar? For example, the Snackbar Flutter demo on https://material.io/components/snackbars only lets you do a vertical swipe. |
@liamdebeasi I don't have an example app. I can remove the |
No problem, was just curious you knew of an example. I do see the benefit of this feature, so I think this is something we should add. This is a new API, so it would need to go into a minor release. We are focusing on patch releases and the new major version of Ionic Framework at the moment, but I can add this to our project board and we will do a full review as we get closer to planning a new minor release. |
} | ||
|
||
private clamp = (val: number) => { | ||
if (val > 1) { |
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.
Can this be simplified?
return val > 1 ? 1 : Math.max(0, val);
any news? |
Hi Ionic Team, |
Any updates? |
Any updates ???? |
I'd find this useful in my apps too :) |
can't wait to se this in the framework |
Hey whats going on here with this open PR ? Nobody form ionic Team here to add this in official ionic release. Would by nice to have this feature, because it would be feel more native for ios user. Push Messages from ios simply can swipe up |
Hi everyone, The team met a few weeks ago to discuss this PR, and we are interested in adding this feature. The next step is for the team to do a feature design document. This is where we determine the scope, requirements, and architecture of the feature to help ship a reliable API. Once that has been approved, someone from the team will review the PR and help make any changes necessary to get this PR ready to merge. Our primary focus right now is getting Ionic 7.0 into beta, which is why you have not seen much movement on this PR over the past few weeks. While I do not have a timeline for when this will merge, we recognize that this is an important feature for Ionic developers. Let me know if there are any questions. Thanks! |
This is great news - thanks for the update @liamdebeasi :) |
Is there any update on this being completed? Would a new PR with conflicts resolved be useful to that process? |
Is there any update on this? The PR has been opened more than 2 years above 😞 |
Any updates on the feature, since Ionic 7 is out? |
Issue number: resolves #21769 --------- <!-- 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. --> Toast does not support swipe gestures to dismiss. ## What is the new behavior? <!-- Please describe the behavior or changes that are being added by this PR. --> - Added a `swipeGesture` property that allows users to swipe toasts closed. Note: This is a combination of previous PRs #28380 and #28402⚠️ There is a visual glitch on iOS where dragging and having the toast animate back to its opened position causes a flicker. This is an iOS 17 regression and is being tracked in #28467. This bug has been reported to and confirmed by Apple. ## Does this introduce a breaking change? - [ ] Yes - [x] No <!-- If this introduces a breaking change, please describe the impact and migration path for existing applications below. --> ## Other information <!-- Any other information that is important to this PR such as screenshots of how the component looks before and after the change. -->⚠️ Give co-author credit to author in #23124 --------- Co-authored-by: evgeniy-skakun <evgeniy-skakun@users.noreply.github.com>
Hey there! Thanks for contributing this PR, and apologies for the delay in replying here. This feature was added to Ionic in #28442. The work you did here helped us build out the final implementation, so we've given you co-author credit in the commit that was merged. This feature will be available in an upcoming minor release of Ionic. I am going to close this, and thanks again for contributing to Ionic! |
…TakumaKira) - expanded
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?
Issue Number: N/A
What is the new behavior?
#21769
Does this introduce a breaking change?
Other information