Skip to content
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: swipe to go back anywhere on view #27743

Open
3 tasks done
aeharding opened this issue Jul 4, 2023 · 11 comments
Open
3 tasks done

feat: swipe to go back anywhere on view #27743

aeharding opened this issue Jul 4, 2023 · 11 comments
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement

Comments

@aeharding
Copy link
Contributor

aeharding commented Jul 4, 2023

Prerequisites

Describe the Feature Request

Swipe to go back with the gesture initiating anywhere on the screen

Describe the Use Case

Users have:

  1. accessibility issues
  2. bulkier phone cases
  3. gloves

that prevents, or make it difficult to, swipe from the left edge of the device.

Describe Preferred Solution

Option to enable/disable full screen page swipe

Describe Alternatives

I do not believe this is possible to implement without a library change.

Related Code

No response

Additional Information

Note I'm aware that this would require all ion-sliding-item to be disabled. I'm fine with this being done in the implementation/application code

Request from users of wefwef: https://lemmy.world/post/1028383

Related issue: aeharding/voyager#101

@liamdebeasi
Copy link
Contributor

Thanks for the report. Do you have a video of how you are expecting this behavior to work?

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Jul 5, 2023
@ionitron-bot ionitron-bot bot removed the triage label Jul 5, 2023
@aeharding
Copy link
Contributor Author

Here you go! FWIW, this was a feature on Apollo for Reddit.

IMG_2710.mp4

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Jul 5, 2023
@liamdebeasi
Copy link
Contributor

Thanks for the video. Is this a video of Apollo, or is it a video of your app? Ionic currently supports swiping from the edge of the screen for swipe to go back.

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Jul 5, 2023
@ionitron-bot ionitron-bot bot removed the triage label Jul 5, 2023
@aeharding
Copy link
Contributor Author

Thanks for the video. Is this a video of Apollo, or is it a video of your app? Ionic currently supports swiping from the edge of the screen for swipe to go back.

This video is wefwef, not Apollo. Swiping from the left edge of screen works great; we'd like the option to allow swiping to go back where the event initiates anywhere on the screen, not just the left edge.

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Jul 5, 2023
@liamdebeasi
Copy link
Contributor

Do you have examples of other apps that implement this? Apollo has shut down, so I'm not able to see how this behavior would work.

@liamdebeasi liamdebeasi added the needs: reply the issue needs a response from the user label Jul 5, 2023
@ionitron-bot ionitron-bot bot removed the triage label Jul 5, 2023
@NoWayBehind
Copy link

RPReplay_Final1688588264.mp4

Like this (example of the Reddit app, which partially has it). Apollo solved it by disabling the other gestures. In Apollo you could also do an additional swipe to the subreddit list, which would be intuitive here as well.

@ionitron-bot ionitron-bot bot added triage and removed needs: reply the issue needs a response from the user labels Jul 5, 2023
@liamdebeasi
Copy link
Contributor

liamdebeasi commented Jul 5, 2023

Thanks for the video. It looks like you can also do this with the Slack mobile app. It sounds like this feature request is more about being able to swipe anywhere on the view to go back than being able to swipe anywhere on the screen. For example, you should not be able to swipe back on the tab bar because the tab bar is not part of the child view. However, with this feature request users would not be limited to swiping only on the starting edge of the view. I think this would be a good feature to have.

@liamdebeasi liamdebeasi changed the title feat: Full screen swipe to go back feat: swipe to go back anywhere on view Jul 5, 2023
@liamdebeasi liamdebeasi added type: feature request a new feature, enhancement, or improvement package: core @ionic/core package labels Jul 5, 2023
@ionitron-bot ionitron-bot bot removed the triage label Jul 5, 2023
@liamdebeasi
Copy link
Contributor

On a related note: How did you suppress the native iOS page transition on your app when using it as a PWA? Typically when you swipe on a child page Ionic's page transition as well as the native iOS page transition activates. However, in your app only the Ionic one activates.

@aeharding
Copy link
Contributor Author

On a related note: How did you suppress the native iOS page transition on your app when using it as a PWA? Typically when you swipe on a child page Ionic's page transition as well as the native iOS page transition activates. However, in your app only the Ionic one activates.

Oh, that's a fun hack: I detect if the webapp is installed (and is iOS) and then use the memory router :)

https://github.com/aeharding/wefwef/blob/main/src/Router.tsx

@aeharding
Copy link
Contributor Author

Thanks for the video. It looks like you can also do this with the Slack mobile app. It sounds like this feature request is more about being able to swipe anywhere on the view to go back than being able to swipe anywhere on the screen. For example, you should not be able to swipe back on the tab bar because the tab bar is not part of the child view. However, with this feature request users would not be limited to swiping only on the starting edge of the view. I think this would be a good feature to have.

That sounds great! However I feel like I should mention that in Apollo, you can always swipe anywhere on the tab bar to initiate a swipe gesture to go back a page. So even if you have full page swipe turned off for the app, it's a nice shortcut. 🙂

(Likely out of scope for this feature request, and totally a non-standard thing, but might be worth consideration.)

@liamdebeasi
Copy link
Contributor

liamdebeasi commented Jul 6, 2023

On a related note: How did you suppress the native iOS page transition on your app when using it as a PWA? Typically when you swipe on a child page Ionic's page transition as well as the native iOS page transition activates. However, in your app only the Ionic one activates.

Oh, that's a fun hack: I detect if the webapp is installed (and is iOS) and then use the memory router :)

https://github.com/aeharding/wefwef/blob/main/src/Router.tsx

Oh clever! I have been trying to get a feature added to the Web Manifest that would allow devs to disable the native gestures so they can use URL-based routing: w3c/manifest#1041. I think having a use case like yours would go a long way in making the case for this feature.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: core @ionic/core package type: feature request a new feature, enhancement, or improvement
Projects
None yet
Development

No branches or pull requests

3 participants