Skip to content

Commit 5dabdd5

Browse files
committed
Merge branch 'master' into next
2 parents ccd3258 + ba799d9 commit 5dabdd5

File tree

329 files changed

+5872
-4859
lines changed

Some content is hidden

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

329 files changed

+5872
-4859
lines changed

.storybook/main.js

Lines changed: 36 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,18 @@
11
const fs = require('fs');
22
const path = require('path');
3-
43
const packages = fs.readdirSync(path.resolve(__dirname, '../packages'));
54
module.exports = {
6-
core: {
7-
builder: 'webpack5',
8-
},
95
stories: [`../packages/${process.env.ONLY || '**'}/**/*.stories.@(tsx)`],
106
addons: [
11-
'@storybook/addon-storysource',
7+
{
8+
name: '@storybook/addon-storysource',
9+
options: {
10+
loaderOptions: {
11+
injectStoryParameters: false,
12+
parser: 'typescript',
13+
},
14+
},
15+
},
1216
'@storybook/addon-actions',
1317
'@storybook/addon-controls',
1418
],
@@ -21,18 +25,34 @@ module.exports = {
2125
const { plugins = [] } = options;
2226
return {
2327
...options,
28+
presets: [
29+
'@babel/preset-env',
30+
'@babel/preset-react',
31+
'@babel/preset-typescript',
32+
],
2433
plugins: [
2534
...plugins,
2635
[
2736
'@babel/plugin-proposal-private-property-in-object',
28-
{ loose: true },
37+
{
38+
loose: true,
39+
},
40+
],
41+
[
42+
'@babel/plugin-proposal-private-methods',
43+
{
44+
loose: true,
45+
},
46+
],
47+
[
48+
'@babel/plugin-proposal-class-properties',
49+
{
50+
loose: true,
51+
},
2952
],
3053
],
3154
};
3255
},
33-
reactOptions: {
34-
fastRefresh: true,
35-
},
3656
webpackFinal: async (config, { configType }) => {
3757
return {
3858
...config,
@@ -51,4 +71,11 @@ module.exports = {
5171
},
5272
};
5373
},
74+
framework: {
75+
name: '@storybook/react-webpack5',
76+
options: {},
77+
},
78+
docs: {
79+
autodocs: false,
80+
},
5481
};

CHANGELOG.md

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

