diff --git a/CHANGELOG.md b/CHANGELOG.md index 2107c87b68..daa2e61795 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,48 +17,52 @@ should change the heading of the (upcoming) version to include a major version b --> # 6.0.2 -## @rjsf/shadcn +## @rjsf/antd - Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) +- Updated `ArrayFieldTemplate` and `ObjectFieldTemplate` to remove the rendering of a duplicate description (since the `FieldTemplate` already does it), fixing [#3624](https://github.com/rjsf-team/react-jsonschema-form/issues/3624) -## @rjsf/semantic-ui +## @rjsf/chakra-ui -- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) +- Updated `CheckboxWidget` to handle label and description rendering consistently, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) -## @rjsf/react-bootstrap +## @rjsf/core -- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) +- Fixed duplicate label and description rendering in `CheckboxWidget` by conditionally rendering them based on widget type + - Updated `CheckboxWidget` to handle label and description rendering consistently + - Modified `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) -## @rjsf/primereact +## @rjsf/fluentui-rc - Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) +## @rjsf/mantine + +- Updated `CheckboxWidget` to handle label and description rendering consistently, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) + ## @rjsf/mui - Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) -## @rjsf/mantine +## @rjsf/primereact -- Updated `CheckboxWidget` to handle label and description rendering consistently, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) +- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) -## @rjsf/fluentui-rc +## @rjsf/react-bootstrap - Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) -## @rjsf/antd +## @rjsf/semantic-ui - Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) +## @rjsf/shadcn -## @rjsf/chakra-ui - -- Updated `CheckboxWidget` to handle label and description rendering consistently, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) +- Updated `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) -## @rjsf/core +## Dev / docs / playground -- Fixed duplicate label and description rendering in `CheckboxWidget` by conditionally rendering them based on widget type - - Updated `CheckboxWidget` to handle label and description rendering consistently - - Modified `FieldTemplate` to skip label and description rendering for checkbox widgets, fixing ([#4742](https://github.com/rjsf-team/react-jsonschema-form/issues/4742)) +- Updated the `OptionsDrawer` of the playground to add `idPrefix` and `idSeparator` fields # 6.0.1 diff --git a/packages/antd/src/templates/ArrayFieldTemplate/index.tsx b/packages/antd/src/templates/ArrayFieldTemplate/index.tsx index 1dacaa1a12..ec685d6d99 100644 --- a/packages/antd/src/templates/ArrayFieldTemplate/index.tsx +++ b/packages/antd/src/templates/ArrayFieldTemplate/index.tsx @@ -12,10 +12,6 @@ import classNames from 'classnames'; import { Col, Row, ConfigProvider } from 'antd'; import { useContext } from 'react'; -const DESCRIPTION_COL_STYLE = { - paddingBottom: '8px', -}; - /** The `ArrayFieldTemplate` component is the template used to render all items in an array. * * @param props - The `ArrayFieldTemplateProps` props for the component @@ -41,11 +37,6 @@ export default function ArrayFieldTemplate< uiSchema, } = props; const uiOptions = getUiOptions(uiSchema); - const ArrayFieldDescriptionTemplate = getTemplate<'ArrayFieldDescriptionTemplate', T, S, F>( - 'ArrayFieldDescriptionTemplate', - registry, - uiOptions, - ); const ArrayFieldTitleTemplate = getTemplate<'ArrayFieldTitleTemplate', T, S, F>( 'ArrayFieldTitleTemplate', registry, @@ -84,17 +75,6 @@ export default function ArrayFieldTemplate< /> )} - {(uiOptions.description || schema.description) && ( - - - - )} {!showOptionalDataControlInTitle ? optionalDataControl : undefined} {items} diff --git a/packages/antd/src/templates/ObjectFieldTemplate/index.tsx b/packages/antd/src/templates/ObjectFieldTemplate/index.tsx index 51c82c120e..58a65d20d0 100644 --- a/packages/antd/src/templates/ObjectFieldTemplate/index.tsx +++ b/packages/antd/src/templates/ObjectFieldTemplate/index.tsx @@ -11,7 +11,6 @@ import { StrictRJSFSchema, UiSchema, canExpand, - descriptionId, getTemplate, getUiOptions, titleId, @@ -20,10 +19,6 @@ import { import { Col, Row, ConfigProvider } from 'antd'; import { useContext } from 'react'; -const DESCRIPTION_COL_STYLE = { - paddingBottom: '8px', -}; - /** The `ObjectFieldTemplate` is the template to use to render all the inner properties of an object along with the * title and description if available. If the object is expandable, then an `AddButton` is also rendered after all * the properties. @@ -36,7 +31,6 @@ export default function ObjectFieldTemplate< F extends FormContextType = any, >(props: ObjectFieldTemplateProps) { const { - description, disabled, formData, fieldPathId, @@ -52,11 +46,6 @@ export default function ObjectFieldTemplate< } = props; const uiOptions = getUiOptions(uiSchema); const TitleFieldTemplate = getTemplate<'TitleFieldTemplate', T, S, F>('TitleFieldTemplate', registry, uiOptions); - const DescriptionFieldTemplate = getTemplate<'DescriptionFieldTemplate', T, S, F>( - 'DescriptionFieldTemplate', - registry, - uiOptions, - ); const { formContext } = registry; const showOptionalDataControlInTitle = !readonly && !disabled; // Button templates are not overridden in the uiSchema @@ -132,17 +121,6 @@ export default function ObjectFieldTemplate< /> )} - {description && ( - - - - )} {!showOptionalDataControlInTitle ? {optionalDataControl} : undefined} {properties .filter((e) => !e.hidden) diff --git a/packages/antd/test/__snapshots__/Array.test.tsx.snap b/packages/antd/test/__snapshots__/Array.test.tsx.snap index 7ce1edbdf8..8edded1669 100644 --- a/packages/antd/test/__snapshots__/Array.test.tsx.snap +++ b/packages/antd/test/__snapshots__/Array.test.tsx.snap @@ -7306,22 +7306,6 @@ exports[`with title and description array 1`] = ` } /> -
- - a test description - -
-
- - a test description - -
-
- - a test description - -
-
- - a fancier description - -
-
- - a fancier description - -
-
- - a fancier description - -
-
- - a fancier description - -
-
- - a fancier description - -
-
- - a fancier description - -
-
-
-
-
- - a test description - -
-
- - a fancier description - -
-
- - a fancier description - -
-
- - a fancier description - -
-
- - a fancier description - -
-
- - a fancier description - -
-
- - a test description - -
-
- - a test description - -