Skip to content

Commit 622fcc0

Browse files
authored
Merge pull request #6059 from WiXSL/fix-typos-anchors
Fix typos and doc anchors
2 parents f706f90 + b6aa785 commit 622fcc0

File tree

9 files changed

+27
-26
lines changed

9 files changed

+27
-26
lines changed

UPGRADE.md

+12-12
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Failing to upgrade one of the `ra-` packages will result in a duplication of the
3434

3535
* `react` and `react-dom` are now required to be >= 16.9. This version is backward compatible with 16.3, which was the minimum requirement in react-admin, and it offers the support for Hooks, on which react-admin v3 relies heavily.
3636
* `react-redux` requires a minimum version of 7.1.0 (instead of 5.0). Check their upgrade guide for [6.0](https://github.com/reduxjs/react-redux/releases/tag/v6.0.0) and [7.0](https://github.com/reduxjs/react-redux/releases/tag/v7.0.0)
37-
* `redux-saga` requires a minimim version of 1.0.0 (instead of ~0.16.0). Check their [list of breaking changes for redux-saga 1.0](https://github.com/redux-saga/redux-saga/releases/tag/v1.0.0) on GitHub.
37+
* `redux-saga` requires a minimum version of 1.0.0 (instead of ~0.16.0). Check their [list of breaking changes for redux-saga 1.0](https://github.com/redux-saga/redux-saga/releases/tag/v1.0.0) on GitHub.
3838
* `material-ui` requires a minimum of 4.0.0 (instead of 1.5). Check their [Upgrade guide](https://next.material-ui.com/guides/migration-v3/).
3939

4040
## `react-router-redux` replaced by `connected-react-router`
@@ -1118,17 +1118,17 @@ We've described how to pre-fill some fields in the create form in an [Advanced T
11181118

11191119
```jsx
11201120
const AddNewCommentButton = ({ record }) => (
1121-
<Button
1122-
component={Link}
1123-
to={{
1124-
pathname: "/comments/create",
1125-
- search: `?post_id=${record.id}`,
1126-
+ search: `?source=${JSON.stringify({ post_id: record.id })}`,
1127-
}}
1128-
label="Add a comment"
1129-
>
1130-
<ChatBubbleIcon />
1131-
</Button>
1121+
<Button
1122+
component={Link}
1123+
to={{
1124+
pathname: "/comments/create",
1125+
- search: `?post_id=${record.id}`,
1126+
+ search: `?source=${JSON.stringify({ post_id: record.id })}`,
1127+
}}
1128+
label="Add a comment"
1129+
>
1130+
<ChatBubbleIcon />
1131+
</Button>
11321132
);
11331133
```
11341134

docs/Authentication.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ You can get more details about input params, response and error formats in the [
5252

5353
## Available Providers
5454

55-
It's very common that your auth logic is so specific that so you'll need to write your own `authProvider`. However, the community has built a few open-source Auth Providers that may fit your need:
55+
It's very common that your auth logic is so specific that you'll need to write your own `authProvider`. However, the community has built a few open-source Auth Providers that may fit your need:
5656

5757
- **[AWS Amplify](https://docs.amplify.aws)**: [MrHertal/react-admin-amplify](https://github.com/MrHertal/react-admin-amplify)
5858
- **[AWS Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/setting-up-the-javascript-sdk.html)**: [thedistance/ra-cognito](https://github.com/thedistance/ra-cognito)

docs/CreateEdit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ const PostList = props => (
577577

578578
**Note**: `<CloneButton>` is designed to be used in a `<Datagrid>` and in an edit view `<Actions>` component, not inside the form `<Toolbar>`. The `Toolbar` is basically for submitting the form, not for going to another resource.
579579

580-
Alternately, users need to prepopulate a record based on a *related* record. For instance, to create a comment related to an exising post.
580+
Alternately, users need to prepopulate a record based on a *related* record. For instance, to create a comment related to an existing post.
581581

582582
By default, the `<Create>` view starts with an empty `record`. However, if the `location` object (injected by [react-router-dom](https://reacttraining.com/react-router/web/api/location)) contains a `record` in its `state`, the `<Create>` view uses that `record` instead of the empty object. That's how the `<CloneButton>` works under the hood.
583583

docs/Inputs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -1499,15 +1499,15 @@ You can tweak how this component fetches the possible values using the `perPage`
14991499
```
15001500
{% endraw %}
15011501

1502-
In addition to the `ReferenceArrayInputContext`, `<ReferenceArrayInput>` also sets up a `ListContext` providing access to the records from the reference resource in a similar fashion to that of the `<List>` component. This `ListContext` value is accessible with the [`useListContext`](/List.md#uselistcontext) hook.
1502+
In addition to the `ReferenceArrayInputContext`, `<ReferenceArrayInput>` also sets up a `ListContext` providing access to the records from the reference resource in a similar fashion to that of the `<List>` component. This `ListContext` value is accessible with the [`useListContext`](./List.md#uselistcontext) hook.
15031503

15041504
`<ReferenceArrayInput>` also accepts the [common input props](./Inputs.md#common-input-props).
15051505

15061506
### `useReferenceArrayInputContext`
15071507

15081508
The [`<ReferenceArrayInput>`](#referencearrayinput) component take care of fetching the data, and put that data in a context called `ReferenceArrayInputContext` so that it’s available for its descendants. This context also stores filters, pagination, sort state, and provides callbacks to update them.
15091509

1510-
Any component decendent of `<ReferenceArryInput>` can grab information from the `ReferenceArrayInputContext` using the `useReferenceArrayInputContext` hook. Here is what it returns:
1510+
Any component descendant of `<ReferenceArryInput>` can grab information from the `ReferenceArrayInputContext` using the `useReferenceArrayInputContext` hook. Here is what it returns:
15111511

15121512
```js
15131513
const {

docs/Translation.md

+3-2
Original file line numberDiff line numberDiff line change
@@ -669,8 +669,9 @@ resources: {
669669
fields: {
670670
id: 'Id',
671671
name: 'Bezeichnung',
672-
},
673-
},
672+
}
673+
}
674+
}
674675
```
675676
676677
## Silencing Translation Warnings

packages/ra-core/src/form/useFormGroup.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ type FormGroupState = {
5252
* );
5353
* }
5454
*
55-
* @param {string] name The form group name
55+
* @param {string} name The form group name
5656
* @returns {FormGroupState} The form group state
5757
*/
5858
export const useFormGroup = (name: string): FormGroupState => {
@@ -104,7 +104,7 @@ export const useFormGroup = (name: string): FormGroupState => {
104104
/**
105105
* Get the state of a form group
106106
*
107-
* @param {FieldStates} fieldStates A map of field states from final-form where the key is the field name.
107+
* @param {FieldState[]} fieldStates A map of field states from final-form where the key is the field name.
108108
* @returns {FormGroupState} The state of the group.
109109
*/
110110
export const getFormGroupState = (

packages/ra-core/src/i18n/useTranslatable.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import useTranslate from './useTranslate';
1010
*
1111
* @param options The hook options
1212
* @param {string} options.defaultLocale The locale of the default selected locale. Defaults to 'en'.
13-
* @param {strong[]} options.locales An array of the supported locales. Each is an object with a locale and a name property. For example { locale: 'en', name: 'English' }.
13+
* @param {string[]} options.locales An array of the supported locales. Each is an object with a locale and a name property. For example { locale: 'en', name: 'English' }.
1414
*
1515
* @returns
1616
* An object with following properties and methods:

packages/ra-data-fakerest/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -59,12 +59,12 @@ Here is an example input:
5959
```json
6060
{
6161
"posts": [
62-
{ "id": 0, "title": 'Hello, world!' },
63-
{ "id": 1, "title": 'FooBar' }
62+
{ "id": 0, "title": "Hello, world!" },
63+
{ "id": 1, "title": "FooBar" }
6464
],
6565
"comments": [
66-
{ "id": 0, "post_id": 0, "author": 'John Doe', "body": 'Sensational!' },
67-
{ "id": 1, "post_id": 0, "author": 'Jane Doe', "body": 'I agree' }
66+
{ "id": 0, "post_id": 0, "author": "John Doe", "body": "Sensational!" },
67+
{ "id": 1, "post_id": 0, "author": "Jane Doe", "body": "I agree" }
6868
]
6969
}
7070
```

packages/ra-test/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,7 @@ it('should send the user to another url', () => {
8888

8989
### Testing Permissions
9090

91-
As explained on the [Auth Provider chapter](./Authentication.md#authorization), it's possible to manage permissions via the `authProvider` in order to filter page and fields the users can see.
91+
As explained on the [Auth Provider chapter](https://marmelab.com/react-admin/Authentication.html#authorization), it's possible to manage permissions via the `authProvider` in order to filter page and fields the users can see.
9292

9393
In order to avoid regressions and make the design explicit to your co-workers, it's better to unit test which fields are supposed to be displayed or hidden for each permission.
9494

0 commit comments

Comments
 (0)