Skip to content

Commit 289265a

Browse files
authored
[Docs] Restructure SideBar (#4365)
## Description This PR: - Extracts `GestureHandlerRootView` and `GestureDetector` out of Fundamentals into a new "Core Components" section - Moves State manager from Fundamentals to Gestures - Renames "Quick start" to "Your first gesture-driven animation" and moves it under Fundamentals - Renames the Gestures category to "Gestures API" - Fixes page ordering (sidebar_position) across Components/Guides - Adds redirects for all removed/moved pages (gesture-detectors, root-view, quickstart, state manager) - Updates mapLegacyUrl.js so /quickstart URLs resolve correctly - Fixes ~30 internal doc links broken by the moves above ## Test plan - `yarn build` - Read docs 🤓
1 parent e06c9ce commit 289265a

44 files changed

Lines changed: 116 additions & 64 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

packages/docs-gesture-handler/docs/components/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"label": "Components",
3-
"position": 4,
3+
"position": 6,
44
"link": {
55
"type": "generated-index"
66
}

packages/docs-gesture-handler/docs/components/buttons.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
id: buttons
33
title: Buttons
44
sidebar_label: Buttons
5+
sidebar_position: 6
56
---
67

78
import useBaseUrl from '@docusaurus/useBaseUrl';

packages/docs-gesture-handler/docs/components/pressable.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
id: pressable
33
title: Pressable
44
sidebar_label: Pressable
5+
sidebar_position: 2
56
---
67

78
import useBaseUrl from '@docusaurus/useBaseUrl';
@@ -17,7 +18,7 @@ This component is a drop-in replacement for the `Pressable` component.
1718

1819
`Pressable` is a component that can detect various stages of tap, press, and hover interactions on any of its children.
1920

20-
To use `Pressable`, ensure that your app is wrapped in [`GestureHandlerRootView`](/docs/fundamentals/root-view) and import it as follows:
21+
To use `Pressable`, ensure that your app is wrapped in [`GestureHandlerRootView`](/docs/core-components/root-view) and import it as follows:
2122

2223
```ts
2324
import { Pressable } from 'react-native-gesture-handler';

packages/docs-gesture-handler/docs/components/reanimated-drawer-layout.mdx

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
id: reanimated-drawer-layout
33
title: Reanimated Drawer Layout
44
sidebar_label: Reanimated Drawer Layout
5+
sidebar_position: 4
56
---
67

78
import useBaseUrl from '@docusaurus/useBaseUrl';
@@ -12,7 +13,7 @@ import MouseButtonProp from '../gestures/\_shared/mouse-button.mdx';
1213
This component acts as a cross-platform replacement for React Native's [`DrawerLayoutAndroid`](http://reactnative.dev/docs/drawerlayoutandroid.html) component, written using [Reanimated](https://docs.swmansion.com/react-native-reanimated/docs/fundamentals/getting-started). For detailed information on standard parameters, please refer to the [React Native documentation](http://reactnative.dev/docs/drawerlayoutandroid.html).
1314
:::
1415

15-
To use `ReanimatedDrawerLayout`, first ensure that Reanimated is installed and that your app is wrapped in [`GestureHandlerRootView`](/docs/fundamentals/root-view). You can then import it as follows:
16+
To use `ReanimatedDrawerLayout`, first ensure that Reanimated is installed and that your app is wrapped in [`GestureHandlerRootView`](/docs/core-components/root-view). You can then import it as follows:
1617

1718
```ts
1819
import ReanimatedDrawerLayout from 'react-native-gesture-handler/ReanimatedDrawerLayout';

packages/docs-gesture-handler/docs/components/reanimated_swipeable.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
id: reanimated_swipeable
33
title: Reanimated Swipeable
44
sidebar_label: Reanimated Swipeable
5+
sidebar_position: 3
56
---
67

78
import useBaseUrl from '@docusaurus/useBaseUrl';

packages/docs-gesture-handler/docs/components/touchable.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
id: touchable
33
title: Touchable
44
sidebar_label: Touchable
5+
sidebar_position: 1
56
---
67

78
:::note

packages/docs-gesture-handler/docs/components/touchables.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
id: legacy-touchables
33
title: Legacy Touchables
44
sidebar_label: Legacy Touchables
5+
sidebar_position: 7
56
---
67

78
:::warning

packages/docs-gesture-handler/docs/components/wrapped-components.mdx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
id: wrapped-components
33
title: Wrapped Components
44
sidebar_label: Wrapped Components
5+
sidebar_position: 5
56
---
67

78
Some components come with a [`Native`](/docs/gestures/use-native-gesture) gesture pre-applied. This allows them to participate in the gesture recognition process. Have a look at the example below.

packages/docs-gesture-handler/docs/composition/_category_.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"label": "Gesture composition & interactions",
3-
"position": 3,
3+
"position": 5,
44
"link": {
55
"type": "generated-index"
66
}

packages/docs-gesture-handler/docs/composition/overview.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ sidebar_position: 0
77

88
Gesture Handler simplifies gesture interactions through dedicated composition hooks and relation properties. To choose the right approach, simply ask: are all the gestures attached to the same component?
99

10-
- If **yes** — use [composition hooks](#composition-hooks). These allow you to bundle multiple gestures — including previously composed ones — into a single object for a [`GestureDetector`](/docs/fundamentals/gesture-detectors).
10+
- If **yes** — use [composition hooks](#composition-hooks). These allow you to bundle multiple gestures — including previously composed ones — into a single object for a [`GestureDetector`](/docs/core-components/gesture-detectors).
1111
- If **no** — use [relation properties](#cross-component-interactions) to manually define how gestures interact. Since these properties also support composed gestures, you can mix both methods for more complex layouts.
1212

1313
## Composition hooks

0 commit comments

Comments
 (0)