Conversation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…or.mdx Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
akwasniewski
left a comment
There was a problem hiding this comment.
Looks nice! Though badges seem to be missing from components/buttons
j-piasecki
left a comment
There was a problem hiding this comment.
Can you merge/rebase main? The diff seems wrong now.
Done, could you re-check if everything is fine? @j-piasecki
Yes, those are missing from buttons because buttons docs are rewritten in other PR and I think that this one will be merged earlier 😅 (@akwasniewski) |
There was a problem hiding this comment.
Pull request overview
Adds a reusable docs component to annotate platform-specific API sections with Android/iOS/Web badges, and updates multiple MDX pages to use it for relevant headers.
Changes:
- Introduce
HeaderWithBadgecomponent to render headings alongside platform badges. - Wrap various platform-specific parameter headers across gesture/component docs with
HeaderWithBadge. - Adjust docs sidebar ordering for “Gesture composition & interactions”.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs-gesture-handler/src/components/HeaderWithBadge/index.tsx | New component to render headings with platform badges. |
| packages/docs-gesture-handler/docs/gestures/use-tap-gesture.mdx | Add platform badges to mouseButton section. |
| packages/docs-gesture-handler/docs/gestures/use-pan-gesture.mdx | Add badges to Android/iOS/Web-only config sections. |
| packages/docs-gesture-handler/docs/gestures/use-native-gesture.mdx | Add badge to Android-only config section. |
| packages/docs-gesture-handler/docs/gestures/use-long-press-gesture.mdx | Add platform badges to mouseButton section. |
| packages/docs-gesture-handler/docs/gestures/use-hover-gesture.mdx | Add badge to iOS-only config section. |
| packages/docs-gesture-handler/docs/gestures/use-fling-gesture.mdx | Add platform badges to mouseButton section. |
| packages/docs-gesture-handler/docs/gestures/_shared/base-gesture-config.mdx | Add badge to iOS-only config section. |
| packages/docs-gesture-handler/docs/fundamentals/gesture-detector.mdx | Add badges to Web-only config sections. |
| packages/docs-gesture-handler/docs/fundamentals/gesture-composition.mdx | Change sidebar_position value. |
| packages/docs-gesture-handler/docs/components/reanimated_swipeable.mdx | Add badges to iOS-only / Web-only / Android+Web sections. |
| packages/docs-gesture-handler/docs/components/reanimated-drawer-layout.mdx | Add badges to iOS-only / Web-only / Android+Web sections. |
| packages/docs-gesture-handler/docs/components/pressable.mdx | Add badges to Web-only / Android+iOS / Android-only sections. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
packages/docs-gesture-handler/docs/components/reanimated_swipeable.mdx
Outdated
Show resolved
Hide resolved
| <HeaderWithBadge platforms={['web']}> | ||
| ### onHoverIn | ||
| </HeaderWithBadge> |
There was a problem hiding this comment.
Doesn't this also work on native when using mouse/stylus?
There was a problem hiding this comment.
I also thought about it. I'm not sure about iOS, I can test it on android though.
| <HeaderWithBadge platforms={['web']}> | ||
| ### onHoverOut | ||
| </HeaderWithBadge> |
| <HeaderWithBadge platforms={['iOS']}> | ||
| ### enableTrackpadTwoFingerGesture | ||
| </HeaderWithBadge> |
packages/docs-gesture-handler/src/components/HeaderWithBadge/index.tsx
Outdated
Show resolved
Hide resolved
I guess you know the answer 😅 |

Description
This PR adds badges for platform specific features.
Test plan
Read docs 🤓