-
-
Notifications
You must be signed in to change notification settings - Fork 984
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
Guides need to show importing #2604
Comments
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? |
(I couldn't figure out where to file docs issues so filed here) |
Hi @gaearon 👋 it's a great suggestion! We're well aware the Gesture Handler docs aren't in the best shape. A full-rewrite of the RNGH documentation is inevitable same as we did with Reanimated docs not so long ago but it'll take some time considering our limited resources. In the meantime, I'll try to cleanup the docs a bit and add the imports as you suggest in #2607. Cheers |
## 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 <jakub.piasecki@swmansion.com> Co-authored-by: Michał Bert <63123542+m-bert@users.noreply.github.com>
Description
I'm reading https://docs.swmansion.com/react-native-gesture-handler/docs/quickstart/ and it's frustrating that there are no import statements. So I need to guess where to get
GestureDetector
,Animated.View
,useSharedValue
,Gesture
, etc, from. This is particularly thorny because these example "span" two different libraries — also it's very easy to get confused about whichAnimated
is being talked about.I suggest adding clear import sections to https://docs.swmansion.com/react-native-gesture-handler/docs/quickstart/ and other guides. Ideally examples always need to be ready to be copy pasted.
Thanks!
Steps to reproduce
Open docs
Snack or a link to a repository
irrelevant
Gesture Handler version
irrelevant
React Native version
irrelevant
Platforms
Android, iOS, Web
JavaScript runtime
None
Workflow
None
Architecture
None
Build type
None
Device
None
Device model
No response
Acknowledgements
Yes
The text was updated successfully, but these errors were encountered: