Skip to content

Commit 5a4bb64

Browse files
committed
Merge branch 'next' into menu-item-keyboard-shortcuts
2 parents caf750d + 67e6782 commit 5a4bb64

File tree

199 files changed

+4348
-1669
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

199 files changed

+4348
-1669
lines changed

CHANGELOG.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,26 @@
11
# Changelog
22

3+
## 5.9.0
4+
5+
* Add support for customization with MUI theme to inputs ([#10772](https://github.com/marmelab/react-admin/pull/10772)) ([Madeorsk](https://github.com/Madeorsk))
6+
* Add support for customization with MUI theme to main views components and buttons ([#10771](https://github.com/marmelab/react-admin/pull/10771)) ([Madeorsk](https://github.com/Madeorsk))
7+
* Add support for customization with MUI theme to fields and delete buttons ([#10770](https://github.com/marmelab/react-admin/pull/10770)) ([Madeorsk](https://github.com/Madeorsk))
8+
* Add `<RecordField>` component ([#10749](https://github.com/marmelab/react-admin/pull/10749)) ([fzaninotto](https://github.com/fzaninotto))
9+
* Add support for middlewares to `useUpdateMany` ([#10795](https://github.com/marmelab/react-admin/pull/10795)) ([slax57](https://github.com/slax57))
10+
* Allow resource specific translations for pages and buttons ([#10686](https://github.com/marmelab/react-admin/pull/10686)) ([djhi](https://github.com/djhi))
11+
* Fix `<AutocompleteInput>` should not break when overriding input slot props ([#10793](https://github.com/marmelab/react-admin/pull/10793)) ([slax57](https://github.com/slax57))
12+
* Fix bulk action buttons hover style ([#10788](https://github.com/marmelab/react-admin/pull/10788)) ([djhi](https://github.com/djhi))
13+
* Fix image alignment in ready page in some contexts ([#10780](https://github.com/marmelab/react-admin/pull/10780)) ([Madeorsk](https://github.com/Madeorsk))
14+
* Fix `useLogoutAccessDenied` should not throw when no `redirectTo` is provided ([#10763](https://github.com/marmelab/react-admin/pull/10763)) ([carloshv93](https://github.com/carloshv93))
15+
* [Doc] AuthProvider List: Add Appwrite ([#10798](https://github.com/marmelab/react-admin/pull/10798)) ([slax57](https://github.com/slax57))
16+
* [Doc] DataProvider List: Update Appwrite logo and name ([#10787](https://github.com/marmelab/react-admin/pull/10787)) ([slax57](https://github.com/slax57))
17+
* [Doc] Add a migration section in `<DataTable>` documentation that shows the codemod ([#10786](https://github.com/marmelab/react-admin/pull/10786)) ([djhi](https://github.com/djhi))
18+
* [Doc] Mention that `helperText` also supports translation keys ([#10785](https://github.com/marmelab/react-admin/pull/10785)) ([slax57](https://github.com/slax57))
19+
* [Doc] Add deployment instructions ([#10783](https://github.com/marmelab/react-admin/pull/10783)) ([Madeorsk](https://github.com/Madeorsk))
20+
* [Doc] Change our `Datagrid` examples to `DataTable` ([#10766](https://github.com/marmelab/react-admin/pull/10766)) ([erwanMarmelab](https://github.com/erwanMarmelab))
21+
* [Demo] Remove duplicate file `segments.ts` ([#10792](https://github.com/marmelab/react-admin/pull/10792)) ([slax57](https://github.com/slax57))
22+
* [chore] Ensure tests are working in all environments by running them in US english ([#10781](https://github.com/marmelab/react-admin/pull/10781)) ([Madeorsk](https://github.com/Madeorsk))
23+
324
## 5.8.4
425

526
* Replace `Datagrid` by `DataTable` in Guessers ([#10754](https://github.com/marmelab/react-admin/pull/10754)) ([erwanMarmelab](https://github.com/erwanMarmelab))

README.md

Lines changed: 11 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,22 @@ The `<Resource>` component defines CRUD pages (`list`, `edit`, and `create`) for
6565
```jsx
6666
// in posts.js
6767
import * as React from "react";
68-
import { List, Datagrid, Edit, Create, SimpleForm, DateField, TextField, EditButton, TextInput, DateInput, useRecordContext } from 'react-admin';
68+
import { List, DataTable, Edit, Create, SimpleForm, DateField, EditButton, TextInput, DateInput, useRecordContext } from 'react-admin';
6969
import BookIcon from '@mui/icons-material/Book';
7070
export const PostIcon = BookIcon;
7171

7272
export const PostList = () => (
7373
<List>
74-
<Datagrid>
75-
<TextField source="id" />
76-
<TextField source="title" />
77-
<DateField source="published_at" />
78-
<TextField source="average_note" />
79-
<TextField source="views" />
80-
<EditButton />
81-
</Datagrid>
74+
<DataTable>
75+
<DataTable.Col source="id" />
76+
<DataTable.Col source="title" />
77+
<DataTable.Col source="published_at" field={DateField} />
78+
<DataTable.Col source="average_note" />
79+
<DataTable.Col source="views" />
80+
<DataTable.Col>
81+
<EditButton />
82+
</DataTable.Col>
83+
</DataTable>
8284
</List>
8385
);
8486

docs/Actions.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -156,17 +156,17 @@ See the [Success and Error Side Effects](#success-and-error-side-effects) below
156156

157157
{% raw %}
158158
```jsx
159-
import { List, Datagrid, TextField } from 'react-admin';
159+
import { List, DataTable } from 'react-admin';
160160

161161
const PostList = () => (
162162
<List
163163
queryOptions={{ onSettled: (data, error) => console.log(data, error) }}
164164
>
165-
<Datagrid>
166-
<TextField source="id" />
167-
<TextField source="title" />
168-
<TextField source="body" />
169-
</Datagrid>
165+
<DataTable>
166+
<DataTable.Col source="id" />
167+
<DataTable.Col source="title" />
168+
<DataTable.Col source="body" />
169+
</DataTable>
170170
</List>
171171
);
172172
```
@@ -319,8 +319,8 @@ To execute some logic after a query or a mutation is complete, use the `onSucces
319319
- [`useNotify`](./useNotify.md): Return a function to display a notification.
320320
- [`useRedirect`](./useRedirect.md): Return a function to redirect the user to another page.
321321
- [`useRefresh`](./useRefresh.md): Return a function to force a rerender of the current view (equivalent to pressing the Refresh button).
322-
- [`useUnselect`](./useUnselect.md): Return a function to unselect lines in the current `Datagrid` based on the ids passed to it.
323-
- [`useUnselectAll`](./useUnselectAll.md): Return a function to unselect all lines in the current `Datagrid`.
322+
- [`useUnselect`](./useUnselect.md): Return a function to unselect lines in the current `<DataTable>` based on the ids passed to it.
323+
- [`useUnselectAll`](./useUnselectAll.md): Return a function to unselect all lines in the current `<DataTable>`.
324324

325325
### `onSuccess`
326326

docs/AppTheme.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -273,19 +273,19 @@ const ThemeToggler = () => {
273273

274274
In a custom theme, you can override the style of a component for the entire application using the `components` key.
275275

276-
For instance, to create a custom theme that overrides the style of the `<Datagrid>` component:
276+
For instance, to create a custom theme that overrides the style of the `<DataTable>` component:
277277

278278
```jsx
279279
import { defaultTheme } from 'react-admin';
280280
import { deepmerge } from '@mui/utils';
281281

282282
const theme = deepmerge(defaultTheme, {
283283
components: {
284-
RaDatagrid: {
284+
RaDataTable: {
285285
styleOverrides: {
286286
root: {
287287
backgroundColor: "Lavender",
288-
"& .RaDatagrid-headerCell": {
288+
"& .RaDataTable-headerCell": {
289289
backgroundColor: "MistyRose",
290290
},
291291
}
@@ -306,7 +306,7 @@ There are 2 important gotchas here:
306306
- Don't forget to merge your custom style overrides with the ones from react-admin's `defaultTheme`, otherwise the application will have the default Material UI theme (most notably, outlined text inputs)
307307
- Custom style overrides must live under a `root` key. Then, the style override syntax is the same as the one used for the [`sx`](./SX.md) prop.
308308

309-
To guess the name of the subclass to use (like `.RaDatagrid-headerCell` above) for customizing a component, you can use the developer tools of your browser, or check the react-admin documentation for individual components (e.g. the [Datagrid CSS documentation](./Datagrid.md#sx-css-api)).
309+
To guess the name of the subclass to use (like `.RaDataTable-headerCell` above) for customizing a component, you can use the developer tools of your browser, or check the react-admin documentation for individual components (e.g. the [`<DataTable>` CSS documentation](./DataTable.md#sx-css-api)).
310310

311311
**Tip**: As an alternative, you can also re-export styled components, and use them instead of the react-admin components. Check the [Reusable Components](./SX.md#reusable-components) documentation for an example.
312312

@@ -499,11 +499,11 @@ import { defaultTheme } from 'react-admin';
499499

500500
const theme = deepmerge(defaultTheme, {
501501
components: {
502-
RaDatagrid: {
502+
RaDataTable: {
503503
styleOverrides: {
504504
root: {
505505
backgroundColor: "Lavender",
506-
"& .RaDatagrid-headerCell": {
506+
"& .RaDataTable-headerCell": {
507507
backgroundColor: "MistyRose",
508508
},
509509
}

docs/ArrayField.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: "The ArrayField Component"
99

1010
![ArrayField](./img/array-field.webp)
1111

12-
`<ArrayField>` creates a [`ListContext`](./useListContext.md) with the field value, and renders its children components - usually iterator components like [`<Datagrid>`](./Datagrid.md) or [`<SingleFieldList>`](./SingleFieldList.md).
12+
`<ArrayField>` creates a [`ListContext`](./useListContext.md) with the field value, and renders its children components - usually iterator components like [`<DataTable>`](./DataTable.md) or [`<SingleFieldList>`](./SingleFieldList.md).
1313

1414
## Usage
1515

@@ -35,13 +35,13 @@ title: "The ArrayField Component"
3535
}
3636
```
3737

38-
Leverage `<ArrayField>` e.g. in a Show view, to display the `tags` as a `<SingleFieldList>` and the `backlinks` as a `<Datagrid>`:
38+
Leverage `<ArrayField>` e.g. in a Show view, to display the `tags` as a `<SingleFieldList>` and the `backlinks` as a `<DataTable>`:
3939

4040
```jsx
4141
import {
4242
ArrayField,
4343
ChipField,
44-
Datagrid,
44+
DataTable,
4545
Show,
4646
SimpleShowLayout,
4747
SingleFieldList,
@@ -58,11 +58,11 @@ const PostShow = () => (
5858
</SingleFieldList>
5959
</ArrayField>
6060
<ArrayField source="backlinks">
61-
<Datagrid bulkActionButtons={false}>
62-
<TextField source="uuid" />
63-
<TextField source="date" />
64-
<TextField source="url" />
65-
</Datagrid>
61+
<DataTable bulkActionButtons={false}>
62+
<DataTable.Col source="uuid" />
63+
<DataTable.Col source="date" />
64+
<DataTable.Col source="url" />
65+
</DataTable>
6666
</ArrayField>
6767
</SimpleShowLayout>
6868
</Show>
@@ -84,7 +84,7 @@ const PostShow = () => (
8484

8585
## `children`
8686

87-
`<ArrayField>` renders its `children` component wrapped in a [`<ListContextProvider>`](./useListContext.md). Commonly used child components are [`<Datagrid>`](./Datagrid.md), [`<SingleFieldList>`](./SingleFieldList.md), and [`<SimpleList>`](./SimpleList.md).
87+
`<ArrayField>` renders its `children` component wrapped in a [`<ListContextProvider>`](./useListContext.md). Commonly used child components are [`<DataTable>`](./DataTable.md), [`<SingleFieldList>`](./SingleFieldList.md), and [`<SimpleList>`](./SimpleList.md).
8888

8989
```jsx
9090
{/* using SingleFieldList as child */}
@@ -94,13 +94,13 @@ const PostShow = () => (
9494
</SingleFieldList>
9595
</ArrayField>
9696

97-
{/* using Datagrid as child */}
97+
{/* using DataTable as child */}
9898
<ArrayField source="backlinks">
99-
<Datagrid>
100-
<TextField source="uuid" />
101-
<TextField source="date" />
102-
<TextField source="url" />
103-
</Datagrid>
99+
<DataTable>
100+
<DataTable.Col source="uuid" />
101+
<DataTable.Col source="date" />
102+
<DataTable.Col source="url" />
103+
</DataTable>
104104
</ArrayField>
105105

106106
{/* using SimpleList as child */}
@@ -159,11 +159,11 @@ You can use the `filter` prop to display only a subset of the items in the array
159159
{% raw %}
160160
```jsx
161161
<ArrayField source="backlinks" filter={{ date: '2012-08-10T00:00:00.000Z' }}>
162-
<Datagrid>
163-
<TextField source="uuid" />
164-
<TextField source="date" />
165-
<TextField source="url" />
166-
</Datagrid>
162+
<DataTable>
163+
<DataTable.Col source="uuid" />
164+
<DataTable.Col source="date" />
165+
<DataTable.Col source="url" />
166+
</DataTable>
167167
</ArrayField>
168168
```
169169
{% endraw %}
@@ -179,7 +179,7 @@ As `<ArrayField>` creates a [`ListContext`](./useListContext.md), you can use th
179179
```jsx
180180
import {
181181
ArrayField,
182-
Datagrid,
182+
DataTable,
183183
Pagination,
184184
Show,
185185
SimpleShowLayout,
@@ -191,11 +191,11 @@ const PostShow = () => (
191191
<SimpleShowLayout>
192192
<TextField source="title" />
193193
<ArrayField source="backlinks" perPage={5}>
194-
<Datagrid>
195-
<TextField source="uuid" />
196-
<TextField source="date" />
197-
<TextField source="url" />
198-
</Datagrid>
194+
<DataTable>
195+
<DataTable.Col source="uuid" />
196+
<DataTable.Col source="date" />
197+
<DataTable.Col source="url" />
198+
</DataTable>
199199
<Pagination />
200200
</ArrayField>
201201
</SimpleShowLayout>

docs/AuthProviderList.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ title: "Supported Auth Provider Backends"
88
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:
99

1010
<div class="providers-list" markdown="1">
11+
- ![Appwrite Logo](./img/backend-logos/appwrite.svg "Appwrite Logo")**[Appwrite](https://appwrite.io/)**: [marmelab/ra-appwrite](https://github.com/marmelab/ra-appwrite)
1112
- ![auth0 Logo](./img/backend-logos/auth0.svg "auth0 Logo")**[Auth0 by Okta](https://auth0.com/)**: [marmelab/ra-auth-auth0](https://github.com/marmelab/ra-auth-auth0/blob/main/packages/ra-auth-auth0/Readme.md)
1213
- ![amplify Logo](./img/backend-logos/amplify.svg "amplify Logo")**[AWS Amplify](https://docs.amplify.aws)**: [MrHertal/react-admin-amplify](https://github.com/MrHertal/react-admin-amplify)
1314
- ![cognito Logo](./img/backend-logos/aws.png "cognito Logo")**[AWS Cognito](https://docs.aws.amazon.com/cognito/latest/developerguide/setting-up-the-javascript-sdk.html)**: [marmelab/ra-auth-cognito](https://github.com/marmelab/ra-auth-cognito/blob/main/packages/ra-auth-cognito/Readme.md)

0 commit comments

Comments
 (0)