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

Typo (?) in docs about Android behavior #2608

Closed
gaearon opened this issue Sep 22, 2023 · 1 comment · Fixed by #2607
Closed

Typo (?) in docs about Android behavior #2608

gaearon opened this issue Sep 22, 2023 · 1 comment · Fixed by #2607
Labels
Documentation Documentation change/enhancement will likely prevent people from encountering this problem

Comments

@gaearon
Copy link

gaearon commented Sep 22, 2023

Description

From https://docs.swmansion.com/react-native-gesture-handler/docs/api/gestures/pan-gesture#multi-touch-pan-handling:

The difference in multi touch pan handling lies in the way how translation properties during the event are being calculated. On iOS the default behavior when more than one finger is placed on the screen is to treat this situation as if only one pointer was placed in the center of mass (average position of all the pointers). This applies also to many platform native components that handle touch even if not primarily interested in multi touch interactions like for example UIScrollView component.

The default behavior for native components like scroll view, pager views or drawers is different and hence gesture defaults to that when it comes to pan handling. The difference is that instead of treating the center of mass of all the fingers placed as a leading pointer it takes the latest placed finger as such. This behavior can be changed on Android using avgTouches flag.

Is the second paragraph meant to refer to Android, e.g. "The default behavior for native Android components"? Otherwise it's unclear what it's describing and how it relates to the previous paragraph. Also, the avgTouches link doesn't go anywhere.

Steps to reproduce

see above

Snack or a link to a repository

irrelevant

Gesture Handler version

irrelevant

React Native version

irrelevant

Platforms

Android

JavaScript runtime

None

Workflow

None

Architecture

None

Build type

None

Device

None

Device model

No response

Acknowledgements

Yes

@github-actions github-actions bot added Platform: Android This issue is specific to Android Missing repro labels Sep 22, 2023
@github-actions
Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@m-bert m-bert added Documentation Documentation change/enhancement will likely prevent people from encountering this problem and removed Platform: Android This issue is specific to Android Missing repro labels Sep 28, 2023
kacperkapusciak added a commit that referenced this issue Sep 29, 2023
## Description

This PR aims to clean-up React Native Gesture Handler docs.

Fixes
#2604
Fixes
#2608

## Changes

### Before

Confusing sidebar with nesting and hard to find pages for newcomers



https://github.com/software-mansion/react-native-gesture-handler/assets/39658211/3263431a-60f5-4aeb-98a8-3b9aa66fa4fe



### After

Open sidebar with one level of page nesting



https://github.com/software-mansion/react-native-gesture-handler/assets/39658211/1471ebb3-87b4-4cae-96a1-a76fe9cacc50


### Before

A lot of versions which many of them are duplicates with a couple of
changes eg. one function added



https://github.com/software-mansion/react-native-gesture-handler/assets/39658211/b4f7b818-dce8-49a7-b23e-df6db931a5b7



### After

2 major versions same as the library



https://github.com/software-mansion/react-native-gesture-handler/assets/39658211/5c5105d4-2c69-4179-8ae3-0e4204131708


### Also

- Added imports to examples
- Fix examples in Gestures so they can be copied, compiled and run
without any changes
- Added a couple of videos showcasing the gestures
- Made redirects from old versions to the new ones (a bit flaky tbh) 


## Test plan

```
cd docs/
yarn
yarn start
```

---------

Co-authored-by: Jakub Piasecki <[email protected]>
Co-authored-by: Michał Bert <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Documentation Documentation change/enhancement will likely prevent people from encountering this problem
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants