From 8bba282dd71fd5db2d6f7bdb0a4c092a9ae1b0ef Mon Sep 17 00:00:00 2001 From: asvarcas Date: Tue, 3 Nov 2020 11:01:03 -0300 Subject: [PATCH] Fix docs typos and grammar --- docs/CreateEdit.md | 4 ++-- docs/CustomApp.md | 2 +- docs/Inputs.md | 2 +- docs/List.md | 10 +++++----- docs/Readme.md | 4 ++-- docs/UnitTesting.md | 2 +- 6 files changed, 12 insertions(+), 12 deletions(-) diff --git a/docs/CreateEdit.md b/docs/CreateEdit.md index e79b9c4b9a8..fc5c28ad429 100644 --- a/docs/CreateEdit.md +++ b/docs/CreateEdit.md @@ -571,7 +571,7 @@ The `` and `` 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 `` and `` components. -**Tip**: You should not use these hooks to hide or show form inputs based on the data. For that need, check [``](./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 [``](./Inputs.md#linking-two-inputs). ### `useCreateController` @@ -858,7 +858,7 @@ const PostEdit = props => ( By default `` uses ``, 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 `` are passed to material-ui's `` component inside ``. -The following example shows how to make use of scrollable ``. Pass the `scrollable` prop to `` and pass that as the `tabs` prop to `` +The following example shows how to make use of scrollable ``. Pass the `scrollable` prop to `` and pass that as the `tabs` prop to ``. ```jsx import * as React from "react"; diff --git a/docs/CustomApp.md b/docs/CustomApp.md index f6a376e1dc1..6515dc441f8 100644 --- a/docs/CustomApp.md +++ b/docs/CustomApp.md @@ -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 `` component as you would in a standalone application. Here is an example with 3 resources: `posts`, `comments`, and `users` +Then, use the `` component as you would in a standalone application. Here is an example with 3 resources: `posts`, `comments`, and `users`. ```jsx // in src/App.js diff --git a/docs/Inputs.md b/docs/Inputs.md index 90ba56a2f97..d2c3f6cc371 100644 --- a/docs/Inputs.md +++ b/docs/Inputs.md @@ -418,7 +418,7 @@ You can customize the rich text editor toolbar using the `toolbar` attribute, as ``` -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 diff --git a/docs/List.md b/docs/List.md index efad88bb66d..3541759f312 100644 --- a/docs/List.md +++ b/docs/List.md @@ -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) @@ -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 `` 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 `` component convenient. It outputs a form containing a single ``, which modifies the page filter on change. That's usually what users expect for a full-text filter. `` only needs a `source` field. @@ -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) @@ -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 ``, or a list of images, don't have column headers like the ``. For these cases, react-admin offers the ``, 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 ``, or a list of images, don't have column headers like the ``. For these cases, react-admin offers the ``, which displays a dropdown list of fields that the user can choose to sort on. -`` 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: +`` 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'; diff --git a/docs/Readme.md b/docs/Readme.md index 09076bd5bc5..b70cad4b423 100644 --- a/docs/Readme.md +++ b/docs/Readme.md @@ -127,7 +127,7 @@ The [React-Admin Enterprise Edition](https://marmelab.com/ra-enterprise) { 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).