Skip to content

Commit 0e4cf89

Browse files
authored
docs: re-organize API section (#994)
## 📜 Description Re-organized API section for easier navigation. ## 💡 Motivation and Context We get more and more native views exposed from the library, so I thought it's crucial to organize API section better. We already have `hooks` and `components` categories and I thought to introduce a new category. I didn't invent anything better than `views` - the idea is that in this folder we'll have all native views (backed by native code). ## 📢 Changelog <!-- High level overview of important changes --> <!-- For example: fixed status bar manipulation; added new types declarations; --> <!-- If your changes don't affect one of platform/language below - then remove this platform/language --> ### Docs - added lottie animation for `KeyboardGestureArea` page; - changed links for `KeyboardBackgroundView`; - changed links to avoid broken links; - changed description for `KeyboardExtender`. ## 🤔 How Has This Been Tested? Tested via preview and CI. ## 📸 Screenshots (if appropriate): |Before|After| |-------|-----| |<img width="299" alt="image" src="https://github.com/user-attachments/assets/d2083e8e-18a2-4bfd-9525-1127d78d13df" />|<img width="300" alt="image" src="https://github.com/user-attachments/assets/4bf341ff-6f7b-4992-b377-66ab2a8be47d" />| ## 📝 Checklist - [x] CI successfully passed - [x] I added new mocks and corresponding unit-tests if library API was changed
1 parent 347fef3 commit 0e4cf89

18 files changed

Lines changed: 52 additions & 23 deletions

File tree

docs/blog/2024-10-01-over-keyboard-view/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ keywords:
1010
Meet new `OverKeyboardView` component and corresponding `1.14.0` release! 🎉
1111

1212
import Lottie from "lottie-react";
13-
import lottie from "../../docs/api/over-keyboard-view/over-keyboard-view.lottie.json";
13+
import lottie from "../../docs/api/views/over-keyboard-view/over-keyboard-view.lottie.json";
1414

1515
<div style={{ display: "flex", justifyContent: "center", marginBottom: 20 }}>
1616
<Lottie
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
22
"label": "📚 Components",
3-
"position": 2
3+
"position": 2,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "A set of JS components that simplify keyboard management and user interaction handling"
7+
}
48
}
Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,8 @@
11
{
22
"label": "🎣 Hooks",
3-
"position": 1
3+
"position": 1,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "React hooks provided by this library"
7+
}
48
}

docs/docs/api/hooks/keyboard/use-keyboard-handler/index.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,7 @@ export const onInteractiveCode = (
171171
<div className="mobile">{onInteractiveCode}</div>
172172

173173
:::info Event availability
174-
This event is available only on Android >= 11. To receive it you need to use [KeyboardGestureArea](./../../keyboard-gesture-area).
174+
This event is available only on Android >= 11. To receive it you need to use [KeyboardGestureArea](./../../views/keyboard-gesture-area).
175175

176176
On iOS you need to specify `keyboardDismissMode="interactive"` on your `ScrollView`.
177177
:::

docs/docs/api/keyboard-controller.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 5
2+
sidebar_position: 7
33
keywords:
44
[
55
react-native-keyboard-controller,

docs/docs/api/keyboard-events.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 6
2+
sidebar_position: 8
33
keywords:
44
[
55
react-native-keyboard-controller,

docs/docs/api/keyboard-provider.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 2
2+
sidebar_position: 4
33
keywords: [react-native-keyboard-controller, KeyboardProvider]
44
---
55

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
{
2+
"label": "✨ Views",
3+
"position": 3,
4+
"link": {
5+
"type": "generated-index",
6+
"description": "Native views provided by this library"
7+
}
8+
}

docs/docs/api/keyboard-background-view/index.mdx renamed to docs/docs/api/views/keyboard-background-view/index.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
sidebar_position: 7
2+
sidebar_position: 3
33
description: View that matches keyboard background
44
keywords:
55
[react-native-keyboard-controller, keyboard, background, keyboard extension]
@@ -152,5 +152,5 @@ export default KeyboardSharedTransitionExample;
152152

153153
## See also
154154

155-
- [`KeyboardStickyView`](./components/keyboard-sticky-view) – affixes content to the keyboard’s frame.
156-
- [`useReanimatedKeyboardAnimation`](./hooks/keyboard/use-reanimated-keyboard-animation) – drive your own animations with native‑driven progress values.
155+
- [`KeyboardStickyView`](../components/keyboard-sticky-view) – affixes content to the keyboard’s frame.
156+
- [`useReanimatedKeyboardAnimation`](../hooks/keyboard/use-reanimated-keyboard-animation) – drive your own animations with native‑driven progress values.

docs/docs/api/keyboard-background-view/keyboard-background-view.lottie.json renamed to docs/docs/api/views/keyboard-background-view/keyboard-background-view.lottie.json

File renamed without changes.

0 commit comments

Comments
 (0)