From 6dec399c4788e2b5ccd0c15a8aab6f4e63776b21 Mon Sep 17 00:00:00 2001 From: Tom Schall Date: Thu, 25 Apr 2024 15:55:51 +0200 Subject: [PATCH 01/18] fix: pass down locale to IntlProvider (#5976) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Víctor Fernández de Alba --- packages/volto/news/5976.bugfix | 1 + packages/volto/src/storybook.jsx | 14 ++++++++++++-- 2 files changed, 13 insertions(+), 2 deletions(-) create mode 100644 packages/volto/news/5976.bugfix diff --git a/packages/volto/news/5976.bugfix b/packages/volto/news/5976.bugfix new file mode 100644 index 0000000000..910fc72f40 --- /dev/null +++ b/packages/volto/news/5976.bugfix @@ -0,0 +1 @@ +Add possibility to pass down `locale`, `messages` and `defaultLocale` properties inside the `customStore` object to `IntlProvider`. With this change we can control react-intl language provider from inside storybook and switch for example from english to german with storybook args. \ No newline at end of file diff --git a/packages/volto/src/storybook.jsx b/packages/volto/src/storybook.jsx index 78d9078f52..c364ac1421 100644 --- a/packages/volto/src/storybook.jsx +++ b/packages/volto/src/storybook.jsx @@ -1387,11 +1387,16 @@ export default class Wrapper extends Component { render() { const mockStore = configureStore(); const store = mockStore(this.customState()); + const state = store.getState(); return ( - +
{this.props.children} @@ -1434,11 +1439,16 @@ export class RealStoreWrapper extends Component { // If thunk is not included there's a complaint about async actions const history = createBrowserHistory(); const store = configureRealStore(this.customState(), history); + const state = store.getState(); return ( - +
{this.props.children} From 45261d7b8fa23ef37fc2b2d135b9c06f03229999 Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Fri, 26 Apr 2024 11:12:18 +0200 Subject: [PATCH 02/18] Release @plone/types 1.0.0-alpha.11 --- packages/types/CHANGELOG.md | 10 ++++++++++ packages/types/news/5979.bugfix | 1 - packages/types/news/5980.internal | 1 - packages/types/package.json | 2 +- 4 files changed, 11 insertions(+), 3 deletions(-) delete mode 100644 packages/types/news/5979.bugfix delete mode 100644 packages/types/news/5980.internal diff --git a/packages/types/CHANGELOG.md b/packages/types/CHANGELOG.md index 87e321ad0a..5327213532 100644 --- a/packages/types/CHANGELOG.md +++ b/packages/types/CHANGELOG.md @@ -8,6 +8,16 @@ +## 1.0.0-alpha.11 (2024-04-26) + +### Bugfix + +- Better BlocksData definitions @sneridagh [#5979](https://github.com/plone/volto/issues/5979) + +### Internal + +- Saner defaults for building deps, switch default to cached, add `build:force` command @sneridagh [#5980](https://github.com/plone/volto/issues/5980) + ## 1.0.0-alpha.10 (2024-04-05) ### Bugfix diff --git a/packages/types/news/5979.bugfix b/packages/types/news/5979.bugfix deleted file mode 100644 index 73467b360f..0000000000 --- a/packages/types/news/5979.bugfix +++ /dev/null @@ -1 +0,0 @@ -Better BlocksData definitions @sneridagh diff --git a/packages/types/news/5980.internal b/packages/types/news/5980.internal deleted file mode 100644 index 879566de35..0000000000 --- a/packages/types/news/5980.internal +++ /dev/null @@ -1 +0,0 @@ -Saner defaults for building deps, switch default to cached, add `build:force` command @sneridagh diff --git a/packages/types/package.json b/packages/types/package.json index 18f2b16400..77803131bb 100644 --- a/packages/types/package.json +++ b/packages/types/package.json @@ -9,7 +9,7 @@ ], "funding": "https://github.com/sponsors/plone", "license": "MIT", - "version": "1.0.0-alpha.10", + "version": "1.0.0-alpha.11", "repository": { "type": "git", "url": "https://github.com/plone/volto.git" From e7d6f1c0be483c6560a552bae615b3f80ec21c1e Mon Sep 17 00:00:00 2001 From: Victor Fernandez de Alba Date: Fri, 26 Apr 2024 11:14:23 +0200 Subject: [PATCH 03/18] Release 18.0.0-alpha.29 --- docs/source/release-notes/index.md | 11 +++++++++++ packages/volto/CHANGELOG.md | 11 +++++++++++ packages/volto/news/5970.feature | 1 - packages/volto/news/5976.bugfix | 1 - packages/volto/news/5981.bugfix | 1 - packages/volto/package.json | 2 +- 6 files changed, 23 insertions(+), 4 deletions(-) delete mode 100644 packages/volto/news/5970.feature delete mode 100644 packages/volto/news/5976.bugfix delete mode 100644 packages/volto/news/5981.bugfix diff --git a/docs/source/release-notes/index.md b/docs/source/release-notes/index.md index e2fbc08927..fefadc3e0a 100644 --- a/docs/source/release-notes/index.md +++ b/docs/source/release-notes/index.md @@ -17,6 +17,17 @@ myst: +## 18.0.0-alpha.29 (2024-04-26) + +### Feature + +- Add Vite (client only, no SSR) build. Update Next.js 14.2.2 and Remix to 2.8.0 @sneridagh [#5970](https://github.com/plone/volto/issues/5970) + +### Bugfix + +- Add possibility to pass down `locale`, `messages` and `defaultLocale` properties inside the `customStore` object to `IntlProvider`. With this change we can control react-intl language provider from inside storybook and switch for example from english to german with storybook args. [#5976](https://github.com/plone/volto/issues/5976) +- Fix no router link in logo @sneridagh [#5981](https://github.com/plone/volto/issues/5981) + ## 18.0.0-alpha.28 (2024-04-23) ### Bugfix diff --git a/packages/volto/CHANGELOG.md b/packages/volto/CHANGELOG.md index e2fbc08927..fefadc3e0a 100644 --- a/packages/volto/CHANGELOG.md +++ b/packages/volto/CHANGELOG.md @@ -17,6 +17,17 @@ myst: +## 18.0.0-alpha.29 (2024-04-26) + +### Feature + +- Add Vite (client only, no SSR) build. Update Next.js 14.2.2 and Remix to 2.8.0 @sneridagh [#5970](https://github.com/plone/volto/issues/5970) + +### Bugfix + +- Add possibility to pass down `locale`, `messages` and `defaultLocale` properties inside the `customStore` object to `IntlProvider`. With this change we can control react-intl language provider from inside storybook and switch for example from english to german with storybook args. [#5976](https://github.com/plone/volto/issues/5976) +- Fix no router link in logo @sneridagh [#5981](https://github.com/plone/volto/issues/5981) + ## 18.0.0-alpha.28 (2024-04-23) ### Bugfix diff --git a/packages/volto/news/5970.feature b/packages/volto/news/5970.feature deleted file mode 100644 index a15120a4b2..0000000000 --- a/packages/volto/news/5970.feature +++ /dev/null @@ -1 +0,0 @@ -Add Vite (client only, no SSR) build. Update Next.js 14.2.2 and Remix to 2.8.0 @sneridagh diff --git a/packages/volto/news/5976.bugfix b/packages/volto/news/5976.bugfix deleted file mode 100644 index 910fc72f40..0000000000 --- a/packages/volto/news/5976.bugfix +++ /dev/null @@ -1 +0,0 @@ -Add possibility to pass down `locale`, `messages` and `defaultLocale` properties inside the `customStore` object to `IntlProvider`. With this change we can control react-intl language provider from inside storybook and switch for example from english to german with storybook args. \ No newline at end of file diff --git a/packages/volto/news/5981.bugfix b/packages/volto/news/5981.bugfix deleted file mode 100644 index be0d226981..0000000000 --- a/packages/volto/news/5981.bugfix +++ /dev/null @@ -1 +0,0 @@ -Fix no router link in logo @sneridagh diff --git a/packages/volto/package.json b/packages/volto/package.json index 481364dad0..8174d67031 100644 --- a/packages/volto/package.json +++ b/packages/volto/package.json @@ -9,7 +9,7 @@ } ], "license": "MIT", - "version": "18.0.0-alpha.28", + "version": "18.0.0-alpha.29", "repository": { "type": "git", "url": "git@github.com:plone/volto.git" From e1e6fa8954ad402aedd1ee6b05999db136f804ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Mon, 29 Apr 2024 13:03:20 +0200 Subject: [PATCH 04/18] Flexibilize the pins for all ESlint deps, in Volto and generators (#5991) --- .../generators/addon/templates/package.json | 16 ++++++++-------- packages/generator-volto/news/5991.internal | 1 + packages/volto/news/5991.internal | 1 + packages/volto/package.json | 10 +++++----- pnpm-lock.yaml | 16 ++++++++-------- 5 files changed, 23 insertions(+), 21 deletions(-) create mode 100644 packages/generator-volto/news/5991.internal create mode 100644 packages/volto/news/5991.internal diff --git a/packages/generator-volto/generators/addon/templates/package.json b/packages/generator-volto/generators/addon/templates/package.json index db047966c9..bdbeb4e730 100644 --- a/packages/generator-volto/generators/addon/templates/package.json +++ b/packages/generator-volto/generators/addon/templates/package.json @@ -24,15 +24,15 @@ "devDependencies": { "@plone/scripts": "^3.5.0", "@babel/eslint-parser": "7.23.10", - "eslint": "8.57.0", - "eslint-config-prettier": "9.1.0", - "eslint-config-react-app": "7.0.1", - "eslint-plugin-flowtype": "8.0.3", - "eslint-plugin-import": "2.29.1", + "eslint": "^8.57.0", + "eslint-config-prettier": "^9.1.0", + "eslint-config-react-app": "^7.0.1", + "eslint-plugin-flowtype": "^8.0.3", + "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.7.1", - "eslint-plugin-prettier": "5.1.3", - "eslint-plugin-react": "7.33.2", - "eslint-plugin-react-hooks": "4.6.0", + "eslint-plugin-prettier": "^5.1.3", + "eslint-plugin-react": "^7.33.2", + "eslint-plugin-react-hooks": "^4.6.0", "postcss-less": "6.0.0", "postcss-scss": "4.0.9", "prettier": "3.2.5", diff --git a/packages/generator-volto/news/5991.internal b/packages/generator-volto/news/5991.internal new file mode 100644 index 0000000000..787b6b1add --- /dev/null +++ b/packages/generator-volto/news/5991.internal @@ -0,0 +1 @@ +Flexibilize the pins for all ESlint deps, in Volto and generators @sneridagh diff --git a/packages/volto/news/5991.internal b/packages/volto/news/5991.internal new file mode 100644 index 0000000000..787b6b1add --- /dev/null +++ b/packages/volto/news/5991.internal @@ -0,0 +1 @@ +Flexibilize the pins for all ESlint deps, in Volto and generators @sneridagh diff --git a/packages/volto/package.json b/packages/volto/package.json index 8174d67031..273e94f2a1 100644 --- a/packages/volto/package.json +++ b/packages/volto/package.json @@ -326,16 +326,16 @@ "cypress-file-upload": "5.0.8", "deep-freeze": "0.0.1", "eslint": "^8.57.0", - "eslint-config-prettier": "9.1.0", - "eslint-config-react-app": "7.0.1", - "eslint-import-resolver-alias": "1.1.2", - "eslint-import-resolver-babel-plugin-root-import": "1.1.1", + "eslint-config-prettier": "^9.1.0", + "eslint-config-react-app": "^7.0.1", + "eslint-import-resolver-alias": "^1.1.2", + "eslint-import-resolver-babel-plugin-root-import": "^1.1.1", "eslint-import-resolver-typescript": "^3.6.1", "eslint-plugin-import": "^2.29.1", "eslint-plugin-jsx-a11y": "^6.7.1", "eslint-plugin-prettier": "^5.1.3", "eslint-plugin-react": "^7.34.1", - "eslint-plugin-react-hooks": "4.6.0", + "eslint-plugin-react-hooks": "^4.6.0", "full-icu": "1.4.0", "html-webpack-plugin": "5.5.0", "identity-obj-proxy": "3.0.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index dd7fa6b9c8..15e4f1fdf5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -2107,16 +2107,16 @@ importers: specifier: ^8.57.0 version: 8.57.0 eslint-config-prettier: - specifier: 9.1.0 + specifier: ^9.1.0 version: 9.1.0(eslint@8.57.0) eslint-config-react-app: - specifier: 7.0.1 + specifier: ^7.0.1 version: 7.0.1(@babel/plugin-syntax-flow@7.24.1)(@babel/plugin-transform-react-jsx@7.23.4)(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.0)(jest@26.6.3)(typescript@5.4.5) eslint-import-resolver-alias: - specifier: 1.1.2 + specifier: ^1.1.2 version: 1.1.2(eslint-plugin-import@2.29.1) eslint-import-resolver-babel-plugin-root-import: - specifier: 1.1.1 + specifier: ^1.1.1 version: 1.1.1(babel-plugin-root-import@6.1.0)(eslint-plugin-import@2.29.1) eslint-import-resolver-typescript: specifier: ^3.6.1 @@ -2134,7 +2134,7 @@ importers: specifier: ^7.34.1 version: 7.34.1(eslint@8.57.0) eslint-plugin-react-hooks: - specifier: 4.6.0 + specifier: ^4.6.0 version: 4.6.0(eslint@8.57.0) full-icu: specifier: 1.4.0 @@ -14495,7 +14495,7 @@ packages: '@babel/plugin-syntax-typescript': 7.24.1(@babel/core@7.24.4) '@vanilla-extract/babel-plugin-debug-ids': 1.0.5 '@vanilla-extract/css': 1.14.2 - esbuild: 0.17.6 + esbuild: 0.19.12 eval: 0.1.8 find-up: 5.0.0 javascript-stringify: 2.1.0 @@ -20659,7 +20659,7 @@ packages: eslint-import-resolver-webpack: optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.49.0)(typescript@5.4.5) + '@typescript-eslint/parser': 5.62.0(eslint@8.49.0)(typescript@5.2.2) debug: 3.2.7(supports-color@8.1.1) eslint: 8.49.0 eslint-import-resolver-node: 0.3.9 @@ -20866,7 +20866,7 @@ packages: '@typescript-eslint/parser': optional: true dependencies: - '@typescript-eslint/parser': 5.62.0(eslint@8.49.0)(typescript@5.4.5) + '@typescript-eslint/parser': 5.62.0(eslint@8.49.0)(typescript@5.2.2) array-includes: 3.1.8 array.prototype.findlastindex: 1.2.5 array.prototype.flat: 1.3.2 From 6e3341ee6e77dd83992732558e5cb07d228e2d36 Mon Sep 17 00:00:00 2001 From: Wesley Barroso Lopes Date: Mon, 29 Apr 2024 12:47:21 -0300 Subject: [PATCH 05/18] Defines the last 4 parameters of the `asyncConnect` function with optional (#5986) Co-authored-by: Victor Fernandez de Alba --- packages/volto/news/5985.bugfix | 1 + packages/volto/src/helpers/AsyncConnect/index.js | 10 ++++++++++ packages/volto/types/helpers/AsyncConnect/index.d.ts | 12 +++++++++++- 3 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 packages/volto/news/5985.bugfix diff --git a/packages/volto/news/5985.bugfix b/packages/volto/news/5985.bugfix new file mode 100644 index 0000000000..575bda04a8 --- /dev/null +++ b/packages/volto/news/5985.bugfix @@ -0,0 +1 @@ +Defines the last 4 parameters of the `asyncConnect` function with optional. @wesleybl diff --git a/packages/volto/src/helpers/AsyncConnect/index.js b/packages/volto/src/helpers/AsyncConnect/index.js index 3a6db0229d..40d8d56a05 100644 --- a/packages/volto/src/helpers/AsyncConnect/index.js +++ b/packages/volto/src/helpers/AsyncConnect/index.js @@ -90,6 +90,16 @@ const applyExtenders = (asyncItems, pathname) => { * with the "object promises" and that's our "object promises" (which it calls * internally "asyncItems"). */ +/** + * Higher-order function that enhances a React component with asynchronous data fetching and Redux integration. + * + * @param {Array} asyncItems - An array of async items to fetch. + * @param {Function} [mapStateToProps] - A function that maps the Redux state to component props. + * @param {Function} [mapDispatchToProps] - A function that maps Redux dispatch to component props. + * @param {Function} [mergeProps] - A function that merges the props from mapStateToProps, mapDispatchToProps, and the component's own props. + * @param {Object} [options] - Additional options for configuring the async connect behavior. + * @returns {Function} - A function that takes a React component and returns an enhanced component with async connect functionality. + */ export function asyncConnect( asyncItems, mapStateToProps, diff --git a/packages/volto/types/helpers/AsyncConnect/index.d.ts b/packages/volto/types/helpers/AsyncConnect/index.d.ts index 31f7343164..49f2c2a924 100644 --- a/packages/volto/types/helpers/AsyncConnect/index.d.ts +++ b/packages/volto/types/helpers/AsyncConnect/index.d.ts @@ -14,6 +14,16 @@ * with the "object promises" and that's our "object promises" (which it calls * internally "asyncItems"). */ -export function asyncConnect(asyncItems: any, mapStateToProps: any, mapDispatchToProps: any, mergeProps: any, options: any): (Component: any) => any; +/** + * Higher-order function that enhances a React component with asynchronous data fetching and Redux integration. + * + * @param {Array} asyncItems - An array of async items to fetch. + * @param {Function} [mapStateToProps] - A function that maps the Redux state to component props. + * @param {Function} [mapDispatchToProps] - A function that maps Redux dispatch to component props. + * @param {Function} [mergeProps] - A function that merges the props from mapStateToProps, mapDispatchToProps, and the component's own props. + * @param {Object} [options] - Additional options for configuring the async connect behavior. + * @returns {Function} - A function that takes a React component and returns an enhanced component with async connect functionality. + */ +export function asyncConnect(asyncItems: any[], mapStateToProps?: Function, mapDispatchToProps?: Function, mergeProps?: Function, options?: any): Function; export const ReduxAsyncConnect: any; export { loadOnServer, loadAsyncConnect } from "./ssr"; From 466a358f4faf98e9c9c64eb2f6d5c96f9b9980e8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?V=C3=ADctor=20Fern=C3=A1ndez=20de=20Alba?= Date: Mon, 29 Apr 2024 19:20:45 +0200 Subject: [PATCH 06/18] Update to Plone 6.0.11 (#5989) Co-authored-by: Steve Piercy --- api/buildout.cfg | 2 +- packages/volto/news/5989.internal | 1 + requirements-docs.txt | 2 +- variables.mk | 4 ++-- 4 files changed, 5 insertions(+), 4 deletions(-) create mode 100644 packages/volto/news/5989.internal diff --git a/api/buildout.cfg b/api/buildout.cfg index 823c5ae050..b2bbf75f69 100644 --- a/api/buildout.cfg +++ b/api/buildout.cfg @@ -1,7 +1,7 @@ [buildout] index = https://pypi.org/simple/ extends = - http://dist.plone.org/release/6.0.10.1/versions.cfg + http://dist.plone.org/release/6.0.11/versions.cfg version-constraints.cfg versions.cfg parts = instance plonesite site-packages test robot-server diff --git a/packages/volto/news/5989.internal b/packages/volto/news/5989.internal new file mode 100644 index 0000000000..315057b037 --- /dev/null +++ b/packages/volto/news/5989.internal @@ -0,0 +1 @@ +Update to use Plone 6.0.11 @sneridagh diff --git a/requirements-docs.txt b/requirements-docs.txt index 8038479ccf..315a5acd83 100644 --- a/requirements-docs.txt +++ b/requirements-docs.txt @@ -2,7 +2,7 @@ docutils<0.17,>=0.15 # sphinx-book-theme 0.2.0 has requirement docutils<0.17,>= Sphinx<5,>=3 # sphinx-book-theme 0.3.3 has requirement sphinx<5,>=3 lesscpy linkify-it-py -myst-parser +myst-parser==1.0.0 # Temporary pin until theme is updated. sphinx-autobuild pydata-sphinx-theme<=0.8.99 sphinx-book-theme==0.3.3 diff --git a/variables.mk b/variables.mk index 283cd86c66..108450c98b 100644 --- a/variables.mk +++ b/variables.mk @@ -1,6 +1,6 @@ INSTANCE_PORT=8080 -DOCKER_IMAGE=plone/server-dev:6.0.10.1 -DOCKER_IMAGE_ACCEPTANCE=plone/server-acceptance:6.0.10.1 +DOCKER_IMAGE=plone/server-dev:6.0.11 +DOCKER_IMAGE_ACCEPTANCE=plone/server-acceptance:6.0.11 KGS= NODEBIN = ./node_modules/.bin SCRIPTSPACKAGE = ./packages/scripts From 01cbe72d7fc711c8521fbaec55f7ca45d843e3d8 Mon Sep 17 00:00:00 2001 From: Alok Kumar Date: Tue, 30 Apr 2024 01:05:08 +0530 Subject: [PATCH 07/18] =?UTF-8?q?Fix=20image=20disappears=20after=20pressi?= =?UTF-8?q?ng=20the=20Enter=20key=20on=20title=20field=20in=20i=E2=80=A6?= =?UTF-8?q?=20(#5975)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- packages/volto/news/5973.bugfix | 1 + packages/volto/src/components/manage/Widgets/FileWidget.jsx | 1 + .../manage/Widgets/__snapshots__/FileWidget.test.jsx.snap | 2 ++ 3 files changed, 4 insertions(+) create mode 100644 packages/volto/news/5973.bugfix diff --git a/packages/volto/news/5973.bugfix b/packages/volto/news/5973.bugfix new file mode 100644 index 0000000000..5326b7aa74 --- /dev/null +++ b/packages/volto/news/5973.bugfix @@ -0,0 +1 @@ +Fix image disappears after pressing the Enter key on title field in image content-type. @iFlameing \ No newline at end of file diff --git a/packages/volto/src/components/manage/Widgets/FileWidget.jsx b/packages/volto/src/components/manage/Widgets/FileWidget.jsx index 112ac04647..e21cde8c60 100644 --- a/packages/volto/src/components/manage/Widgets/FileWidget.jsx +++ b/packages/volto/src/components/manage/Widgets/FileWidget.jsx @@ -178,6 +178,7 @@ const FileWidget = (props) => { )} {value && (