From b402fb1cce79fe6fab2546ace2c0bafc8d8d8cfe Mon Sep 17 00:00:00 2001 From: asvarcas Date: Tue, 22 Oct 2019 15:55:41 -0300 Subject: [PATCH] Fix typos in the docs. --- CHANGELOG.md | 40 +++++++++++++++++----------------- README.md | 2 +- UPGRADE.md | 2 +- docs/Fields.md | 8 +++---- docs/List.md | 10 ++++----- docs/Translation.md | 2 +- packages/react-admin/README.md | 2 +- 7 files changed, 33 insertions(+), 33 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a4156d8ed2a..9fc9b54f9d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,7 +5,7 @@ * Fix typos and anchors in the docs. ([3860](https://github.com/marmelab/react-admin/pull/3860)) ([WiXSL](https://github.com/WiXSL)) * Fix `` is not sortable when used inside `` ([3859](https://github.com/marmelab/react-admin/pull/3859)) ([fzaninotto](https://github.com/fzaninotto)) * Fix `` error message color ([3857](https://github.com/marmelab/react-admin/pull/3857)) ([fzaninotto](https://github.com/fzaninotto)) -* Fix `` does not use custom label ([3855](https://github.com/marmelab/react-admin/pull/3855)) ([fzaninotto](https://github.com/* fzaninotto))([3852](https://github.com/marmelab/react-admin/pull/3852)) ([fzaninotto](https://github.com/fzaninotto)) +* Fix `` does not use custom label ([3855](https://github.com/marmelab/react-admin/pull/3855)) ([fzaninotto](https://github.com/fzaninotto))([3852](https://github.com/marmelab/react-admin/pull/3852)) ([fzaninotto](https://github.com/fzaninotto)) * Fix missing `@testing-library/react` dependency([3851](https://github.com/marmelab/react-admin/pull/3851)) ([zyhou](https://github.com/zyhou)) ## v3.0.0-beta.2 @@ -261,7 +261,7 @@ ## v2.9.4 -* Fix closing delete confirmation modal triggers datagrid rowClick event ([3360](https://github.com/marmelab/react-admin/pull/3360)) ([Kmaschta](https://github.com/Kmaschta)) +* Fix closing delete confirmation modal triggers `` rowClick event ([3360](https://github.com/marmelab/react-admin/pull/3360)) ([Kmaschta](https://github.com/Kmaschta)) * Fix `` does not use `className` prop ([3357](https://github.com/marmelab/react-admin/pull/3357)) ([Kmaschta](https://github.com/Kmaschta)) * Fix unused import in tutorial ([3366](https://github.com/marmelab/react-admin/pull/3366)) ([jesseshieh](https://github.com/jesseshieh)) * Fix broken links to material-ui v1 documentation ([3365](https://github.com/marmelab/react-admin/pull/3365)) ([fzaninotto](https://github.com/fzaninotto)) @@ -446,10 +446,10 @@ For highlights about this version, read [the react-admin 2.8 announcement blog p * Fix import path typo in Unit Testing documentation ([2872](https://github.com/marmelab/react-admin/pull/2872)) ([mexitalian](https://github.com/mexitalian)) * Fix `` throws an error when receiving an empty value ([2861](https://github.com/marmelab/react-admin/pull/2861)) ([tiagoschenkel](https://github.com/tiagoschenkel)) * Fix `` shows choices in a wrong position when input element moves to another location ([2860](https://github.com/marmelab/react-admin/pull/2860)) ([tiagoschenkel](https://github.com/tiagoschenkel)) -* Migrate ra-core controllers to TypeScript ([2881](https://github.com/marmelab/react-admin/pull/2881)) ([djhi](https://github.com/djhi)) -* Migrate ra-core inference to TypeScript ([2879](https://github.com/marmelab/react-admin/pull/2879)) ([djhi](https://github.com/djhi)) -* Migrate ra-core form to TypeScript ([2878](https://github.com/marmelab/react-admin/pull/2878)) ([djhi](https://github.com/djhi)) -* Migrate ra-core i18n Migration to TypeScript ([2874](https://github.com/marmelab/react-admin/pull/2874)) ([djhi](https://github.com/djhi)) +* Migrate `ra-core` controllers to TypeScript ([2881](https://github.com/marmelab/react-admin/pull/2881)) ([djhi](https://github.com/djhi)) +* Migrate `ra-core` inference to TypeScript ([2879](https://github.com/marmelab/react-admin/pull/2879)) ([djhi](https://github.com/djhi)) +* Migrate `ra-core` form to TypeScript ([2878](https://github.com/marmelab/react-admin/pull/2878)) ([djhi](https://github.com/djhi)) +* Migrate `ra-core` i18n Migration to TypeScript ([2874](https://github.com/marmelab/react-admin/pull/2874)) ([djhi](https://github.com/djhi)) ## v2.7.1 @@ -516,7 +516,7 @@ For highlights about this version, read [the react-admin 2.8 announcement blog p * Add documentation about dispatching actions within `` ([2775](https://github.com/marmelab/react-admin/pull/2775)) ([fzaninotto](https://github.com/fzaninotto)) * Add Hasura data provider ([2791](https://github.com/marmelab/react-admin/pull/2791)) ([praveenweb](https://github.com/praveenweb)) * Add JSDoc to validators for easier debugging ([2773](https://github.com/marmelab/react-admin/pull/2773)) ([fzaninotto](https://github.com/fzaninotto)) -* Migrate ra-core util scripts to TypeScript ([2787](https://github.com/marmelab/react-admin/pull/2787)) ([fzaninotto](https://github.com/fzaninotto)) +* Migrate `ra-core` util scripts to TypeScript ([2787](https://github.com/marmelab/react-admin/pull/2787)) ([fzaninotto](https://github.com/fzaninotto)) ## v2.6.1 @@ -638,8 +638,8 @@ For highlights about this version, read [the react-admin 2.6 announcement blog p * Fix non-Admin snippet in custom app documentation ([#2493](https://github.com/marmelab/react-admin/pull/2493)) ([fzaninotto](https://github.com/fzaninotto)) * Fix `` does not pass total to children ([#2487](https://github.com/marmelab/react-admin/pull/2487)) ([fzaninotto](https://github.com/fzaninotto)) * Fix production build problem with graphql-ast-types package ([#2486](https://github.com/marmelab/react-admin/pull/2486)) ([Kmaschta](https://github.com/Kmaschta) -* Migrate non-data actions of ra-core package to Typescript ([#2521](https://github.com/marmelab/react-admin/pull/2521)) ([xavierhans](https://github.com/xavierhans) -* Migrate i18n and auth directories of ra-core package to TypeScript ([#2508](https://github.com/marmelab/react-admin/pull/2508)) ([djhi](https://github.com/djhi) +* Migrate non-data actions of `ra-core` package to Typescript ([#2521](https://github.com/marmelab/react-admin/pull/2521)) ([xavierhans](https://github.com/xavierhans) +* Migrate i18n and auth directories of `ra-core` package to TypeScript ([#2508](https://github.com/marmelab/react-admin/pull/2508)) ([djhi](https://github.com/djhi) * Add Catalan translation ([#2488](https://github.com/marmelab/react-admin/pull/2488)) ([sergioedo](https://github.com/sergioedo)) ## v2.4.1 @@ -981,7 +981,7 @@ For highlights about this version, read [the 2.1 release announcement post](http * Fix yarn.lock to match `packages.json` ([fzaninotto](https://github.com/fzaninotto)) * Fix select all checkbox selects rows twice ([fzaninotto](https://github.com/fzaninotto)) * Fix typo in Inputs documentation ([afilp](https://github.com/afilp)) -* Fix custom datagrid style fonction example ([afilp](https://github.com/afilp)) +* Fix custom `` style fonction example ([afilp](https://github.com/afilp)) # v2.0.0 @@ -1024,7 +1024,7 @@ This new release is not backwards compatible with 1.x. Please refer to [the Upgr * Documentation: Update CreateEdit.md for 'number' validation ([afilp](https://github.com/afilp)) * Fix Edit view refresh does not cancel changes ([djhi](https://github.com/djhi)) * Fix form default values can't be changed once mounted ([djhi](https://github.com/djhi)) -* Documentation: Add a FAQ entry about unique child key in datagrid ([djhi](https://github.com/djhi)) +* Documentation: Add a FAQ entry about unique child key in `` ([djhi](https://github.com/djhi)) * Documentation: Add explanation about dateInput and timezone ([alexisjanvier](https://github.com/alexisjanvier)) * Fix link color in reference field ([djhi](https://github.com/djhi)) * Fix: Cleanup example app code ([djhi](https://github.com/djhi)) @@ -1431,8 +1431,8 @@ See the [v0.8.0 announcement in the marmelab blog](https://marmelab.com/blog/201 * Add `filter` prop to `` component for permanent filters * Add support for `defaultValue` in filters * Add support for functions as value for the `defaultValue` prop -* Add ability to disable sorting on datagrid headers -* Add `perPage`, `sort`, and `filter` props to ``` +* Add ability to disable sorting on `` headers +* Add `perPage`, `sort`, and `filter` props to `` * Add `label` prop to all buttons * Add Custom Actions documentation * Add CSS prefix to flex-box elements ([yshing](https://github.com/yshing)) @@ -1515,7 +1515,7 @@ See the [v0.7.0 announcement in the marmelab blog](https://marmelab.com/blog/201 * [BC Break] The `filter` prop of the component now expects an element rather than a component (`} >` rather than ``) * [BC Break] The `title` prop of all view components now expect an element rather than a component (``} > rather than ``) * [BC Break] Rename `style` to `elStyle` and let style override container element -* Add special design for non-sortable columns in datagrid +* Add special design for non-sortable columns in `` * Add `style`, `elStyle` to all components * Add `headerStyle` to Field components (ability to style ``) * Add `rowStyle` to `` (ability to style `` according to the value) @@ -1527,10 +1527,10 @@ See the [v0.7.0 announcement in the marmelab blog](https://marmelab.com/blog/201 * Add `` component * Add `` component * Add `` component -* Align datagrid first column to the page title +* Align `` first column to the page title * Hide resources in the Menu when they don't have a list view * Fix warning for fields with no source and no label -* Fix FilterButton for fields without label +* Fix `` for fields without label ## v0.5.4 @@ -1551,7 +1551,7 @@ See the [v0.7.0 announcement in the marmelab blog](https://marmelab.com/blog/201 * Fix `` subcomponent key in case of duplicate value ([rweindl](https://github.com/rweindl)) * Fix `make test-watch` command -* Fix datagrid margins to accomodate more content +* Fix `` margins to accomodate more content * Fix cannot set empty value on `` * Fix bad error message in `restClient` when no count header is found * Fix Infinite loop when two menu clicked quickly @@ -1579,13 +1579,13 @@ See the [v0.5.0 announcement in the marmelab blog](http://marmelab.com/blog/2016 * Fix spinner not stopping after delete * Fix Router now scrolls to top * Fix `` -* Fix datagrid layout to make columns adapt width to content +* Fix `` layout to make columns adapt width to content * Fix doc on reducers in CustomApp (by [ArnaudD](https://github.com/ArnaudD)) * Fix custom app docs now that redux form is required -* Fix RadioButtonGroupInput +* Fix `` * Fix Pagination when list has no filter * Fix clearing text filter doesn't fetch the unfiltered list -* Fix Warning when Datagrid contains two action buttons +* Fix Warning when `` contains two action buttons ## v0.4.0 diff --git a/README.md b/README.md index 2b30d03403f..281f6dd9f85 100644 --- a/README.md +++ b/README.md @@ -140,7 +140,7 @@ See the [Data Providers documentation](https://marmelab.com/react-admin/DataProv ## Batteries Included But Removable -React-admin is designed as a library of loosely coupled React components built on top of [material-ui](https://material-ui.com/), in addition to controller functions implemented the Redux way. It is very easy to replace one part of react-admin with your own, e.g. to use a custom datagrid, GraphQL instead of REST, or bootstrap instead of Material Design. +React-admin is designed as a library of loosely coupled React components built on top of [material-ui](https://material-ui.com/), in addition to controller functions implemented the Redux way. It is very easy to replace one part of react-admin with your own, e.g. to use a custom Datagrid, GraphQL instead of REST, or bootstrap instead of Material Design. ## Examples diff --git a/UPGRADE.md b/UPGRADE.md index 081e6e690d3..4d431cd03f9 100644 --- a/UPGRADE.md +++ b/UPGRADE.md @@ -1147,7 +1147,7 @@ import { undo, complete, + undoableEventEmitter, -} from 'ra-core'; +} from 'react-admin'; class Notification extends React.Component { state = { diff --git a/docs/Fields.md b/docs/Fields.md index d6f647c229b..2bc8d177695 100644 --- a/docs/Fields.md +++ b/docs/Fields.md @@ -103,7 +103,7 @@ Ideal for embedded arrays of objects, e.g. `tags` and `backlinks` in the followi The child must be an iterator component (like `` or ``). -Here is how to display all the backlinks of the current post as a `` +Here is how to display all the backlinks of the current post as a `` ```jsx @@ -245,7 +245,7 @@ import { FunctionField } from 'react-admin' `${record.first_name} ${record.last_name}`} /> ``` -**Tip**: Technically, you can omit the `source` and `sortBy` properties for the `` since you provide the render function. However, providing a `source` or a `sortBy` will allow the `Datagrid` to make the column sortable, since when a user clicks on a column, the datagrid uses these properties to sort. Should you provide both, `sortBy` will override `source` for sorting the column. +**Tip**: Technically, you can omit the `source` and `sortBy` properties for the `` since you provide the render function. However, providing a `source` or a `sortBy` will allow the `Datagrid` to make the column sortable, since when a user clicks on a column, the `Datagrid` uses these properties to sort. Should you provide both, `sortBy` will override `source` for sorting the column. ## `` @@ -798,7 +798,7 @@ export const ProductList = (props) => ( ); -// renders in the datagrid as +// renders in the Datagrid as 2 ``` @@ -827,7 +827,7 @@ export const ProductList = (props) => ( ); -// renders in the datagrid as +// renders in the Datagrid as 2 ``` {% endraw %} diff --git a/docs/List.md b/docs/List.md index a4adad72496..c6a7d5bed8c 100644 --- a/docs/List.md +++ b/docs/List.md @@ -769,11 +769,11 @@ export const PostList = (props) => ( ); ``` -The datagrid is an *iterator* component: it receives an array of ids, and a data store, and is supposed to iterate over the ids to display each record. Another example of iterator component is [``](#the-singlefieldlist-component). +The `Datagrid` is an *iterator* component: it receives an array of ids, and a data store, and is supposed to iterate over the ids to display each record. Another example of iterator component is [``](#the-singlefieldlist-component). ### Body element -By default, `` renders its body using ``, an internal react-admin component. You can pass a custom component as the `row` prop to override that default. And by the way, `` has a `row` property set to `` by default for the same purpose. `` receives the row `record`, the `resource`, and a copy of the datagrid children. That means you can create a custom datagrid logic without copying several components from the react-admin source. +By default, `` renders its body using ``, an internal react-admin component. You can pass a custom component as the `row` prop to override that default. And by the way, `` has a `row` property set to `` by default for the same purpose. `` receives the row `record`, the `resource`, and a copy of the `` children. That means you can create a custom `` logic without copying several components from the react-admin source. For instance, to show the selection checkbox only for records that have a `selectable` field set to true, you can override `` and `` as follows: @@ -823,7 +823,7 @@ export default PostList; ### Row Style Function -You can customize the datagrid row style (applied to the `` element) based on the record, thanks to the `rowStyle` prop, which expects a function. +You can customize the `` row style (applied to the `` element) based on the record, thanks to the `rowStyle` prop, which expects a function. For instance, this allows to apply a custom background to the entire row if one value of the record - like its number of views - passes a certain threshold. @@ -979,7 +979,7 @@ The `Datagrid` component accepts the usual `className` prop but you can override Here is an example of how you can override some of these classes: -You can customize the datagrid styles by passing a `classes` object as prop, through `useStyles()`. Here is an example: +You can customize the `` styles by passing a `classes` object as prop, through `useStyles()`. Here is an example: {% raw %} ```jsx @@ -1174,7 +1174,7 @@ A `` can delegate to any iterator component - `` is just one exa - `ids` is an array of the ids currently displayed in the list - `data` is an object of all the fetched data for this resource, indexed by id. -For instance, what if you prefer to show a list of cards rather than a datagrid? +For instance, what if you prefer to show a list of cards rather than a ``? ![Custom iterator](./img/custom-iterator.png) diff --git a/docs/Translation.md b/docs/Translation.md index 02338322f3e..7f48a71f9be 100644 --- a/docs/Translation.md +++ b/docs/Translation.md @@ -375,7 +375,7 @@ By default, React-admin uses resource names ("post", "comment", etc) and field n However, before humanizing names, react-admin checks the `messages` dictionary for a possible translation, with the following keys: - `resources.${resourceName}.name` for resource names (used for the menu and page titles) -- `resources.${resourceName}.fields.${fieldName}` for field names (used for datagrid header and form input labels) +- `resources.${resourceName}.fields.${fieldName}` for field names (used for `Datagrid` header and form input labels) This lets you translate your own resource and field names by passing a `messages` object with a `resources` key: diff --git a/packages/react-admin/README.md b/packages/react-admin/README.md index cf70929c888..4a7c97b1613 100644 --- a/packages/react-admin/README.md +++ b/packages/react-admin/README.md @@ -135,7 +135,7 @@ See the [Data Providers documentation](https://marmelab.com/react-admin/DataProv ## Batteries Included But Removable -React-admin is designed as a library of loosely coupled React components built on top of [material-ui](http://www.material-ui.com/#/), in addition to controller functions implemented the Redux way. It is very easy to replace one part of react-admin with your own, e.g. to use a custom datagrid, GraphQL instead of REST, or bootstrap instead of Material Design. +React-admin is designed as a library of loosely coupled React components built on top of [material-ui](http://www.material-ui.com/#/), in addition to controller functions implemented the Redux way. It is very easy to replace one part of react-admin with your own, e.g. to use a custom Datagrid, GraphQL instead of REST, or bootstrap instead of Material Design. ## Run the example