Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
53 changes: 53 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,59 @@ it according to semantic versioning. For example, if your PR adds a breaking cha
should change the heading of the (upcoming) version to include a major version bump.

-->
# 6.0.0-beta.2

## @rjsf/antd

- Updated `DescriptionField` to render the `description` using the `RichDescription` field

## @rjsf/chakra-ui

- Updated `DescriptionField` to render the `description` using the `RichDescription` field

## @rjsf/core

- Added new `RichDescription` component, refactored from `SchemaField` to support Rich Text descriptions in Markdown format
- Updated `DescriptionField` to render the `description` using the `RichDescription` field

## @rjsf/daisyui

- Updated `DescriptionField` to render the `description` using the `RichDescription` field
- Updated `FieldTemplate` to move the checkbox implementation into the `CheckboxWidget` adding the `description` for checkboxes
- Updated `package.json` to make the package publishable
- Updated `DaisyUIFrameProvider` to extract the bulk of the code into `DaisyUIFrameComponent` to add a `useEffect()` with a cleanup to remove the tailwind styles

## @rjsf/fluentui-rc

- Updated `DescriptionField` to render the `description` using the `RichDescription` field

## @rjsf/mui

- Updated `DescriptionField` to render the `description` using the `RichDescription` field

## @rjsf/react-bootstrap

- Updated `DescriptionField` to render the `description` using the `RichDescription` field
- Updated `CheckboxField` to remove the `checkbox` class that breaks the UI

## @rjsf/semantic-ui

- Updated `DescriptionField` to render the `description` using the `RichDescription` field

## @rjsf/shadcn

- Updated `DescriptionField` to render the `description` using the `RichDescription` field

## @rjsf/utils

- Updated the `description` field in field props to be a `string | ReactElement` and added `enableMarkdownInDescription` to the `GlobalUISchemaOptions` interface

## Dev / docs / playground

- Updated the `snapshot-tests` to disable `getTestId()` for snapshots and updated the `formTests.tsx` to add tests for rich text descriptions for generic fields and the `CheckboxWidget`
- Updated the `uiSchema.md` to document new `enableMarkdownInDescription` prop
- Updated the `playground` to move `daisyui` theme choice after `chakra-ui` and to stop freezing the samples to avoid an `AJV` validation issue

# 6.0.0-beta.1

## @rjsf/antd
Expand Down
22 changes: 14 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,20 @@

## Supported Themes

- [Ant Design](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/antd)
- [Bootstrap 3](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/core)
- [React-Bootstrap (Bootstrap 5)](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/react-bootstrap)
- [Chakra UI](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/chakra-ui)
- [Daisy UI](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/daisyui)
- [Fluent UI 9](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/fluentui-rc)
- [Material UI 5](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/mui)
- [Semantic UI](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/semantic-ui)
- [Ant Design v5](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/antd)
- [Bootstrap v3](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/core)
- [Chakra UI v3](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/chakra-ui)
- [Daisy UI v5](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/daisyui)
- [Fluent UI v9](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/fluentui-rc)
- [Material UI v5 & v6](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/mui)
- [React-Bootstrap (Bootstrap v5)](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/react-bootstrap)
- [Semantic UI v2](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/semantic-ui)
- [Shad CN](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/shadcn)

## API Libraries

- [@rjsf/utils](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/utils)
- [@rjsf/validator-ajv8](https://github.com/rjsf-team/react-jsonschema-form/tree/main/packages/validator-ajv8)

## Documentation

Expand Down
9 changes: 7 additions & 2 deletions packages/antd/src/templates/DescriptionField/index.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import { DescriptionFieldProps, FormContextType, RJSFSchema, StrictRJSFSchema } from '@rjsf/utils';
import { RichDescription } from '@rjsf/core';

/** The `DescriptionField` is the template to use to render the description of a field
*
Expand All @@ -9,9 +10,13 @@ export default function DescriptionField<
S extends StrictRJSFSchema = RJSFSchema,
F extends FormContextType = any,
>(props: DescriptionFieldProps<T, S, F>) {
const { id, description } = props;
const { id, description, registry, uiSchema } = props;
if (!description) {
return null;
}
return <span id={id}>{description}</span>;
return (
<span id={id}>
<RichDescription description={description} registry={registry} uiSchema={uiSchema} />
</span>
);
}
Loading