Conversation
There was a problem hiding this comment.
I've extracted it to hook because as far as I remember similar logic was used in other places.
j-piasecki
left a comment
There was a problem hiding this comment.
I don't think we're passing stateManager inside touch events any longer. This also needs to be mentioned.
Co-authored-by: Jakub Piasecki <jakub.piasecki@swmansion.com>
…tware-mansion/react-native-gesture-handler into @mbert/docs-remove-enabled-root-view
There was a problem hiding this comment.
Pull request overview
This PR updates the migration documentation for React Native Gesture Handler by removing outdated guides (upgrading to version 2 and migrating off RNGHEnabledRootView) and adding a comprehensive new guide for upgrading to version 3. The changes also include refactoring code formatting utilities and adding support for side-by-side code comparisons to better illustrate API changes.
Changes:
- Removed old migration guides for RNGH 2 and RNGHEnabledRootView, as they are no longer relevant
- Added comprehensive new migration guide documenting the transition from RNGH 2 to RNGH 3, covering gestures, relations, SVG usage, components, and type changes
- Refactored code formatting logic into a reusable hook and created a new CodeComparison component for side-by-side code examples
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs-gesture-handler/src/theme/MDXComponents/Details.js | Updated MDX component to use item.type instead of deprecated item.props?.mdxType for MDX v3 compatibility |
| packages/docs-gesture-handler/src/hooks/useFormattedCode.tsx | Extracted code formatting logic into a reusable custom hook for consistent code formatting across components |
| packages/docs-gesture-handler/src/css/overrides.css | Added CSS styles for code comparison component and improved table styling in details sections |
| packages/docs-gesture-handler/src/components/CollapsibleCode/index.tsx | Refactored to use the new useFormattedCode hook, removing duplicated formatting logic |
| packages/docs-gesture-handler/src/components/CodeComparison/index.tsx | New component for displaying side-by-side code comparisons with headers, used throughout the migration guide |
| packages/docs-gesture-handler/docs/guides/upgrading-to-3.mdx | Comprehensive new migration guide documenting all changes between RNGH 2 and RNGH 3 APIs |
| packages/docs-gesture-handler/docs/guides/upgrading-to-2.md | Removed obsolete RNGH 2 migration guide |
| packages/docs-gesture-handler/docs/guides/troubleshooting.md | Updated Discord link from Expo to Software Mansion and standardized quote style |
| packages/docs-gesture-handler/docs/guides/migrating-off-rnghenabledroot.md | Removed obsolete RNGHEnabledRootView migration guide |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Andrzej Antoni Kwaśniewski <81448793+akwasniewski@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Of course I had to forget 😄 I added it in f1054dc |
Description
This PR removes old migration guide and adds new one.
Test plan
Read docs 🤓