Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Doc] Fix docs typos and grammar #5480

Merged
merged 1 commit into from
Nov 3, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/CreateEdit.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ The `<Create>` and `<Edit>` components both take care of two things:

In some cases, you may want to customize the view entirely (i.e. keep the code for step 1, and provide your own code for step 2). For these cases, react-admin provides two hooks, `useCreateController()` and `useEditController()`. These hooks contain just the controller part of the `<Create>` and `<Edit>` components.

**Tip**: You should not use these hooks to hide or show form inputs based on the data. For that need, check [`<FormDataConsumer>`](./Inputs.md#linking-two-inputs)
**Tip**: You should not use these hooks to hide or show form inputs based on the data. For that need, check [`<FormDataConsumer>`](./Inputs.md#linking-two-inputs).

### `useCreateController`

Expand Down Expand Up @@ -858,7 +858,7 @@ const PostEdit = props => (

By default `<TabbedForm>` uses `<TabbedFormTabs>`, an internal react-admin component, to renders tabs. You can pass a custom component as the `tabs` prop to override the default component. Besides, props from `<TabbedFormTabs>` are passed to material-ui's `<Tabs>` component inside `<TabbedFormTabs>`.

The following example shows how to make use of scrollable `<Tabs>`. Pass the `scrollable` prop to `<TabbedFormTabs>` and pass that as the `tabs` prop to `<TabbedForm>`
The following example shows how to make use of scrollable `<Tabs>`. Pass the `scrollable` prop to `<TabbedFormTabs>` and pass that as the `tabs` prop to `<TabbedForm>`.

```jsx
import * as React from "react";
Expand Down
2 changes: 1 addition & 1 deletion docs/CustomApp.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ export default ({

You can use this script as a base and then add your own middlewares or enhancers, e.g., to allow store persistence with [redux-persist](https://github.com/rt2zz/redux-persist).

Then, use the `<Admin>` component as you would in a standalone application. Here is an example with 3 resources: `posts`, `comments`, and `users`
Then, use the `<Admin>` component as you would in a standalone application. Here is an example with 3 resources: `posts`, `comments`, and `users`.

```jsx
// in src/App.js
Expand Down
2 changes: 1 addition & 1 deletion docs/Inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,7 @@ You can customize the rich text editor toolbar using the `toolbar` attribute, as
<RichTextInput source="body" toolbar={[ ['bold', 'italic', 'underline', 'link'] ]} />
```

If you need to add Quill `modules` or `themes`, you can do so by passsing them in the `options` prop.
If you need to add Quill `modules` or `themes`, you can do so by passing them in the `options` prop.

{% raw %}
```jsx
Expand Down
10 changes: 5 additions & 5 deletions docs/List.md
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ export default PostList;

One of the most important features of the List page is the ability to filter the results. React-admin does its best to offer a powerful filter functionality, and to get out of the way when you want to go further.

The next sections explain hows to use the filter functionality. And first, a few explanations about the inner workings of filters:
The next sections explain how to use the filter functionality. And first, a few explanations about the inner workings of filters:

- [Filter Query Parameter](#filter-query-parameter)
- [Linking To A Pre-Filtered List](#linking-to-a-pre-filtered-list)
Expand Down Expand Up @@ -1108,7 +1108,7 @@ const CustomerList = props => (

![Filter Live Search](./img/filter-live-search.gif)

The filter sidebar is not a form. Therefore, if your users need to enter complex filters, you'll have to recreate a filter form using react-final-form (see the [Buidling a custom filter](#building-a-custom-filter) section below for an example). However, if you only need one text input with a filter-as-you-type behavior, you'll find the `<FilterLiveSearch>` component convenient.
The filter sidebar is not a form. Therefore, if your users need to enter complex filters, you'll have to recreate a filter form using react-final-form (see the [Building a custom filter](#building-a-custom-filter) section below for an example). However, if you only need one text input with a filter-as-you-type behavior, you'll find the `<FilterLiveSearch>` component convenient.

It outputs a form containing a single `<SearchInput>`, which modifies the page filter on change. That's usually what users expect for a full-text filter. `<FilterLiveSearch>` only needs a `source` field.

Expand Down Expand Up @@ -1290,7 +1290,7 @@ You can use a similar approach to customize the list filter completely, e.g. to

React-admin does its best to offer a powerful sort functionality, and to get out of the way when you want to go further.

The next sections explain hows to use the sort functionality. And first, a few explanations about the inner workings of sorting in react-admin:
The next sections explain how to use the sort functionality. And first, a few explanations about the inner workings of sorting in react-admin:

- [Sort Query Parameter](#sort-query-parameter)
- [Linking To A Pre-Sorted List](#linking-to-a-pre-sorted-list)
Expand Down Expand Up @@ -1444,9 +1444,9 @@ export const PostList = (props) => (

![Sort Button](./img/sort-button.gif)

Some List views don't have a natural UI for sorting - e.g. the `<SimpleList>`, or a list of images, don't have column headers like the `<Datagrid>`. For these cases, react-admin offers the `<SortButton>`, which displays a drodown list of fields that the user can choose to sort on.
Some List views don't have a natural UI for sorting - e.g. the `<SimpleList>`, or a list of images, don't have column headers like the `<Datagrid>`. For these cases, react-admin offers the `<SortButton>`, which displays a dropdown list of fields that the user can choose to sort on.

`<SortButton>` expects one prop: `fields`, the list of fields it should allows to sort on. For instance, here is how to offer a button to sort on the `reference`, `sales`, and `stock` fields:
`<SortButton>` expects one prop: `fields`, the list of fields it should allow to sort on. For instance, here is how to offer a button to sort on the `reference`, `sales`, and `stock` fields:

```jsx
import * as React from 'react';
Expand Down
4 changes: 2 additions & 2 deletions docs/Readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ The [React-Admin Enterprise Edition](https://marmelab.com/ra-enterprise) <img cl
- `ra-tree`: Edit and visualize tree structures. Reorganize by drag and drop. Adapts to any data structure on the backend (parent_id, children, nested sets, etc).
- `ra-tour`: Guided tours for react-admin applications. Step-by-step instructions, Material-ui skin.
- `ra-markdown`: Read Markdown data, and edit it using a WYSIWYG editor in your admin
- Get **Support** from experienced react and react-admin developers, who will help you to find the right information and troubleshoot your bugs.
- Get **Support** from experienced react and react-admin developers, who will help you find the right information and troubleshoot your bugs.
- Get a **50% Discount on Professional Services** in case you need coaching, audit, or custom development by our experts.
- Get access to exclusive **Learning Material**, including a Storybook full of examples, and a dedicated demo app.
- Prioritize your needs in the react-admin **Development Roadmap** thanks to a priority vote.
Expand All @@ -144,7 +144,7 @@ The second way to contribute is to **answer support questions on [StackOverflow]

Pull requests for **bug fixes** are welcome on the [GitHub repository](https://github.com/marmelab/react-admin). There is always a bunch of [issues labeled "Good First Issue"](https://github.com/marmelab/react-admin/issues?q=is%3Aopen+is%3Aissue+label%3A%22good+first+issue%22) in the bug tracker - start with these. Check the contributing guidelines in [the repository README](https://github.com/marmelab/react-admin#contributing).

If you want to **add a feature**, you can open a Pull request on the `next` branch. We don't accept all features - we try to keep the react-admin code small and manageable. Try and see if your feature can't be built as an additional `npm` package. If you're in doubt, open a "Feature Request" issue to see if the core team would accept your feature before developing it.
If you want to **add a feature**, you can open a Pull request on the `next` branch. We don't accept all features - we try to keep the react-admin code small and manageable. Try and see if your feature can be built as an additional `npm` package. If you're in doubt, open a "Feature Request" issue to see if the core team would accept your feature before developing it.

## License

Expand Down
2 changes: 1 addition & 1 deletion docs/UnitTesting.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ it('should send the user to another url', () => {

As explained on the [Authorization page](./Authorization.md), it's possible to manage permissions via the authentication provider in order to filter page and fields the users can see.

In order to avoid regressions and make the design explicit to your co-workers, it's better to unit test which fields is supposed to be displayed or hidden for each permission.
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.

Here is an example with Jest and Enzyme, which is testing the [`UserShow` page of the simple example](https://github.com/marmelab/react-admin/blob/master/examples/simple/src/users/UserShow.js).

Expand Down