diff --git a/docs/source/upgrade-guide/index.md b/docs/source/upgrade-guide/index.md index 5b4b0c6313..4d6001ebae 100644 --- a/docs/source/upgrade-guide/index.md +++ b/docs/source/upgrade-guide/index.md @@ -218,6 +218,12 @@ The `.stories.mdx` extension is no longer supported. Although it is technically possible to keep the old version running, the script `volto-update-deps` will try to update to Storybook 8 every time you run it. ``` +### Form component passes down `id` of the current fieldset + +There was a bug where a fieldset's generated value would be not valid. +This has been fixed by passing down the `id` instead of the `title` to the fieldset's value. +If your tests rely on the old fieldset's generated value for selecting fields, your tests could break, in which case you should amend them to use the updated fieldset's value instead. + (volto-upgrade-guide-17.x.x)= ## Upgrading to Volto 17.x.x diff --git a/packages/types/news/5921.bugfix b/packages/types/news/5921.bugfix new file mode 100644 index 0000000000..f9a12123c8 --- /dev/null +++ b/packages/types/news/5921.bugfix @@ -0,0 +1 @@ +Fix experimental settings and new button type @sneridagh diff --git a/packages/types/src/config/index.d.ts b/packages/types/src/config/index.d.ts index 651ef24cf3..670b9636f9 100644 --- a/packages/types/src/config/index.d.ts +++ b/packages/types/src/config/index.d.ts @@ -17,8 +17,13 @@ export type ComponentsConfig = Record< { component: React.ComponentType } >; -export type ExperimentalConfig = Record; +export interface ExperimentalConfig { + addBlockButton: { + enabled: boolean; + }; +} +// This is a type because it's not supposed to be extendable export type ConfigData = { settings: SettingsConfig; blocks: BlocksConfig; diff --git a/packages/volto/news/5921.bugfix b/packages/volto/news/5921.bugfix new file mode 100644 index 0000000000..b19d2552ed --- /dev/null +++ b/packages/volto/news/5921.bugfix @@ -0,0 +1 @@ +Use `id` instead of `title` for the fieldset's generated value when rendering a `Field` component in a form. @sneridagh diff --git a/packages/volto/src/components/manage/Form/Form.jsx b/packages/volto/src/components/manage/Form/Form.jsx index cdf7209408..08249c4fae 100644 --- a/packages/volto/src/components/manage/Form/Form.jsx +++ b/packages/volto/src/components/manage/Form/Form.jsx @@ -843,7 +843,7 @@ class Form extends Component { {...schema.properties[field]} id={field} formData={formData} - fieldSet={item.title.toLowerCase()} + fieldSet={item.id} focus={this.state.inFocus[field]} value={formData?.[field]} required={schema.required.indexOf(field) !== -1}