3+
## v4.10.6
4+
5+
* Fix ra-language-french package.json to avoid including tsconfig ([#8939](https://github.com/marmelab/react-admin/pull/8939)) ([djhi](https://github.com/djhi))
6+
* Fix create-react-admin adds unnecessary files ([#8935](https://github.com/marmelab/react-admin/pull/8935)) ([djhi](https://github.com/djhi))
7+
* [TypeScript] Fix `<Create>` generic record type should not require an `id` field ([#8923](https://github.com/marmelab/react-admin/pull/8923)) ([djhi](https://github.com/djhi))
8+
* [Doc] Fix tutorial with create-react-admin ([#8934](https://github.com/marmelab/react-admin/pull/8934)) ([fzaninotto](https://github.com/fzaninotto))
9+
* [chore] Update Storybook to v7 & Cypress to use Vite ([#8936](https://github.com/marmelab/react-admin/pull/8936)) ([djhi](https://github.com/djhi))
10+
11+
## v4.10.5
12+
13+
* Fix create and edit controller's save callback should use calltime meta param ([#8933](https://github.com/marmelab/react-admin/pull/8933)) ([slax57](https://github.com/slax57))
14+
* Fix create-react-admin does not include its templates ([#8932](https://github.com/marmelab/react-admin/pull/8932)) ([djhi](https://github.com/djhi))
15+
16+
## v4.10.4
17+
18+
* Fix `<DatagridConfigurable>` inspector hides the wrong column when using empty children ([#8929](https://github.com/marmelab/react-admin/pull/8929)) ([fzaninotto](https://github.com/fzaninotto))
19+
* Fix `<DatagridConfigurable>` fails to render when using a Field with a label element ([#8928](https://github.com/marmelab/react-admin/pull/8928)) ([fzaninotto](https://github.com/fzaninotto))
20+
* Fix `<TextField>` and `<RichTextField>` don't translate the `emptyText` ([#8924](https://github.com/marmelab/react-admin/pull/8924)) ([fzaninotto](https://github.com/fzaninotto))
21+
* Fix `<SaveButton>` spinner while submitting ([#8920](https://github.com/marmelab/react-admin/pull/8920)) ([fzaninotto](https://github.com/fzaninotto))
22+
* [Doc] Fix video playback on iOS ([#8922](https://github.com/marmelab/react-admin/pull/8922)) ([slax57](https://github.com/slax57))
23+
* [Doc] Fix `<List disableSyncWithLocation>` doc about persisting list params in the store ([#8919](https://github.com/marmelab/react-admin/pull/8919)) ([fzaninotto](https://github.com/fzaninotto))
24+
* [Doc] Document type parameter in generic hooks ([#8916](https://github.com/marmelab/react-admin/pull/8916)) ([djhi](https://github.com/djhi))
25+
26+
## v4.10.3
27+
28+
* Fix `<ReferenceField>` link function is called with referencing record instead of referenced record ([#8899](https://github.com/marmelab/react-admin/pull/8899)) ([djhi](https://github.com/djhi))
29+
* Fix `ReferenceFieldView` backwards compatibility ([#8912](https://github.com/marmelab/react-admin/pull/8912)) ([djhi](https://github.com/djhi))
30+
* Fix `create-react-admin` requires node 16 ([#8902](https://github.com/marmelab/react-admin/pull/8902)) ([fzaninotto](https://github.com/fzaninotto))
31+
* [Typescript] Fix Layout's `sidebar` prop type ([#8887](https://github.com/marmelab/react-admin/pull/8887)) ([smeng9](https://github.com/smeng9))
32+
* [Doc] Add Advanced Tutorial about Custom Tags Selector ([#8906](https://github.com/marmelab/react-admin/pull/8906)) ([slax57](https://github.com/slax57))
33+
* [Doc] Update Datagrid's `isRowSelectable` description and examples ([#8901](https://github.com/marmelab/react-admin/pull/8901)) ([WiXSL](https://github.com/WiXSL))
34+
* [Doc] fix import statements in example code ([#8896](https://github.com/marmelab/react-admin/pull/8896)) ([charlie-ac](https://github.com/charlie-ac))
35+
* [Doc] add casdoor auth provider ([#8894](https://github.com/marmelab/react-admin/pull/8894)) ([akriventsev](https://github.com/akriventsev))
36+
* [Doc] Add Supabase realtime adapter ([#8893](https://github.com/marmelab/react-admin/pull/8893)) ([fzaninotto](https://github.com/fzaninotto))
37+
* [Doc] Update tutorial to use `create-react-admin` ([#8881](https://github.com/marmelab/react-admin/pull/8881)) ([djhi](https://github.com/djhi))
38+
339
## v4.10.2
440

541
* Fix custom redirect in pessimistic `<Edit>` or `<Create>` when using `warnWhenUnsavedChanges` ([#8882](https://github.com/marmelab/react-admin/pull/8882)) ([slax57](https://github.com/slax57))

cypress/cypress.config.js

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
1-
const { defineConfig } = require('cypress');
1+
import { defineConfig } from 'cypress';
2+
import vitePreprocessor from 'cypress-vite';
23

3-
module.exports = defineConfig({
4+
export default defineConfig({
45
fixturesFolder: 'fixtures',
56
screenshotsFolder: 'screenshots',
67
videosFolder: 'videos',
@@ -11,7 +12,19 @@ module.exports = defineConfig({
1112
// We've imported your old cypress plugins here.
1213
// You may want to clean this up later by importing these.
1314
setupNodeEvents(on, config) {
14-
return require('./plugins/index.js')(on, config);
15+
on('before:browser:launch', (browser = {}, launchOptions) => {
16+
// Fix for Cypress 4:
17+
// https://docs.cypress.io/api/plugins/browser-launch-api.html#Usage
18+
if (browser.name === 'chrome') {
19+
launchOptions.args.push(
20+
'--disable-blink-features=RootLayerScrolling'
21+
);
22+
launchOptions.args.push('--disable-gpu');
23+
launchOptions.args.push('--proxy-bypass-list=<-loopback>');
24+
return launchOptions;
25+
}
26+
});
27+
on('file:preprocessor', vitePreprocessor());
1528
},
1629
baseUrl: 'http://localhost:8080',
1730
specPattern: 'e2e/**/*.cy.{js,jsx,ts,tsx}',

cypress/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
11
{
22
"private": true,
33
"name": "e2e",
4-
"version": "4.10.0",
4+
"version": "4.10.6",
55
"scripts": {
66
"start": "cypress open",
77
"test": "yarn node ./start.js"
88
},
99
"devDependencies": {
10-
"@cypress/webpack-preprocessor": "^5.10.0",
1110
"cypress": "^10.9.0",
1211
"cypress-plugin-tab": "^1.0.5",
12+
"cypress-vite": "^1.4.0",
1313
"express": "~4.17.3"
1414
}
1515
}

cypress/plugins/index.js

Lines changed: 0 additions & 20 deletions
This file was deleted.

cypress/support/index.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
require('cypress-plugin-tab');
1+
import 'cypress-plugin-tab';

docs/AdvancedTutorials.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,3 +74,16 @@ This article shows how to customize react-admin look and feel using only the Mat
7474

7575
* [Article](https://marmelab.com/blog/2020/09/11/react-admin-tutorials-build-your-own-theme.html)
7676
* [Code Repository](https://github.com/Luwangel/react-admin-tutorials-build-your-own-theme)
77+
78+
## Build A Custom Tags Selector
79+
80+
This tutorial explains how to create a custom component to select tags for a record, fetching the list of existing tags and allowing to create new tags on the fly.
81+
82+
<video controls autoplay playsinline muted loop width="100%">
83+
<source src="https://marmelab.com/b612ecd6bf066e85bad0a036614f55b0/tags-list-edit.webm" type="video/webm" />
84+
Your browser does not support the video tag.
85+
</video>
86+
87+
* [Article](https://marmelab.com/blog/2023/04/26/build-a-custom-tags-selector-with-react-admin.html)
88+
* Test it live in the [CRM Demo](https://marmelab.com/react-admin-crm/#/contacts/1/show)
89+
* CRM Demo [Repository](https://github.com/marmelab/react-admin/blob/master/examples/crm/src/contacts/TagsListEdit.tsx)

docs/AppBar.md

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ title: "The AppBar Component"
77

88
The default react-admin layout renders a horizontal app bar at the top, which is rendered by the `<AppBar>` component.
99

10-
<video controls autoplay muted loop width="100%">
10+
<video controls autoplay playsinline muted loop width="100%">
1111
<source src="./img/AppBar.webm" type="video/webm" />
12+
<source src="./img/AppBar.mp4" type="video/mp4" />
1213
Your browser does not support the video tag.
1314
</video>
1415

@@ -222,8 +223,9 @@ export const MyAppBar = () => (
222223

223224
If your app uses [authentication](./Authentication.md), the `<AppBar>` component displays a button to display the user menu on the right side. By default, the user menu only contains a logout button.
224225

225-
<video controls autoplay muted loop width="100%">
226+
<video controls autoplay playsinline muted loop width="100%">
226227
<source src="./img/AppBar-user-menu.webm" type="video/webm"/>
228+
<source src="./img/AppBar-user-menu.mp4" type="video/mp4"/>
227229
Your browser does not support the video tag.
228230
</video>
229231

@@ -435,8 +437,9 @@ export const MyLayout = (props) => (
435437

436438
By default, users can override the page title [in configurable mode](./Features.md#configurable-ui).
437439

438-
<video controls autoplay muted loop width="100%">
440+
<video controls autoplay playsinline muted loop width="100%">
439441
<source src="./img/TitleConfigurable.webm" type="video/webm"/>
442+
<source src="./img/TitleConfigurable.mp4" type="video/mp4"/>
440443
Your browser does not support the video tag.
441444
</video>
442445

docs/Architecture.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,8 +105,9 @@ We spend a great deal of time refining the UI to make it as intuitive as possibl
105105

106106
React-admin produces a user interface that is voluntarily bland by default because we want to emphasize content rather than chrome.
107107

108-
<video controls autoplay muted loop>
108+
<video controls autoplay playsinline muted loop>
109109
<source src="./img/sort-button.webm" type="video/webm"/>
110+
<source src="./img/sort-button.mp4" type="video/mp4"/>
110111
Your browser does not support the video tag.
111112
</video>
112113

docs/ArrayInput.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,9 @@ title: "The ArrayInput Component"
77

88
To edit arrays of data embedded inside a record, `<ArrayInput>` creates a list of sub-forms.
99

10-
<video controls autoplay muted loop>
10+
<video controls autoplay playsinline muted loop>
1111
<source src="./img/array-input.webm" type="video/webm"/>
12+
<source src="./img/array-input.mp4" type="video/mp4"/>
1213
Your browser does not support the video tag.
1314
</video>
1415

0 commit comments

Comments
 (0)