Skip to content

[docs] Add platform badges#3975

Merged
m-bert merged 64 commits intomainfrom
@mbert/docs-badges
Feb 19, 2026
Merged

[docs] Add platform badges#3975
m-bert merged 64 commits intomainfrom
@mbert/docs-badges

Conversation

@m-bert
Copy link
Contributor

@m-bert m-bert commented Feb 13, 2026

Description

This PR adds badges for platform specific features.

darkmode lightmode
image image

Test plan

Read docs 🤓

Copy link
Contributor

@akwasniewski akwasniewski left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks nice! Though badges seem to be missing from components/buttons

Copy link
Member

@j-piasecki j-piasecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you merge/rebase main? The diff seems wrong now.

Copilot AI review requested due to automatic review settings February 13, 2026 19:57
@m-bert
Copy link
Contributor Author

m-bert commented Feb 13, 2026

Can you merge/rebase main? The diff seems wrong now.

Done, could you re-check if everything is fine? @j-piasecki

Looks nice! Though badges seem to be missing from components/buttons

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)

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 HeaderWithBadge component 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.

@m-bert m-bert added the Documentation Documentation change/enhancement label Feb 16, 2026
Comment on lines 92 to 94
<HeaderWithBadge platforms={['web']}>
### onHoverIn
</HeaderWithBadge>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this also work on native when using mouse/stylus?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I also thought about it. I'm not sure about iOS, I can test it on android though.

Comment on lines 102 to 104
<HeaderWithBadge platforms={['web']}>
### onHoverOut
</HeaderWithBadge>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as above

Comment on lines 224 to 226
<HeaderWithBadge platforms={['iOS']}>
### enableTrackpadTwoFingerGesture
</HeaderWithBadge>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This also works on web

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True, e15ee60

Copy link
Member

@j-piasecki j-piasecki left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

How hard would adding colored dots in the table of contents on the right?

Somewhat like RN does it:

Image

But since we may have more than one, we'd likely want them on the right

@m-bert
Copy link
Contributor Author

m-bert commented Feb 19, 2026

How hard would adding colored dots in the table of contents on the right?

I guess you know the answer 😅

#3985

@m-bert m-bert requested a review from j-piasecki February 19, 2026 12:26
@m-bert m-bert merged commit a4f618c into main Feb 19, 2026
2 checks passed
@m-bert m-bert deleted the @mbert/docs-badges branch February 19, 2026 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Documentation Documentation change/enhancement

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments