Skip to content

docs: bump t-rex-ui#4019

Open
patrycjakalinska wants to merge 4 commits intomainfrom
@patrycjakalinska/docs/bump-t-rex-ui-1.3.0
Open

docs: bump t-rex-ui#4019
patrycjakalinska wants to merge 4 commits intomainfrom
@patrycjakalinska/docs/bump-t-rex-ui-1.3.0

Conversation

@patrycjakalinska
Copy link
Contributor

Description

Test plan

Copilot AI review requested due to automatic review settings March 10, 2026 15:02
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

This PR refreshes the docs-gesture-handler site by introducing a large set of “raw” markdown documentation artifacts (likely for downstream processing/LLM indexing), updating the Docusaurus setup to use the @swmansion/t-rex-ui preset, and migrating MDX pages to use the new Badges component instead of the removed local HeaderWithBadges.

Changes:

  • Add extensive new documentation content under static/raw/** plus an llms.txt index.
  • Replace local theme/component re-export wrappers with the @swmansion/t-rex-ui/preset and expose Badges globally via src/theme/MDXComponents.js.
  • Update docs site dependencies/config and introduce new CSS variables for copy-button/badges styling.

Reviewed changes

Copilot reviewed 113 out of 115 changed files in this pull request and generated 16 comments.

Show a summary per file
File Description
packages/docs-gesture-handler/static/raw/under-the-hood/state.md Adds raw “handler state machine” documentation.
packages/docs-gesture-handler/static/raw/under-the-hood/how-does-it-work.md Adds raw under-the-hood platform behavior documentation.
packages/docs-gesture-handler/static/raw/legacy-gestures/touch-events.md Adds raw legacy touch event attribute reference.
packages/docs-gesture-handler/static/raw/legacy-gestures/tap-gesture.md Adds raw legacy Tap gesture documentation.
packages/docs-gesture-handler/static/raw/legacy-gestures/state-manager.md Adds raw legacy state manager docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/rotation-gesture.md Adds raw legacy Rotation gesture docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/pinch-gesture.md Adds raw legacy Pinch gesture docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/pan-gesture.md Adds raw legacy Pan gesture docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/native-gesture.md Adds raw legacy Native gesture docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/manual-gesture.md Adds raw legacy Manual gesture docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/long-press-gesture.md Adds raw legacy Long Press gesture docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/hover-gesture.md Adds raw legacy Hover gesture docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/gesture.md Adds raw legacy Gesture builder overview.
packages/docs-gesture-handler/static/raw/legacy-gestures/gesture-detector.md Adds raw legacy GestureDetector docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/gesture-composition.md Adds raw legacy gesture composition docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/force-touch-gesture.md Adds raw legacy ForceTouch docs (deprecated).
packages/docs-gesture-handler/static/raw/legacy-gestures/fling-gesture.md Adds raw legacy Fling gesture docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/composed-gestures.md Adds raw legacy composed gestures overview.
packages/docs-gesture-handler/static/raw/legacy-gestures/_shared/v2-info.md Adds shared warning block for legacy RNGH2 docs.
packages/docs-gesture-handler/static/raw/legacy-gestures/_shared/gesture-detector-functional1.md Adds shared example snippet for legacy detector usage.
packages/docs-gesture-handler/static/raw/legacy-gestures/_shared/base-gesture-event-data.md Adds shared legacy base event data content.
packages/docs-gesture-handler/static/raw/legacy-gestures/_shared/base-gesture-config.md Adds shared legacy base config content.
packages/docs-gesture-handler/static/raw/legacy-gestures/_shared/base-gesture-callbacks.md Adds shared legacy base callbacks content.
packages/docs-gesture-handler/static/raw/legacy-gestures/_shared/base-continuous-gesture-config.md Adds shared legacy continuous-gesture config content.
packages/docs-gesture-handler/static/raw/legacy-gestures/_shared/base-continuous-gesture-callbacks.md Adds shared legacy continuous-gesture callbacks content.
packages/docs-gesture-handler/static/raw/guides/upgrading-to-3.md Adds raw upgrade guide from RNGH2 to RNGH3 hook API.
packages/docs-gesture-handler/static/raw/guides/troubleshooting.md Adds raw troubleshooting guide content.
packages/docs-gesture-handler/static/raw/guides/testing.md Adds raw Jest/testing guide content.
packages/docs-gesture-handler/static/raw/guides/swipe-and-scroll.md Adds raw web swipe/scroll interop note.
packages/docs-gesture-handler/static/raw/guides/quickstart/index.md Adds raw quickstart guide content.
packages/docs-gesture-handler/static/raw/guides/quickstart/_steps/step5.md Adds raw quickstart step snippet.
packages/docs-gesture-handler/static/raw/guides/quickstart/_steps/step4.md Adds raw quickstart step snippet.
packages/docs-gesture-handler/static/raw/guides/quickstart/_steps/step3.md Adds raw quickstart step snippet.
packages/docs-gesture-handler/static/raw/guides/quickstart/_steps/step2.md Adds raw quickstart step snippet.
packages/docs-gesture-handler/static/raw/guides/quickstart/_steps/step1.md Adds raw quickstart step snippet.
packages/docs-gesture-handler/static/raw/gestures/use-tap-gesture.md Adds raw RNGH3 hook gesture reference (Tap).
packages/docs-gesture-handler/static/raw/gestures/use-rotation-gesture.md Adds raw RNGH3 hook gesture reference (Rotation).
packages/docs-gesture-handler/static/raw/gestures/use-pinch-gesture.md Adds raw RNGH3 hook gesture reference (Pinch).
packages/docs-gesture-handler/static/raw/gestures/use-pan-gesture.md Adds raw RNGH3 hook gesture reference (Pan).
packages/docs-gesture-handler/static/raw/gestures/use-native-gesture.md Adds raw RNGH3 hook gesture reference (Native).
packages/docs-gesture-handler/static/raw/gestures/use-manual-gesture.md Adds raw RNGH3 hook gesture reference (Manual) + walkthrough.
packages/docs-gesture-handler/static/raw/gestures/use-long-press-gesture.md Adds raw RNGH3 hook gesture reference (LongPress).
packages/docs-gesture-handler/static/raw/gestures/use-hover-gesture.md Adds raw RNGH3 hook gesture reference (Hover).
packages/docs-gesture-handler/static/raw/gestures/use-fling-gesture.md Adds raw RNGH3 hook gesture reference (Fling).
packages/docs-gesture-handler/static/raw/gestures/_shared/shared-value-info.md Adds shared note about SharedValue-configurable props.
packages/docs-gesture-handler/static/raw/gestures/_shared/mouse-button.md Adds shared mouseButton docs snippet (RNGH3).
packages/docs-gesture-handler/static/raw/gestures/_shared/base-gesture-event-data.md Adds shared base gesture event data snippet (RNGH3).
packages/docs-gesture-handler/static/raw/gestures/_shared/base-gesture-config.md Adds shared base gesture config snippet (RNGH3).
packages/docs-gesture-handler/static/raw/gestures/_shared/base-gesture-callbacks.md Adds shared base gesture callbacks snippet (RNGH3).
packages/docs-gesture-handler/static/raw/gestures/_shared/base-continuous-gesture-config.md Adds shared continuous gesture config snippet (RNGH3).
packages/docs-gesture-handler/static/raw/gestures/_shared/base-continuous-gesture-callbacks.md Adds shared continuous gesture callbacks snippet (RNGH3).
packages/docs-gesture-handler/static/raw/gestures/_manual_gesture_steps/step7.md Adds raw manual-gesture tutorial step snippet.
packages/docs-gesture-handler/static/raw/gestures/_manual_gesture_steps/step6.md Adds raw manual-gesture tutorial step snippet.
packages/docs-gesture-handler/static/raw/gestures/_manual_gesture_steps/step5.md Adds raw manual-gesture tutorial step snippet.
packages/docs-gesture-handler/static/raw/gestures/_manual_gesture_steps/step4.md Adds raw manual-gesture tutorial step snippet.
packages/docs-gesture-handler/static/raw/gestures/_manual_gesture_steps/step3.md Adds raw manual-gesture tutorial step snippet.
packages/docs-gesture-handler/static/raw/gestures/_manual_gesture_steps/step2.md Adds raw manual-gesture tutorial step snippet.
packages/docs-gesture-handler/static/raw/gestures/_manual_gesture_steps/step1.md Adds raw manual-gesture tutorial step snippet.
packages/docs-gesture-handler/static/raw/fundamentals/state-manager.md Adds raw RNGH3 state manager docs.
packages/docs-gesture-handler/static/raw/fundamentals/root-view.md Adds raw GestureHandlerRootView docs.
packages/docs-gesture-handler/static/raw/fundamentals/reanimated-interactions.md Adds raw Reanimated integration docs.
packages/docs-gesture-handler/static/raw/fundamentals/introduction.md Adds raw introduction/overview docs.
packages/docs-gesture-handler/static/raw/fundamentals/installation.md Adds raw installation/setup docs.
packages/docs-gesture-handler/static/raw/fundamentals/gesture-detector.md Adds raw gesture detector docs (incl. virtual detectors).
packages/docs-gesture-handler/static/raw/fundamentals/gesture-composition.md Adds raw gesture composition docs (RNGH3 hooks/relations).
packages/docs-gesture-handler/static/raw/fundamentals/callbacks-events.md Adds raw callbacks/events docs.
packages/docs-gesture-handler/static/raw/fundamentals/animated-interactions.md Adds raw Animated API integration docs.
packages/docs-gesture-handler/static/raw/components/touchables.md Adds raw Touchables docs (deprecation note).
packages/docs-gesture-handler/static/raw/components/reanimated-drawer-layout.md Adds raw ReanimatedDrawerLayout docs.
packages/docs-gesture-handler/static/raw/components/reanimated_swipeable.md Adds raw ReanimatedSwipeable docs.
packages/docs-gesture-handler/static/raw/components/pressable.md Adds raw Pressable docs.
packages/docs-gesture-handler/static/raw/components/buttons.md Adds raw Buttons docs.
packages/docs-gesture-handler/static/llms.txt Adds an LLM-oriented index of docs URLs.
packages/docs-gesture-handler/src/theme/TOCItems/Tree.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/TOCCollapsible/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/SearchPage/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/PaginatorNavLink/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/MDXComponents/styles.module.css Removes custom details styling CSS.
packages/docs-gesture-handler/src/theme/MDXComponents/DetailsStyling.tsx Removes custom Details component implementation.
packages/docs-gesture-handler/src/theme/MDXComponents/Details.js Removes custom Details MDX component wrapper.
packages/docs-gesture-handler/src/theme/MDXComponents.js Exposes Badges (t-rex-ui) via global MDX components mapping.
packages/docs-gesture-handler/src/theme/Footer/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/DocSidebarItems/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/DocSidebarItem/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/DocItem/TOC/Mobile/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/DocItem/Metadata/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/DocCard/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/theme/Admonition/index.js Removes local re-export wrapper (t-rex-ui preset now used).
packages/docs-gesture-handler/src/css/colors.css Adds CSS variables for markdown copy button + badges.
packages/docs-gesture-handler/src/components/HeaderWithBadges/styles.module.css Removes local badges styling (superseded by t-rex-ui Badges).
packages/docs-gesture-handler/src/components/HeaderWithBadges/index.tsx Removes local HeaderWithBadges component (replaced by Badges).
packages/docs-gesture-handler/package.json Updates Docusaurus/t-rex-ui deps and adds clipboard dependency.
packages/docs-gesture-handler/docusaurus.config.js Adds t-rex-ui preset + JS babel-loader rule in webpack config.
packages/docs-gesture-handler/docs/gestures/use-tap-gesture.mdx Removes HeaderWithBadges usage/imports (Badges now global).
packages/docs-gesture-handler/docs/gestures/use-rotation-gesture.mdx Removes redundant imports (Badges now global).
packages/docs-gesture-handler/docs/gestures/use-pan-gesture.mdx Replaces HeaderWithBadges sections with Badges.
packages/docs-gesture-handler/docs/gestures/use-native-gesture.mdx Replaces HeaderWithBadges sections with Badges.
packages/docs-gesture-handler/docs/gestures/use-long-press-gesture.mdx Removes HeaderWithBadges usage/imports (Badges now global).
packages/docs-gesture-handler/docs/gestures/use-hover-gesture.mdx Replaces HeaderWithBadges sections with Badges.
packages/docs-gesture-handler/docs/gestures/use-fling-gesture.mdx Removes HeaderWithBadges usage/imports (Badges now global).
packages/docs-gesture-handler/docs/gestures/_shared/mouse-button.mdx Switches platform header block to Badges.
packages/docs-gesture-handler/docs/gestures/_shared/base-gesture-event-data.mdx Removes redundant import (uses global MDX components).
packages/docs-gesture-handler/docs/gestures/_shared/base-gesture-config.mdx Switches platform header blocks to Badges.
packages/docs-gesture-handler/docs/fundamentals/state-manager.mdx Removes redundant import (uses global MDX components).
packages/docs-gesture-handler/docs/fundamentals/reanimated-interactions.mdx Removes redundant import (uses global MDX components).
packages/docs-gesture-handler/docs/fundamentals/gesture-detector.mdx Switches platform header blocks to Badges and removes old imports.
packages/docs-gesture-handler/docs/fundamentals/gesture-composition.mdx Removes redundant import (uses global MDX components).
packages/docs-gesture-handler/docs/fundamentals/callbacks-events.mdx Removes redundant import (uses global MDX components).
packages/docs-gesture-handler/docs/fundamentals/animated-interactions.mdx Removes redundant import (uses global MDX components).
packages/docs-gesture-handler/docs/components/reanimated-drawer-layout.mdx Switches platform header blocks to Badges.
packages/docs-gesture-handler/docs/components/reanimated_swipeable.mdx Switches platform header blocks to Badges.
packages/docs-gesture-handler/docs/components/pressable.mdx Switches platform header blocks to Badges.
packages/docs-gesture-handler/docs/components/buttons.mdx Switches platform header blocks to Badges.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines 172 to +176
use: 'babel-loader',
},
{
test: /\.js$/,
use: 'babel-loader',
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

The added Babel loader rule for all .js files has no include/exclude filters, so it will also run on node_modules and can significantly slow down (or break) the docs webpack build. Consider restricting it to your source folders and/or only the specific packages that require transpilation (e.g., the t-rex-ui preset), or at least exclude node_modules by default.

Suggested change
use: 'babel-loader',
},
{
test: /\.js$/,
use: 'babel-loader',
use: 'babel-loader',
exclude: /node_modules/,
},
{
test: /\.js$/,
use: 'babel-loader',
exclude: /node_modules/,

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

we do the same thing in reanimated, and did not notice it includes node_modules 🤔

Comment on lines +39 to +42
## Virtual Detectors

Since RNGH3, `GestureDetector` is a standalone host component. Depending on the view hierarchy, this can occasionally disrupt interactions between specific components. To resolve this, use `InterceptingGestureDetector` in combination with `VirtualNativeDetector`.

Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

The doc refers to VirtualNativeDetector, but later sections describe VirtualGestureDetector. This looks like a mistaken component name—please align the terminology with the actual exported API (likely VirtualGestureDetector).

Copilot uses AI. Check for mistakes.
}
```

This example will throw an error, becuse we try to use the same instance of `Pan` in two different Gesture Detectors.
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Typo: "becuse" → "because".

Copilot uses AI. Check for mistakes.

> **Danger**
>
> Do not use `Native` gesture with components exported by React Native Gesture Handler. Those come with a native gesture handler preapplied. Attaching a native gesture twice will likely result in the components not working as intended.
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Typo/wording: "preapplied" should be "pre-applied" (or "already applied").

Copilot uses AI. Check for mistakes.

### `mouseButton(value: MouseButton)` (Web & Android only)

Allows users to choose which mouse button should handler respond to. The enum `MouseButton` consists of the following predefined fields:
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Grammar: "which mouse button should handler respond to" is missing "the" (e.g., "should the handler respond to").

Copilot uses AI. Check for mistakes.

### useExclusiveGestures

Only one of the provided gestures can become active. Priority is determined by the order of the aguments, where the first gesture has the highest priority, and the last has the lowest. A gesture can activate only after all higher-priority gestures before it have failed.
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Typo: "aguments" → "arguments".

Copilot uses AI. Check for mistakes.
Unfortunately, Android doesn't provide an easy way of handling gestures hence most of them were implemented from scratch, including a system for managing how the gestures should interact with each other. Here's a quick overview of how it works:
When you wrap a component with [`GestureHandlerRootView`](/docs/fundamentals/root-view) it allows for the RNGH to intercept all touch events on that component and process them, deciding whether they should be handled by one of the gesture handlers or passed to the underlying view. Gesture handlers are created right at the moment you declare them in order to initialize all of the necessary handlers natively. Every `GestureHandlerRootView` also has a specific handler to decide whether to pass the touch events or to consume them. It can never activate, only begin, end or be cancelled. When this handler is in the `UNDETERMINED` [state](/docs/under-the-hood/state) it means that there is no touch in progress, however when the touch starts it transitions to the `BEGAN` state. As long as it stays in that state, no touch event is consumed, but as soon as it gets cancelled (meaning that some handler has activated) all incoming touch events get consumed, preventing underlying view from receiving them.

When a pointer touches the screen the view tree is traversed in order to extract all handlers attached to the views below the finger (including the one attached to the `GestureHandlerRootView`) and all extracted handlers transition to the `BEGAN` state, signalling that the gesture may have began. The touch events continue to be delivered to all extracted handlers until one of them recognizes the gesture and tries to activate. At this point the orchestrator checks whether this gesture should wait for any other of the extracted gestures to fail. If it does, it's put to the waiting list, if it doesn't, it gets activated and all other gestures (that are not simultaneous with it) get cancelled. When a gesture handlers transitions to a finished state (the gesture recognized by it stops, fails or gets cancelled) the orchestrator checks the waiting handlers. Every one of them that waited for the gesture that just failed tries to activate again (and again the orchestrator checks if it should wait for any of the extracted gestures...).
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

This paragraph has multiple grammar issues (e.g., "may have began" → "may have begun", "a gesture handlers transitions" → "a gesture handler transitions", and run-on sentence structure). Consider splitting it into shorter sentences for readability.

Copilot uses AI. Check for mistakes.
```

Range along X axis (in points) where fingers travels without activation of gesture. Moving outside of this range implies activation of gesture. Range can be given as an array or a single number.
If range is set as an array, first value must be lower or equal to 0, a the second one higher or equal to 0.
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Typo/grammar: "a the second one" should be "and the second one" (this sentence appears multiple times in this page).

Copilot uses AI. Check for mistakes.
### `activeOffsetX(value: number | number[])`

Range along X axis (in points) where fingers travels without activation of gesture. Moving outside of this range implies activation of gesture. Range can be given as an array or a single number.
If range is set as an array, first value must be lower or equal to 0, a the second one higher or equal to 0.
Copy link

Copilot AI Mar 10, 2026

Choose a reason for hiding this comment

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

Typo/grammar: "a the second one" should be "and the second one" (this sentence is repeated for other offset properties as well).

Copilot uses AI. Check for mistakes.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@m-bert there is 50 results where "a the second one" is used instead of "and the second one" - can I change it within this PR?

@patrycjakalinska patrycjakalinska requested a review from m-bert March 11, 2026 09:00
@patrycjakalinska
Copy link
Contributor Author

@m-bert ready for review 🍓 lmk if I should change all of copilot docs related grammar issues as well

@m-bert
Copy link
Contributor

m-bert commented Mar 11, 2026

lmk if I should change all of copilot docs related grammar issues as well

IMO we can leave that for other PR - this is already quite big.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants