Skip to content

Commit 8baabdf

Browse files
m-bertCopilot
andauthored
[docs] Fix grammatical errors (#4056)
## Description This PR fixes most of grammatical errors in our docs. ## Test plan Read docs 🤓 --------- Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
1 parent d21f1dd commit 8baabdf

File tree

83 files changed

+295
-298
lines changed

Some content is hidden

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

83 files changed

+295
-298
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ This type of button component is ideal for use with rectangular elements or cont
138138
underlayColor?: string;
139139
```
140140

141-
Background color that will be dimmed when button is in active state.
141+
Background color that will be dimmed when the button is in an active state.
142142

143143
<HeaderWithBadges platforms={['iOS']}>
144144
### activeOpacity
@@ -148,7 +148,7 @@ Background color that will be dimmed when button is in active state.
148148
activeOpacity?: number;
149149
```
150150

151-
Opacity applied to the underlay when button is in active state.
151+
Opacity applied to the underlay when the button is in an active state.
152152

153153
## BorderlessButton
154154

@@ -188,27 +188,27 @@ const AccessibleButton = () => (
188188

189189
## Design patterns
190190

191-
Components listed here were not designed to behave and look in the same way on both platforms but rather to be used for handling similar behaviour on iOS and Android taking into consideration their design concepts.
191+
Components listed here were not designed to behave and look in the same way on both platforms, but rather to be used for handling similar behaviour on iOS and Android taking into consideration their design concepts.
192192

193193
If you wish to get specific information about platforms design patterns, visit [official Apple docs](https://developer.apple.com/design/human-interface-guidelines/components/menus-and-actions/buttons) and [Material.io guideline](https://material.io/components/buttons#text-button), which widely describe how to implement coherent design.
194194

195-
This library allows to use native components with native feedback in adequate situations.
195+
This library allows the use of native components with native feedback in adequate situations.
196196

197-
If you do not wish to implement custom design approach, [`RectButton`](#rectbutton) and [`BorderlessButton`](#borderlessbutton) seem to be absolutely enough and there's no need to use anything else. In all the remaining cases you can always rely on [`BaseButton`](#basebutton) which is a superclass for the other button classes and can be used as a generic `Touchable` replacement that can be customized to your needs.
197+
If you do not wish to implement a custom design approach, [`RectButton`](#rectbutton) and [`BorderlessButton`](#borderlessbutton) seem to be absolutely enough and there's no need to use anything else. In all the remaining cases, you can always rely on [`BaseButton`](#basebutton) which is a superclass for the other button classes and can be used as a generic `Touchable` replacement that can be customized to your needs.
198198

199199
Below we list some of the common usecases for button components to be used along with the type of button that should be used according to the platform specific design guidelines.
200200

201201
### Lists and action buttons
202202

203-
If you have a list with clickable items or have an action button that need to display as a separate UI block (vs being inlined in a text) you should use [`RectButton`](#rectbutton). It changes opacity on click and additionally supports a [ripple effect](#ripplecolor-android-only) on Android.
203+
If you have a list with clickable items or have an action button that needs to display as a separate UI block (vs being inlined in a text) you should use [`RectButton`](#rectbutton). It changes opacity on click and additionally supports a [ripple effect](#ripplecolor-android-only) on Android.
204204

205205
<GifGallery>
206206
<img src={useBaseUrl('gifs/androidsettings.gif')} width="280" />
207207
<img src={useBaseUrl('gifs/iossettings.gif')} width="280" />
208208
</GifGallery>
209209

210-
To determine emphasis of button it's vital to use fill color or leave it transparent especially on Android.
211-
For medium emphasis you may consider outlined buttons which are used for lower impact than fill buttons.
210+
To determine the emphasis of a button, it's vital to use a fill color or leave it transparent, especially on Android.
211+
For medium emphasis, you may consider outlined buttons which are used for lower impact than fill buttons.
212212

213213
<GifGallery>
214214
<img src={useBaseUrl('gifs/androidbutton.gif')} width="280" />

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

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ export enum DrawerKeyboardDismissMode {
9292
}
9393
`}/>
9494

95-
Determines if system keyboard should be closed upon dragging the drawer.
95+
Determines if the system keyboard should be closed upon dragging the drawer.
9696

9797
### animationSpeed
9898

@@ -250,7 +250,7 @@ Either a component rendered in the content view or a function. If `children` is
250250
enableContextMenu: boolean;
251251
```
252252

253-
Specifies whether context menu should be enabled after clicking on underlying view with right mouse button. Default value is set to `false` if [`MouseButton.RIGHT`](#mousebutton-web--android-only) is specified.
253+
Specifies whether the context menu should be enabled after clicking on the underlying view with the right mouse button. Default value is set to `false` if [`MouseButton.RIGHT`](#mousebutton-web--android-only) is specified.
254254

255255
<HeaderWithBadges platforms={['web']}>
256256
### userSelect
@@ -260,7 +260,7 @@ Specifies whether context menu should be enabled after clicking on underlying vi
260260
userSelect: 'none' | 'auto' | 'text';
261261
```
262262

263-
This parameter allows to specify which `userSelect` property should be applied to underlying view. Default value is set to `"none"`.
263+
This parameter allows specifying which `userSelect` property should be applied to the underlying view. Default value is set to `"none"`.
264264

265265
<HeaderWithBadges platforms={['web']}>
266266
### activeCursor
@@ -270,7 +270,7 @@ This parameter allows to specify which `userSelect` property should be applied t
270270
activeCursor: ActiveCursor;
271271
```
272272

273-
This parameter allows to specify which cursor should be used when gesture activates. Supports all [CSS cursor values](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/cursor#keyword) (e.g. `"grab"`, `"zoom-in"`). Default value is set to `"auto"`.
273+
This parameter allows specifying which cursor should be used when the gesture activates. Supports all [CSS cursor values](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/cursor#keyword) (e.g. `"grab"`, `"zoom-in"`). Default value is set to `"auto"`.
274274

275275
## Drawer ref methods
276276

@@ -295,15 +295,15 @@ export type DrawerMovementOption = {
295295
openDrawer: (options?: DrawerMovementOption) => void;
296296
```
297297

298-
Allows to manually open the drawer.
298+
Allows manually opening the drawer.
299299

300300
### closeDrawer
301301

302302
```ts
303303
closeDrawer: (options?: DrawerMovementOption) => void;
304304
```
305305

306-
Allows to manually close the drawer.
306+
Allows manually closing the drawer.
307307

308308
## Example
309309

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ Enables two-finger gestures on supported devices, for example iPads with trackpa
258258
enabled: boolean;
259259
```
260260

261-
Indicates whether `ReanimatedSwipeable` should be analyzing stream of touch events or not. Defaults to `true`.
261+
Indicates whether `ReanimatedSwipeable` should be analyzing the stream of touch events or not. Defaults to `true`.
262262

263263
### testID
264264

@@ -295,7 +295,7 @@ type HitSlop =
295295
`}/>
296296

297297
This parameter enables control over what part of the connected view area can be used to begin recognizing the gesture.
298-
When a negative number is provided the bounds of the view will reduce the area by the given number of points in each of the sides evenly.
298+
When a negative number is provided, the bounds of the view will reduce the area by the given number of points in each of the sides evenly.
299299
See [hitSlop section](/docs/gestures/use-pan-gesture#hitslop) in `Pan` gesture for more details.
300300

301301
## Swipeable ref methods

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

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ sidebar_label: Touchables
88
Touchables will be removed in the future version of Gesture Handler. Use [`Pressable`](/docs/components/pressable) instead.
99
:::
1010

11-
Gesture Handler library provides an implementation of RN's touchable components that are based on [native buttons](buttons.mdx) and does not rely on JS responder system utilized by RN. Our touchable implementation follows the same API and aims to be a drop-in replacement for touchables available in React Native.
11+
Gesture Handler library provides an implementation of RN's touchable components that are based on [native buttons](buttons.mdx) and do not rely on the JS responder system utilized by RN. Our touchable implementation follows the same API and aims to be a drop-in replacement for touchables available in React Native.
1212

1313
React Native's touchables API can be found here:
1414

@@ -17,15 +17,14 @@ React Native's touchables API can be found here:
1717
- [Touchable Opacity](https://reactnative.dev/docs/touchableopacity)
1818
- [Touchable Without Feedback](https://reactnative.dev/docs/touchablewithoutfeedback)
1919

20-
All major touchable properties (except from `pressRetentionOffset`) have been adopted and should behave in a similar way as with RN's touchables.
20+
All major touchable properties (except for `pressRetentionOffset`) have been adopted and should behave in a similar way as with RN's touchables.
2121

22-
The motivation for using RNGH touchables as a replacement for these imported from React Native is to follow built-in native behavior more closely by utilizing platform native touch system instead of relying on the JS responder system.
22+
The motivation for using RNGH touchables as a replacement for these imported from React Native is to follow built-in native behavior more closely by utilizing the platform native touch system instead of relying on the JS responder system.
2323
These touchables and their feedback behavior are deeply integrated with native
2424
gesture ecosystem and could be connected with other native components (e.g. `ScrollView`) and Gesture Handlers easily and in a more predictable way, which
2525
follows native apps' behavior.
2626

27-
Our intention was to make switch for these touchables as simple as possible. In order to use RNGH's touchables the only thing you need to do is to change library from which you import touchable components.
28-
need only to change imports of touchables.
27+
Our intention was to make the switch for these touchables as simple as possible. In order to use RNGH's touchables, the only thing you need to do is to change the library from which you import touchable components.
2928

3029
:::info
3130
Gesture Handler's `TouchableOpacity` uses native driver for animations by default. If this causes problems for you, you can set `useNativeAnimations` prop to false.

packages/docs-gesture-handler/docs/fundamentals/callbacks-events.mdx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ Called when a handler begins to recognize gestures. If `onBegin` was called, it
4343
onActivate: (event: GestureEvent<HandlerData>) => void
4444
```
4545

46-
Called when activation criteria for handler are met. If `onActivate` was called, it is guaranteed that `onDeactivate` will be called later.
46+
Called when activation criteria for the handler are met. If `onActivate` was called, it is guaranteed that `onDeactivate` will be called later.
4747

4848
### onUpdate
4949

@@ -59,15 +59,15 @@ Called each time a pointer tracked by the gesture changes state, typically due t
5959
onDeactivate: (event: GestureEvent<HandlerData>, didSucceed: boolean) => void
6060
```
6161

62-
Called after when handler stops recognizing gestures, but only if handler activated. It is called before `onFinalize`. If the handler was interrupted, the `didSucceed` argument is set to `false`. Otherwise it is set to `true`.
62+
Called when handler stops recognizing gestures, but only if the handler activated. It is called before `onFinalize`. If the handler was interrupted, the `didSucceed` argument is set to `false`. Otherwise it is set to `true`.
6363

6464
### onFinalize
6565

6666
```ts
6767
onFinalize: (event: GestureEvent<HandlerData>, didSucceed: boolean) => void
6868
```
6969

70-
Called when handler stops recognizing gestures. If handler managed to activate, the `didSucceed` argument is set to `true` and `onFinalize` will be called right after `onDeactivate`. Otherwise it is set to `false`.
70+
Called when handler stops recognizing gestures. If the handler managed to activate, the `didSucceed` argument is set to `true` and `onFinalize` will be called right after `onDeactivate`. Otherwise it is set to `false`.
7171

7272
### onTouchesDown
7373

@@ -190,7 +190,7 @@ export type TouchData = {
190190

191191
`TouchData` contains information about a single touch.
192192

193-
- `id` - A number representing id of the touch. It may be used to track the touch between events as the id will not change while it is being tracked.
193+
- `id` - A number representing the id of the touch. It may be used to track the touch between events as the id will not change while it is being tracked.
194194

195195
- `x` - X coordinate of the current position of the touch relative to the view attached to the [`GestureDetector`](/docs/fundamentals/gesture-detectors#gesture-detector). Expressed in point units.
196196

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ RNGH3 simplifies gesture interaction through dedicated composition hooks and con
2727

2828
Only one of the provided gestures can become active at the same time. The first gesture to become active will cancel the rest of the gestures. It accepts variable number of arguments.
2929

30-
For example, lets say that you have a component that you want to make draggable but you also want to show additional options on long press. Presumably you would not want the component to move after the long press activates. You can accomplish this using `useCompetingGestures`:
30+
For example, let's say that you have a component that you want to make draggable but you also want to show additional options on long press. Presumably you would not want the component to move after the long press activates. You can accomplish this using `useCompetingGestures`:
3131

3232
<CollapsibleCode
3333
label="Show full example"
@@ -39,7 +39,7 @@ src={Competing}/>
3939

4040
All of the provided gestures can activate at the same time. Activation of one will not cancel the other.
4141

42-
For example, if you want to make a gallery app, you might want user to be able to zoom, rotate and pan around photos. You can do it with `useSimultaneousGestures`:
42+
For example, if you want to make a gallery app, you might want the user to be able to zoom, rotate and pan around photos. You can do it with `useSimultaneousGestures`:
4343

4444
> Note: the `useSharedValue` and `useAnimatedStyle` are part of [`react-native-reanimated`](https://docs.swmansion.com/react-native-reanimated/).
4545
@@ -51,7 +51,7 @@ src={Simultaneous}/>
5151

5252
### useExclusiveGestures
5353

54-
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.
54+
Only one of the provided gestures can become active. Priority is determined by the order of the arguments, 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.
5555

5656
For example, if you want to make a component that responds to single tap as well as to a double tap, you can accomplish that using `useExclusiveGestures`:
5757

@@ -66,7 +66,7 @@ src={Exclusive}/>
6666

6767
### requireToFail
6868

69-
`requireToFail` allows to delay activation of the handler until all handlers passed as arguments to this method fail (or don't begin at all).
69+
`requireToFail` allows delaying activation of the handler until all handlers passed as arguments to this method fail (or don't begin at all).
7070

7171
For example, you may want to have two nested components, both of them can be tapped by the user to trigger different actions: outer view requires one tap, but the inner one requires 2 taps. If you don't want the first tap on the inner view to activate the outer handler, you must make the outer gesture wait until the inner one fails:
7272

@@ -78,7 +78,7 @@ src={RequireToFail}/>
7878

7979
### block
8080

81-
`block` works similarly to `requireToFail` but the direction of the relation is reversed - instead of being one-to-many relation, it's many-to-one. It's especially useful for making lists where the `ScrollView` component needs to wait for every gesture underneath it. All that's required to do is to pass a ref, for example:
81+
`block` works similarly to `requireToFail` but the direction of the relation is reversed - instead of being a one-to-many relation, it's many-to-one. It's especially useful for making lists where the `ScrollView` component needs to wait for every gesture underneath it. All that's required to do is to pass a ref, for example:
8282

8383
<CollapsibleCode
8484
label="Show full example"

packages/docs-gesture-handler/docs/fundamentals/gesture-detector.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -198,7 +198,7 @@ A gesture object containing the configuration and callbacks. Can be any of the b
198198
userSelect: 'none' | 'auto' | 'text';
199199
```
200200

201-
This parameter allows to specify which `userSelect` property should be applied to underlying view. Default value is set to `"none"`.
201+
This parameter allows specifying which `userSelect` property should be applied to the underlying view. Default value is set to `"none"`.
202202

203203
<HeaderWithBadges platforms={['web']}>
204204
### touchAction
@@ -208,7 +208,7 @@ This parameter allows to specify which `userSelect` property should be applied t
208208
touchAction: TouchAction;
209209
```
210210

211-
This parameter allows to specify which `touchAction` property should be applied to underlying view. Supports all CSS [touch-action](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/touch-action) values. Default value is set to `"none"`.
211+
This parameter allows specifying which `touchAction` property should be applied to the underlying view. Supports all CSS [touch-action](https://developer.mozilla.org/en-US/docs/Web/CSS/Reference/Properties/touch-action) values. Default value is set to `"none"`.
212212

213213
<HeaderWithBadges platforms={['web']}>
214214
### enableContextMenu
@@ -218,4 +218,4 @@ This parameter allows to specify which `touchAction` property should be applied
218218
enableContextMenu: boolean;
219219
```
220220

221-
Specifies whether context menu should be enabled after clicking on underlying view with right mouse button. Default value is set to `false`.
221+
Specifies whether the context menu should be enabled after clicking on the underlying view with the right mouse button. Default value is set to `false`.

packages/docs-gesture-handler/docs/fundamentals/installation.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ export function CustomModal({ children, ...rest }) {
9191
}
9292
```
9393

94-
Gesture Handler on Android is implemented in Kotlin. If you need to set a specific Kotlin version to be used by the library, set the `kotlinVersion` ext property in `android/build.gradle` file and RNGH will use that version:
94+
Gesture Handler on Android is implemented in Kotlin. If you need to set a specific Kotlin version to be used by the library, set the `kotlinVersion` ext property in the `android/build.gradle` file and RNGH will use that version:
9595

9696
```groovy
9797
buildscript {

0 commit comments

Comments
 (0)