Conversation
There was a problem hiding this comment.
Pull request overview
This PR refactors the documentation by extracting duplicated mouseButton prop documentation into a reusable shared component and removes this prop from components where it's not actually supported.
Changes:
- Created a new shared
mouse-button.mdxcomponent to consolidate repeatedmouseButtondocumentation - Replaced duplicated
mouseButtonsections in gesture documentation files (tap, pan, long-press, fling) with the shared component - Replaced duplicated
mouseButtonsection inreanimated-drawer-layout.mdxwith the shared component - Removed
mouseButtondocumentation fromreanimated_swipeable.mdxas it's an unused/unsupported prop for that component - Fixed grammatical error in the description text
Reviewed changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs-gesture-handler/docs/gestures/_shared/mouse-button.mdx | New shared component containing the mouseButton prop documentation with improved grammar |
| packages/docs-gesture-handler/docs/gestures/use-tap-gesture.mdx | Replaced inline mouseButton documentation with shared component import |
| packages/docs-gesture-handler/docs/gestures/use-pan-gesture.mdx | Replaced inline mouseButton documentation with shared component import |
| packages/docs-gesture-handler/docs/gestures/use-long-press-gesture.mdx | Replaced inline mouseButton documentation with shared component import |
| packages/docs-gesture-handler/docs/gestures/use-fling-gesture.mdx | Replaced inline mouseButton documentation with shared component import |
| packages/docs-gesture-handler/docs/components/reanimated_swipeable.mdx | Removed unsupported mouseButton prop documentation |
| packages/docs-gesture-handler/docs/components/reanimated-drawer-layout.mdx | Replaced inline mouseButton documentation with shared component import |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ### mouseButton | ||
| </HeaderWithBadge> | ||
|
|
||
| <CollapsibleCode |
There was a problem hiding this comment.
The CollapsibleCode component is used on line 7 but is not imported. Add the missing import statement at the top of the file.
|
|
||
| import MouseButtonProp from './\_shared/mouse-button.mdx'; | ||
|
|
||
|
|
There was a problem hiding this comment.
Extra blank line added after the import statement. This appears inconsistent with the import style in other files like use-tap-gesture.mdx and use-pan-gesture.mdx where there's only one blank line between import statements.
|
|
||
| import MouseButtonProp from './\_shared/mouse-button.mdx'; | ||
|
|
||
|
|
There was a problem hiding this comment.
Extra blank line added after the import statement. This appears inconsistent with the import style in other files like use-tap-gesture.mdx and use-pan-gesture.mdx where there's only one blank line between import statements.
|
|
||
|
|
There was a problem hiding this comment.
Extra blank line added after the import statement. This appears inconsistent with the import style in other files like use-tap-gesture.mdx and use-pan-gesture.mdx where there's only one blank line between import statements.
Description
In progress
Test plan
Read docs 🤓