Skip to content

Commit 6d06cda

Browse files
authored
Merge pull request #9235 from WiXSL/fix-general-docs-typos
[Doc] Fix docs anchors and typos
2 parents 85221a3 + 7c31d48 commit 6d06cda

39 files changed

+62
-61
lines changed

docs/AccordionForm.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -520,7 +520,7 @@ Check [the `<AutoSave>` component](./AutoSave.md) documentation for more details
520520

521521
## Role-Based Access Control (RBAC)
522522

523-
Fine-grained permissions control can be added by using the [`<AccordionForm>`](./AuthRBAC.md#accordionform), [`<AccordionFormPanel>`](./AuthRBAC.md#accordionformpanel) and [`<AccordionSection>`](./AuthRBAC.md#accordionsection) components provided by the `@react-admin/ra-enterprise` package.
523+
Fine-grained permissions control can be added by using the [`<AccordionForm>`](./AuthRBAC.md#accordionform), [`<AccordionFormPanel>`](./AuthRBAC.md#accordionform) and [`<AccordionSection>`](./AuthRBAC.md#accordionsection) components provided by the `@react-admin/ra-enterprise` package.
524524

525525
{% raw %}
526526
```tsx

docs/AppBar.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ export const MyAppBar = () => (
100100

101101
![App bar with a settings button](./img/AppBar-children.png)
102102

103-
**Tip**: Whats the `<TitlePortal>`? It's a placeholder for the page title, that components in the page can fill using [the `<Title>` component](./Title.md). `<Title>` uses a [React Portal](https://react.dev/reference/react-dom/createPortal) under the hood. `<TitlePortal>` takes all the available space in the app bar, so it "pushes" the following children to the right.
103+
**Tip**: What's the `<TitlePortal>`? It's a placeholder for the page title, that components in the page can fill using [the `<Title>` component](./Title.md). `<Title>` uses a [React Portal](https://react.dev/reference/react-dom/createPortal) under the hood. `<TitlePortal>` takes all the available space in the app bar, so it "pushes" the following children to the right.
104104

105105
**Tip**: `<TitlePortal>` renders a [Material-ui `<Typography>`](https://mui.com/material-ui/react-typography/) element that you can customize by passing your own props:
106106

@@ -135,7 +135,7 @@ const MyAppBar = () => (
135135

136136
## `color`
137137

138-
React-admin's `<AppBar>` renders an Material UI `<AppBar>`, which supports a `color` prop to set the app bar color depending on the theme. By default, the app bar color is set to the `secondary` theme color.
138+
React-admin's `<AppBar>` renders a Material UI `<AppBar>`, which supports a `color` prop to set the app bar color depending on the theme. By default, the app bar color is set to the `secondary` theme color.
139139

140140
This means you can set the app bar color to 'default', 'inherit', 'primary', 'secondary', 'transparent', or any string.
141141

docs/ArrayField.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ title: "The ArrayField Component"
2424
{
2525
uuid: '34fdf393-f449-4b04-a423-38ad02ae159e',
2626
date: '2012-08-10T00:00:00.000Z',
27-
url: 'http://example.com/foo/bar.html',
27+
url: 'https://example.com/foo/bar.html',
2828
},
2929
{
3030
uuid: 'd907743a-253d-4ec1-8329-404d4c5e6cf1',

docs/AutocompleteInput.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -747,7 +747,7 @@ const PostCreate = () => {
747747
```
748748
{% endraw %}
749749

750-
Use the `create` prop when you want a more polished or complex UI. For example an Material UI `<Dialog>` asking for multiple fields because the choices are from a referenced resource.
750+
Use the `create` prop when you want a more polished or complex UI. For example a Material UI `<Dialog>` asking for multiple fields because the choices are from a referenced resource.
751751

752752
{% raw %}
753753
```js

docs/Buttons.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -640,7 +640,7 @@ const PostEditActions = () => (
640640
);
641641

642642
export const PostEdit = () => (
643-
<Edit actions={<PostEditActions>}>
643+
<Edit actions={<PostEditActions />}>
644644
<SimpleForm>
645645
<TextInput source="title" />
646646
<TextInput source="body" />

docs/CheckForApplicationUpdate.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -122,13 +122,13 @@ If you just want to customize the notification texts, including the button, chec
122122

123123
## `url`
124124

125-
You can customize the URL fetched to detect updates by providing the `url` prop. By default it's the current URL.
125+
You can customize the URL fetched to detect updates by providing the `url` prop. By default, it's the current URL.
126126

127127
```tsx
128128
// in src/MyLayout.tsx
129129
import { CheckForApplicationUpdate, Layout, LayoutProps } from 'react-admin';
130130

131-
const MY_APP_ROOT_URL = 'http://admin.mycompany.com';
131+
const MY_APP_ROOT_URL = 'https://admin.mycompany.com';
132132

133133
export const MyLayout = ({ children, ...props }: LayoutProps) => (
134134
<Layout {...props}>
@@ -143,4 +143,4 @@ export const MyLayout = ({ children, ...props }: LayoutProps) => (
143143
You can customize the texts of the default notification by overriding the following keys:
144144

145145
* `ra.notification.application_update_available`: the notification text
146-
* `ra.action.update_application`: the reload button text
146+
* `ra.action.update_application`: the reload button text

docs/CreateInDialogButton.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ In the above example, `<CreateInDialogButton>` is used to create a new employee
6565

6666
`<CreateInDialogButton>` accepts the following props:
6767

68-
* `inline`: set to true to display only an Material UI `<IconButton>` instead of the full `<Button>`. The label will still be available as a `<Tooltip>` though.
68+
* `inline`: set to true to display only a Material UI `<IconButton>` instead of the full `<Button>`. The label will still be available as a `<Tooltip>` though.
6969
* `icon`: allows to override the default icon.
7070
* `label`: allows to override the default button label. I18N is supported.
7171
* `ButtonProps`: object containing props to pass to Material UI's `<Button>`.

docs/CreateReactAdmin.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ yarn create react-admin your-admin-name
1919

2020
The terminal will then ask you to choose:
2121
- a data provider
22-
- a auth provider
22+
- an auth provider
2323
- the names of the resources to add
2424
- the package manager to use to install the dependencies
2525

docs/CreateReactApp.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ Your app is now up and running, you can start tweaking it.
7171

7272
If your users might keep the application open for a long time, it's a good idea to add the [`<CheckForApplicationUpdate>`](./CheckForApplicationUpdate.md) component. It will check whether a more recent version of your application is available and prompt users to reload their browser tab.
7373

74-
To determine whether your application has been updated, it fetches the current page at a regular interval, builds an hash of the response content (usually the HTML) and compares it with the previous hash.
74+
To determine whether your application has been updated, it fetches the current page at a regular interval, builds a hash of the response content (usually the HTML) and compares it with the previous hash.
7575

7676
To enable it, start by creating a custom layout:
7777

@@ -105,4 +105,4 @@ const App = () => (
105105
);
106106

107107
export default App;
108-
```
108+
```

docs/Edit.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -103,7 +103,7 @@ export const PostEdit = () => (
103103

104104
Common buttons used as Edit actions are:
105105

106-
- [`<CreateButton>`](./CreateButton.md) to create a new record
106+
- [`<CreateButton>`](./Buttons.md#createbutton) to create a new record
107107
- [`<ListButton>`](./Buttons.md#listbutton) to go back to the list
108108
- [`<ShowButton>`](./Buttons.md#showbutton) to go to the show page
109109
- [`<UpdateButton>`](./UpdateButton.md) to trigger a change in the data

docs/EditInDialogButton.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ const CompanyShow = () => (
5858

5959
It accepts the following props:
6060

61-
* `inline`: set to true to display only an Material UI `<IconButton>` instead of the full `<Button>`. The label will still be available as a `<Tooltip>` though.
61+
* `inline`: set to true to display only a Material UI `<IconButton>` instead of the full `<Button>`. The label will still be available as a `<Tooltip>` though.
6262
* `icon`: allows to override the default icon.
6363
* `label`: allows to override the default button label. I18N is supported.
6464
* `ButtonProps`: object containing props to pass to Material UI's `<Button>`.

docs/Features.md

+3-3
Original file line numberDiff line numberDiff line change
@@ -741,7 +741,7 @@ When users submit a form, or delete a record, the UI reflects their change immed
741741

742742
This undo feature is enabled by default, and requires no particular setup on the server side. In fact, react-admin delays the call to the data provider for mutations, to give users a "grace" period. That's why the actual call to `dataProvider.update()` occurs 5 seconds after the user submits an update form - even though the UI reflects the changes immediately.
743743

744-
You can disable this feature page by page by choosing a different [mutationMode](./Edit.md#mutationmode).
744+
You can disable this feature page by page, by choosing a different [mutationMode](./Edit.md#mutationmode).
745745

746746
## Roles & Permissions
747747

@@ -1157,7 +1157,7 @@ For instance, the Saved Queries feature lets users **save a combination of filte
11571157
</video>
11581158

11591159

1160-
Saved queries persist between sessions, so users can find their custom queries even after closing and reopening the admin. Saved queries are available both for the Filter Button/Form combo and for the `<FilterList>` Sidebar. It's enabled by default for the Filter Button/Form combo but you have to add it yourself in the `<FilterList>` Sidebar.
1160+
Saved queries persist between sessions, so users can find their custom queries even after closing and reopening the admin. Saved queries are available both for the Filter Button/Form combo and for the `<FilterList>` Sidebar. It's enabled by default for the Filter Button/Form combo, but you have to add it yourself in the `<FilterList>` Sidebar.
11611161

11621162
```diff
11631163
import { FilterList, FilterListItem, List, Datagrid } from 'react-admin';
@@ -1373,7 +1373,7 @@ React-admin is **fully internationalized**.
13731373
</video>
13741374

13751375

1376-
The default interface messages (for buttons, tooltips, input labels, etc) are in English. You can translate them to any of [the 30+ languages supported by react-admin](./TranslationLocales.md) by importing the appropriate translation package. For instance, to translate to French:
1376+
The default interface messages (for buttons, tooltips, input labels, etc.) are in English. You can translate them to any of [the 30+ languages supported by react-admin](./TranslationLocales.md) by importing the appropriate translation package. For instance, to translate to French:
13771377

13781378
```jsx
13791379
import { Admin } from 'react-admin';

docs/Inputs.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ All input components accept the following props:
5454

5555
React-admin uses [react-hook-form](https://react-hook-form.com/) to control form inputs. Each input component also accepts all react-hook-form [useController](https://react-hook-form.com/docs/usecontroller) hook options.
5656

57-
Additional props are passed down to the underlying component (usually an Material UI component). For instance, when setting the `variant` prop on a `<TextInput>` component, the underlying Material UI `<TextField>` receives it, and renders it with a different variant. Refer to the documentation of each Input component to see the underlying Material UI component and its props.
57+
Additional props are passed down to the underlying component (usually a Material UI component). For instance, when setting the `variant` prop on a `<TextInput>` component, the underlying Material UI `<TextField>` receives it, and renders it with a different variant. Refer to the documentation of each Input component to see the underlying Material UI component and its props.
5858

5959
## Which Input Component to Use?
6060

@@ -596,7 +596,7 @@ import { FormDataConsumer } from 'react-admin';
596596

597597
Material UI offers [3 variants for text fields](https://mui.com/material-ui/react-text-field/#basic-textfield): `outlined`, `filled`, and `standard`. The default react-admin theme uses the `filled` variant.
598598

599-
Most Input components pass their additional props down to the root component, which is often an Material UI Field component. This means you can pass a `variant` prop to override the variant of a single input:
599+
Most Input components pass their additional props down to the root component, which is often a Material UI Field component. This means you can pass a `variant` prop to override the variant of a single input:
600600

601601
```tsx
602602
<TextInput source="name" variant="outlined" />
@@ -761,7 +761,7 @@ Now the component will render with a label:
761761

762762
### Using Material UI Field Components
763763

764-
Instead of HTML `input` elements, you can use an Material UI component like `TextField`. To bind Material UI components to the form values, use the `useController()` hook:
764+
Instead of HTML `input` elements, you can use a Material UI component like `TextField`. To bind Material UI components to the form values, use the `useController()` hook:
765765

766766
```tsx
767767
// in LatLongInput.js
@@ -885,7 +885,7 @@ const LatLngInput = (props: BoundedTextFieldProps) => {
885885
};
886886
```
887887

888-
Here is another example, this time using an Material UI `Select` component:
888+
Here is another example, this time using a Material UI `Select` component:
889889

890890
```tsx
891891
// in SexInput.js

docs/Layout.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ export const MyError = ({
211211
};
212212
```
213213
214-
**Tip:** [React's Error Boundaries](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) are used internally to display the Error Page whenever an error occurs. Error Boundaries only catch errors during rendering, in lifecycle methods, and in constructors of the components tree. This implies in particular that errors during event callbacks (such as 'onClick') are not concerned. Also note that the Error Boundary component is only set around the main container of React Admin. In particular, you won't see it for errors thrown by the [sidebar Menu](./Menu.md), nor the [AppBar](#customizing-the-appbar-content). This ensures the user is always able to navigate away from the Error Page.
214+
**Tip:** [React's Error Boundaries](https://react.dev/reference/react/Component#catching-rendering-errors-with-an-error-boundary) are used internally to display the Error Page whenever an error occurs. Error Boundaries only catch errors during rendering, in lifecycle methods, and in constructors of the components tree. This implies in particular that errors during event callbacks (such as 'onClick') are not concerned. Also note that the Error Boundary component is only set around the main container of React Admin. In particular, you won't see it for errors thrown by the [sidebar Menu](./Menu.md), nor the [AppBar](#adding-a-custom-context). This ensures the user is always able to navigate away from the Error Page.
215215

216216
## `menu`
217217

docs/List.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -946,7 +946,7 @@ The title can be either a string or a React element.
946946

947947
## `sx`: CSS API
948948

949-
The `<List>` component accepts the usual `className` prop but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (as most Material UI components, see their [documentation about it](https://mui.com/material-ui/customization/how-to-customize/#overriding-nested-component-styles)). This property accepts the following subclasses:
949+
The `<List>` component accepts the usual `className` prop, but you can override many class names injected to the inner components by React-admin thanks to the `sx` property (as most Material UI components, see their [documentation about it](https://mui.com/material-ui/customization/how-to-customize/#overriding-nested-component-styles)). This property accepts the following subclasses:
950950

951951
| Rule name | Description |
952952
|-----------------------|---------------------------------------------------------------|

docs/ListTutorial.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -514,8 +514,8 @@ On Mobile, `<Datagrid>` doesn't work well - the screen is too narrow. You should
514514
515515
To use `<Datagrid>` on desktop and `<SimpleList>` on mobile, use the `useMediaQuery` hook:
516516
517-
```jsx
518-
// in src/posts.js
517+
```tsx
518+
// in src/posts.tsx
519519
import * as React from 'react';
520520
import { useMediaQuery, Theme } from '@mui/material';
521521
import { List, SimpleList, Datagrid, TextField, ReferenceField } from 'react-admin';

docs/LongForm.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -355,7 +355,7 @@ export const TagEdit = () => (
355355

356356
The children of `<LongForm>` must be `<LongForm.Section>` elements.
357357

358-
This component adds a section title (using a `<Typography variant="h4">`), then renders each child inside a [Material UI `<Stack>`](https://mui.com/material-ui/react-stack/), and finally adds an Material UI `<Divider>` at the bottom of the section.
358+
This component adds a section title (using a `<Typography variant="h4">`), then renders each child inside a [Material UI `<Stack>`](https://mui.com/material-ui/react-stack/), and finally adds a Material UI `<Divider>` at the bottom of the section.
359359

360360
It accepts the following props:
361361

@@ -470,7 +470,7 @@ Check [the `<AutoSave>` component](./AutoSave.md) documentation for more details
470470

471471
## Role-Based Access Control (RBAC)
472472

473-
Fine-grained permissions control can be added by using the [`<LongForm>`](./AuthRBAC.md#longform) and [`<LongFormSection>`](./AuthRBAC.md#longformsection) components provided by the `@react-admin/ra-enterprise` package.
473+
Fine-grained permissions control can be added by using the [`<LongForm>`](./AuthRBAC.md#longform) and [`<LongFormSection>`](./AuthRBAC.md#longform) components provided by the `@react-admin/ra-enterprise` package.
474474

475475
{% raw %}
476476
```tsx

docs/NextJs.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ This implies the creation of a new page in the Next.js app. Create a new file at
115115
- App Router: `src/app/admin/page.tsx`
116116
- Pages Router: `src/pages/admin/index.tsx`
117117

118-
No matter which system you choose, the file should contains the same code:
118+
No matter which system you choose, the file should contain the same code:
119119

120120
```tsx
121121
import { NextPage } from "next";
@@ -225,4 +225,4 @@ const AdminApp = () => (
225225
export default AdminApp;
226226
```
227227

228-
Your react-admin app now uses the Supabase API to fetch and update data.
228+
Your react-admin app now uses the Supabase API to fetch and update data.

docs/NumberField.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ import { NumberField } from 'react-admin';
119119

120120
For information, the default `transform` function is:
121121

122-
```jsx
122+
```tsx
123123
const defaultTransform = value => {
124124
if (!value || typeof value === 'number') {
125125
return value;
@@ -129,4 +129,4 @@ const defaultTransform = value => {
129129
return value;
130130
}
131131
};
132-
```
132+
```

docs/Pagination.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ const PostPagination = () => <Pagination rowsPerPageOptions={[10, 25, 50, 100]}
5353

5454
## Infinite Scroll
5555

56-
On mobile devices, the `<Pagination>` component is not very user friendly. The expected user experience is to reveal more records when the user scrolls to the bottom of the list. This UX is also useful on desktop, for lists with a large number of records.
56+
On mobile devices, the `<Pagination>` component is not very user-friendly. The expected user experience is to reveal more records when the user scrolls to the bottom of the list. This UX is also useful on desktop, for lists with a large number of records.
5757

5858
<video controls autoplay playsinline muted loop width="100%">
5959
<source src="./img/infinite-book-list.webm" poster="./img/infinite-book-list.webp" type="video/webm">
@@ -86,4 +86,4 @@ const BookList = () => (
8686

8787
`<InfiniteList>` uses a special pagination component, `<InfinitePagination>`, which doesn't display any pagination buttons. Instead, it displays a loading indicator when the user scrolls to the bottom of the list. But you cannot use this `<InfinitePagination>` inside a regular `<List>` component.
8888

89-
For more information, see [the `<InfiniteList>` documentation](./InfiniteList.md).
89+
For more information, see [the `<InfiniteList>` documentation](./InfiniteList.md).

docs/Permissions.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -253,7 +253,7 @@ export const UserCreate = () => {
253253
}
254254
```
255255

256-
**Tip**: If you use RBAC, use [`ra-rbac`'s `<SimpleForm>` component](./AuthRBAC.md#simpleform) instead. It render its children only if the user has the required permissions.
256+
**Tip**: If you use RBAC, use [`ra-rbac`'s `<SimpleForm>` component](./AuthRBAC.md#simpleform) instead. It renders its children only if the user has the required permissions.
257257

258258
```jsx
259259
import { Create, TextInput } from 'react-admin';

docs/Realtime.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -209,7 +209,7 @@ To create your own translations, you can use the TypeScript types to see the str
209209

210210
Here is an example of how to customize translations in your app:
211211

212-
```jsx
212+
```tsx
213213
import polyglotI18nProvider from 'ra-i18n-polyglot';
214214
import englishMessages from 'ra-language-english';
215215
import frenchMessages from 'ra-language-french';

docs/RecordRepresentation.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ title: "The RecordRepresentation Component"
55

66
Render the record representation, leveraging the [`recordRepresentation`](./Resource.md#recordrepresentation) prop of the parent `<Resource>` component.
77

8-
You can also uses its hook version: [`<useGetRecordRepresentation>`](./useGetRecordRepresentation.md).
8+
You can also use its hook version: [`<useGetRecordRepresentation>`](./useGetRecordRepresentation.md).
99

1010
## Usage
1111

0 commit comments

Comments
 (0)