Skip to content

Commit 2be72f4

Browse files
authored
Merge pull request #10540 from marmelab/merge-master-5.6.1
Merge master 5.6.1 on next
2 parents bb92631 + 734f7ae commit 2be72f4

File tree

79 files changed

+1603
-295
lines changed

Some content is hidden

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

79 files changed

+1603
-295
lines changed

.env.template

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
GITHUB_ACCESS_TOKEN=your_github_access_token

.github/workflows/test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ jobs:
170170
runs-on: ubuntu-latest
171171
name: GreenFrame
172172
needs: [e-commerce]
173-
if: github.event_name == 'push' && github.ref_type == 'tag' && github.ref_name == 'refs/tags/v*' && !contains('beta', github.ref_name) && !contains('alpha', github.ref_name)
173+
if: github.event_name == 'push' && github.ref_type == 'tag' && contains(github.ref, 'refs/tags/v') && !contains('beta', github.ref) && !contains('alpha', github.ref)
174174
steps:
175175
# To use this repository's private action,
176176
# you must check out the repository
@@ -225,7 +225,7 @@ jobs:
225225
update-sandbox-repository:
226226
runs-on: ubuntu-latest
227227
# Only run on new tags that target a release (not latest nor next) and avoid alpha and beta tags
228-
if: github.event_name == 'push' && github.ref_type == 'tag' && github.ref_name == 'refs/tags/v*' && !contains('beta', github.ref_name) && !contains('alpha', github.ref_name)
228+
if: github.event_name == 'push' && github.ref_type == 'tag' && contains(github.ref, 'refs/tags/v') && !contains('beta', github.ref) && !contains('alpha', github.ref)
229229
needs: [typecheck, simple-example-typecheck, unit-test, e2e-test]
230230
steps:
231231
- name: Checkout

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ cypress/screenshots
2323
!.yarn/releases
2424
!.yarn/sdks
2525
!.yarn/versions
26+
.env

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.6.1
4+
5+
* Fix create-react-admin package manager detection ([#10534](https://github.com/marmelab/react-admin/pull/10534)) ([djhi](https://github.com/djhi))
6+
* Fix create-react-admin does not ignore auth-provider when specified and using supabase ([#10533](https://github.com/marmelab/react-admin/pull/10533)) ([djhi](https://github.com/djhi))
7+
* Fix `<NumberInput>` and `<AutocompleteInput>` do not forward the event when calling `onBlur` ([#9730](https://github.com/marmelab/react-admin/pull/9730)) ([yanchesky](https://github.com/yanchesky))
8+
* [Doc] Fix dialogs `title` doc ([#10536](https://github.com/marmelab/react-admin/pull/10536)) ([erwanMarmelab](https://github.com/erwanMarmelab))
9+
* [Doc] Fix `<DatagridAGClient>` access control's doc ([#10535](https://github.com/marmelab/react-admin/pull/10535)) ([erwanMarmelab](https://github.com/erwanMarmelab))
10+
* [Doc] Promote composition with `<ListLiveUpdate>` instead of `<ListLive>` ([#10531](https://github.com/marmelab/react-admin/pull/10531)) ([djhi](https://github.com/djhi))
11+
* [Doc] Fix some videos do not play in Firefox for MacOS users ([#10524](https://github.com/marmelab/react-admin/pull/10524)) ([erwanMarmelab](https://github.com/erwanMarmelab))
12+
13+
## 5.6.0
14+
15+
* Add `<LoginWithEmail>` to facilitate login with email ([#10518](https://github.com/marmelab/react-admin/pull/10518)) ([fzaninotto](https://github.com/fzaninotto))
16+
* Add B&W Theme ([#10523](https://github.com/marmelab/react-admin/pull/10523)) ([fzaninotto](https://github.com/fzaninotto))
17+
* Make `create-react-admin` non interactive by default and support `ra-supabase` ([#10511](https://github.com/marmelab/react-admin/pull/10511)) ([djhi](https://github.com/djhi))
18+
* Support `<ReferenceOneField emptyContent>` ([#10450](https://github.com/marmelab/react-admin/pull/10450)) ([erwanMarmelab](https://github.com/erwanMarmelab))
19+
* Update `<ArrayInput>` to throw an error when using outdated `disabled` prop ([#10529](https://github.com/marmelab/react-admin/pull/10529)) ([fzaninotto](https://github.com/fzaninotto))
20+
* [Doc] Add `HorizontalMenu` doc ([#10528](https://github.com/marmelab/react-admin/pull/10528)) ([erwanMarmelab](https://github.com/erwanMarmelab))
21+
* [Doc] Add `<FormFillerButton>` documentation ([#10527](https://github.com/marmelab/react-admin/pull/10527)) ([djhi](https://github.com/djhi))
22+
* [chore] Fix CI jobs that run on new tag ([#10525](https://github.com/marmelab/react-admin/pull/10525)) ([slax57](https://github.com/slax57))
23+
324
## 5.5.4
425

526
* Fix `<FilerLiveForm>` does not allow to clear filters ([#10522](https://github.com/marmelab/react-admin/pull/10522)) ([djhi](https://github.com/djhi))

Makefile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,3 +176,6 @@ update-sandbox: ## Push the local version of the simple example to the sandbox r
176176

177177
check-documentation-videos-format: ## Check the documentation format
178178
./scripts/check-documentation-videos-format.sh
179+
180+
release: ## Start the release process and publish the packages to npm using lerna
181+
./scripts/release.sh

docs/ArrayInput.md

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ Check [the `<SimpleFormIterator>` documentation](./SimpleFormIterator.md) for de
8484

8585
## Props
8686

87-
`<ArrayInput>` accepts the [common input props](./Inputs.md#common-input-props) (except `format` and `parse`).
87+
`<ArrayInput>` accepts the [common input props](./Inputs.md#common-input-props) (except `disabled`, `readOnly`, `format` and `parse`).
8888

8989
## Global validation
9090

@@ -109,3 +109,27 @@ You need to return an errors object shaped like this:
109109
```
110110

111111
**Tip:** You can find a sample `validate` function that handles arrays in the [Form Validation documentation](./Validation.md#global-validation).
112+
113+
## Disabling The Input
114+
115+
`<ArrayInput>` does not support the `disabled` and `readOnly` props.
116+
117+
If you need to disable the input, set the `<SimpleFormIterator disabled>` prop, and make the child inputs `readOnly`:
118+
119+
```jsx
120+
const OrderEdit = () => (
121+
<Edit>
122+
<SimpleForm>
123+
<TextInput source="customer" />
124+
<DateInput source="date" />
125+
<ArrayInput source="items">
126+
<SimpleFormIterator inline disabled>
127+
<TextInput source="name" readOnly/>
128+
<NumberInput source="price" readOnly />
129+
<NumberInput source="quantity" readOnly />
130+
</SimpleFormIterator>
131+
</ArrayInput>
132+
</SimpleForm>
133+
</Edit>
134+
);
135+
```

docs/ContainerLayout.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,9 @@ const MyLayout = ({ children }) => (
8585

8686
## `menu`
8787

88-
By default, `<ContainerLayout>` renders one menu item per resource in the admin. To reorder the menu, omit resources, or add custom pages, pass a custom menu element to the `menu` prop. This element should be [a `<HorizontalMenu>` component](#horizontalmenu) with `<HorizontalMenu.Item>` children. Each child should have a `value` corresponding to the [application location](https://react-admin-ee.marmelab.com/documentation/ra-navigation#concepts) of the target, and can have a `to` prop corresponding to the target location if different from the app location.
88+
By default, `<ContainerLayout>` renders one menu item per resource in the admin. To reorder the menu, omit resources, or add custom pages, pass a custom menu element to the `menu` prop.
89+
This element should be [a `<HorizontalMenu>` component](#horizontalmenu) with `<HorizontalMenu.DashboardItem>` or `<HorizontalMenu.Item>` children.
90+
Each child should have a `value` corresponding to the [application location](https://react-admin-ee.marmelab.com/documentation/ra-navigation#concepts) of the target, and can have a `to` prop corresponding to the target location if different from the app location.
8991

9092
```jsx
9193
import {
@@ -104,10 +106,14 @@ import {
104106

105107
const Menu = () => (
106108
<HorizontalMenu>
107-
<HorizontalMenu.Item label="Dashboard" to="/" value="" />
109+
<HorizontalMenu.DashboardItem label="Dashboard" value="" />
108110
<HorizontalMenu.Item label="Songs" to="/songs" value="songs" />
109111
<HorizontalMenu.Item label="Artists" to="/artists" value="artists" />
110112
<HorizontalMenu.Item label="Custom" to="/custom" value="custom" />
113+
<HorizontalMenu.Item label="Business" value="business">
114+
<HorizontalMenu.Item label="Sales" value="sales" >
115+
<HorizontalMenu.Item label="Customers" value="customers" >
116+
</HorizontalMenu.Item>
111117
</HorizontalMenu>
112118
);
113119

@@ -225,7 +231,6 @@ export const MyLayout = ({ children }) => (
225231
```
226232
{% endraw %}
227233

228-
## `<HorizontalMenu>`
229234

230235
This component renders a horizontal menu, to be used in the AppBar of the [`<ContainerLayout>`](#containerLayout).
231236

docs/CreateDialog.md

Lines changed: 11 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -210,35 +210,31 @@ Unlike the `<Create>` components, with Dialog components the title will be displ
210210
Here is an example:
211211

212212
```tsx
213-
import React from 'react';
214213
import {
215214
List,
215+
ListActions,
216216
Datagrid,
217217
SimpleForm,
218218
TextInput,
219219
DateInput,
220220
required,
221221
} from 'react-admin';
222-
import {
223-
CreateDialog,
224-
} from '@react-admin/ra-form-layout';
222+
import { CreateDialog } from '@react-admin/ra-form-layout';
225223

226224
const CustomerList = () => (
227225
<>
228-
<List hasCreate>
226+
<List actions={<ListActions hasCreate />}>
229227
<Datagrid>
230228
...
231-
<ShowButton />
232229
</Datagrid>
233230
</List>
234-
<ShowDialog title={<CustomerShowTitle />}>
235-
<SimpleShowLayout>
236-
<TextField source="id" />
237-
<TextField source="first_name" />
238-
<TextField source="last_name" />
239-
<DateField source="date_of_birth" label="born" />
240-
</SimpleShowLayout>
241-
</ShowDialog>
231+
<CreateDialog title="Create a new customer">
232+
<SimpleForm>
233+
<TextInput source="first_name" validate={required()} />
234+
<TextInput source="last_name" validate={required()} />
235+
<DateInput source="date_of_birth" />
236+
</SimpleForm>
237+
</CreateDialog>
242238
</>
243239
);
244240
```
@@ -464,9 +460,7 @@ const EmployerEdit = () => (
464460

465461
## Warn When There Are Unsaved Changes
466462

467-
If you'd like to trigger a warning when the user tries to close the dialog with unsaved changes, there are two cases to consider.
468-
469-
In that case, you can leverage the [warnWhenUnsavedChanges](./Form.md#warnwhenunsavedchanges) feature provided by React Admin forms.
463+
If you'd like to trigger a warning when the user tries to close the dialog with unsaved changes, you can leverage the [warnWhenUnsavedChanges](./Form.md#warnwhenunsavedchanges) feature provided by React Admin forms.
470464

471465
Add the `warnWhenUnsavedChanges` prop to your Form like so:
472466

docs/CreateInDialogButton.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -293,9 +293,7 @@ You can also hide the title by passing `null`:
293293

294294
## Warn When There Are Unsaved Changes
295295

296-
If you'd like to trigger a warning when the user tries to close the dialog with unsaved changes, there are two cases to consider.
297-
298-
In that case, using the `warnWhenUnsavedChanges` prop directly on the form won't work, because this feature relies on the router's location, but both components do not use routing.
296+
If you'd like to trigger a warning when the user tries to close the dialog with unsaved changes, using the `warnWhenUnsavedChanges` prop directly on the form won't work, because this feature relies on the router's location, but both components do not use routing.
299297

300298
Instead, you can use the `<WarnWhenUnsavedChangesInDialog>` component provided by `ra-form-layout`.
301299

docs/DataFetchingGuide.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -414,7 +414,7 @@ Once your data provider has enabled realtime features, you can use these hooks a
414414
- [`useLockOnCall`](./useLockOnCall.md)
415415
- [`useGetListLive`](./useGetListLive.md)
416416
- [`useGetOneLive`](./useGetOneLive.md)
417-
- [`<ListLive>`](./ListLive.md)
417+
- [`<ListLiveUpdate>`](./ListLiveUpdate.md)
418418
- [`<EditLive>`](./EditLive.md)
419419
- [`<ShowLive>`](./ShowLive.md)
420420
- [`<MenuLive>`](./MenuLive.md)

0 commit comments

Comments
 (0)