diff --git a/.github/workflows/deploy-doc-headless.yml b/.github/workflows/deploy-doc-headless.yml index fe622822bb2..d8f5718a869 100644 --- a/.github/workflows/deploy-doc-headless.yml +++ b/.github/workflows/deploy-doc-headless.yml @@ -30,7 +30,7 @@ jobs: - name: ⚙️ Setup node uses: actions/setup-node@v4 with: - node-version: 20 + node-version: 22 cache: yarn - name: ⚙️ Setup git diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 997651ec9f4..bb45f1691a9 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,6 +9,9 @@ on: - '*' pull_request: +permissions: + contents: read + jobs: typecheck: runs-on: ubuntu-latest diff --git a/Agents.md b/Agents.md index 03f16cb5103..a3e10a11a78 100644 --- a/Agents.md +++ b/Agents.md @@ -19,6 +19,8 @@ React-admin is a comprehensive frontend framework for building B2B and admin app - No children inspection — violates React patterns (exception: Datagrid) - No features achievable in pure React — keep the API surface small - No comments when code is self-explanatory +- No dead code — trust your preconditions. Don't guard against conditions that prior code already prevents +- DRY — don't duplicate knowledge. Coincidental code similarity is not duplication. Only deduplicate when the same decision or fact is expressed in multiple places. Code that looks alike but could evolve independently should stay separate ## Codebase Organization @@ -83,4 +85,4 @@ Every new feature or API change must be documented. make lint # ESLint checks make typecheck # TypeScript type checking make prettier # Prettier formatting -``` \ No newline at end of file +``` diff --git a/CHANGELOG.md b/CHANGELOG.md index 81e389025b7..807b47c0376 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,36 @@ # Changelog +## 5.14.7 + +* Fix `AutocompleteInput` does not open autocomplete options when `shouldRenderSuggestions` returns false ([#11263](https://github.com/marmelab/react-admin/pull/11263)) ([jonathanarnault](https://github.com/jonathanarnault)) +* [Doc] Fix typos in the `RichTextInput` docs ([#11250](https://github.com/marmelab/react-admin/pull/11250)) ([fengfeng-zi](https://github.com/fengfeng-zi)) +* [TypeScript] Fix `ArrayField` doesn't accept a label prop ([#11264](https://github.com/marmelab/react-admin/pull/11264)) ([fzaninotto](https://github.com/fzaninotto)) +* [Chore] Add tests to cover `List` empty state with permanent filters ([#11235](https://github.com/marmelab/react-admin/pull/11235)) ([terminalchai](https://github.com/terminalchai)) +* Bump devalue from 5.6.4 to 5.8.1 ([#11260](https://github.com/marmelab/react-admin/pull/11260)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump systeminformation from 5.31.1 to 5.31.6 ([#11258](https://github.com/marmelab/react-admin/pull/11258)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump @babel/plugin-transform-modules-systemjs from 7.29.0 to 7.29.4 ([#11256](https://github.com/marmelab/react-admin/pull/11256)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump fast-uri from 3.1.0 to 3.1.2 ([#11255](https://github.com/marmelab/react-admin/pull/11255)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump postcss from 8.5.6 to 8.5.14 ([#11253](https://github.com/marmelab/react-admin/pull/11253)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump axios from 1.15.0 to 1.16.0 ([#11252](https://github.com/marmelab/react-admin/pull/11252)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump ip-address from 10.1.0 to 10.2.0 ([#11251](https://github.com/marmelab/react-admin/pull/11251)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump dompurify from 3.3.2 to 3.4.0 ([#11245](https://github.com/marmelab/react-admin/pull/11245)) ([dependabot[bot]](https://github.com/apps/dependabot)) + +## 5.14.6 + +* Fix possible prototype-polluting assignments in local data providers ([#11227](https://github.com/marmelab/react-admin/pull/11227)) ([WiXSL](https://github.com/WiXSL)) +* Fix duplicate IDs in `` when multiple column pickers are present ([#11238](https://github.com/marmelab/react-admin/pull/11238)) ([Yashrajsingh2001](https://github.com/Yashrajsingh2001)) +* Fix incomplete string escaping in `escapePath` ([#11226](https://github.com/marmelab/react-admin/pull/11226)) ([WiXSL](https://github.com/WiXSL)) +* Fix `` to avoid ReDoS in source detection ([#11224](https://github.com/marmelab/react-admin/pull/11224)) ([WiXSL](https://github.com/WiXSL)) +* Fix `` tag-stripping feature is polynomial and does not strip unfinished tags ([#11225](https://github.com/marmelab/react-admin/pull/11225)) ([WiXSL](https://github.com/WiXSL)) +* Fix `` shows validation error on mount when `mode="onChange"` ([#11195](https://github.com/marmelab/react-admin/pull/11195)) ([WiXSL](https://github.com/WiXSL)) +* Bump follow-redirects from 1.15.11 to 1.16.0 ([#11240](https://github.com/marmelab/react-admin/pull/11240)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump axios from 1.13.6 to 1.15.0 ([#11237](https://github.com/marmelab/react-admin/pull/11237)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump vite from 7.3.1 to 7.3.2 ([#11234](https://github.com/marmelab/react-admin/pull/11234)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump defu from 6.1.4 to 6.1.6 ([#11230](https://github.com/marmelab/react-admin/pull/11230)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump lodash from 4.17.23 to 4.18.1 ([#11229](https://github.com/marmelab/react-admin/pull/11229)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* Bump lodash-es from 4.17.23 to 4.18.1 ([#11228](https://github.com/marmelab/react-admin/pull/11228)) ([dependabot[bot]](https://github.com/apps/dependabot)) +* [chore] Restrict test workflow token permissions ([#11223](https://github.com/marmelab/react-admin/pull/11223)) ([WiXSL](https://github.com/WiXSL)) + ## 5.14.5 * Add ArrayFieldBase component ([#11191](https://github.com/marmelab/react-admin/pull/11191)) ([WiXSL](https://github.com/WiXSL)) diff --git a/docs/RichTextInput.md b/docs/RichTextInput.md index bf623c29e97..86efe61bd85 100644 --- a/docs/RichTextInput.md +++ b/docs/RichTextInput.md @@ -120,9 +120,9 @@ export const MyEditorOptions = { ## `toolbar` -The `` component has a `toolbar` prop that accepts a `ReactNode`. But default, it uses the `` component. +The `` component has a `toolbar` prop that accepts a `ReactNode`. By default, it uses the `` component. -You can leverage the `tollbar` prop to change the buttons size: +You can leverage the `toolbar` prop to change the buttons size: ```jsx import { Edit, SimpleForm, TextInput } from 'react-admin'; diff --git a/docs/SelectArrayInput.md b/docs/SelectArrayInput.md index cc70024e8fb..b724f3f6ccb 100644 --- a/docs/SelectArrayInput.md +++ b/docs/SelectArrayInput.md @@ -67,6 +67,7 @@ The form value for the source must be an array of the selected values, e.g. | `create` | Optional | `Element` | - | A React Element to render when users want to create a new choice | | `createLabel` | Optional | `string` | `ReactNode` | `ra.action. create` | The label for the menu item allowing users to create a new choice. Used when the filter is empty | | `disableValue` | Optional | `string` | 'disabled' | The custom field name used in `choices` to disable some choices | +| `emptyText` | Optional | `string` | `ReactNode` | - | Text to display when no choice is selected | | `InputLabelProps` | Optional | `Object` | - | Props to pass to the underlying `` element | | `onCreate` | Optional | `Function` | - | A function called with the current filter value when users choose to create a new choice. | | `options` | Optional | `Object` | - | Props to pass to the underlying `` element | @@ -111,6 +112,25 @@ You can also use an array of objects with different properties for the label and ]} optionValue="_id" optionText="label" /> ``` +## `emptyText` + +You can customize the text displayed when no choice is selected using the `emptyText` prop: + +```jsx +const channelChoices = [ + {id: "email", name: "Email"}, + {id: "push", name: "Push Notification"}, +]; + + +``` + +The `emptyText` prop also accepts React elements: + +```jsx +All Channels} /> +``` + The choices are translated by default, so you can use translation identifiers as choices: ```jsx diff --git a/docs/_layouts/default.html b/docs/_layouts/default.html index 23a7201cf23..7d97dd332a6 100644 --- a/docs/_layouts/default.html +++ b/docs/_layouts/default.html @@ -3,6 +3,9 @@ React-admin - {{ page.title }} + {% if page.dir contains "doc" %} + + {% endif %} @@ -15,6 +18,9 @@ rel="canonical" href="{{ page.name | replace: '.md', '.html' | relative_url }}" /> + + + - - - + + + +