You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Feature - replaced IdSchema with FieldPathId (#4787)
* Feature - replaced IdSchema with FieldPathId
In order to support an upcoming feature as well as eliminate a performance issue, `IdSchema` was replace with `FieldPathId`
- In @rjsf/utils:
- Added new `FieldPathList` and `FieldPathId` types and `DEFAULT_ID_PREFIX` and `DEFAULT_ID_SEPARATOR` to `constants.ts`
- Added the new `toFieldPathId()` function to generate `FieldPathId`s, exporting it from the library
- BREAKING CHANGES
- Removed the `IdSchema` type, replacing `idSchema: IdSchema<T>` in all types with `fieldPathId: FieldPathId`
- Updated the `idGenerators` to replace `id: IdSchema<T> | string` with `id: FieldPathId | string` removing the need for the `<T = any>` generic on the functions
- Removed the `toIdSchema()` function in the `schema` directory
- Updated the `SchemaUtilsType` and `createSchemaUtils()` to remove the `toIdSchema()` function
- Deleted the `ui:rootFieldId` from the `UiSchema` since `idPrefix` does the same exact thing
- Updated the tests accordingly
- In `@rjsf/antd`, `@rjsf/chakra-ui`, `@rjsf/fluent-ui`, `@rjsf/mantine`, `@rjsf/mui`, `@rjsf/primereact`, `@rjsf/react-bootstrap`, `@rjsf/semantic-ui` and `@rjsf/shadcn`:
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
- In @rjsf/core:
- BREAKING CHANGES
- Updated all of the fields, templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
- `ObjectField` and `ArrayField` to use `toFieldPathId` instead of `toIdSchema()` to generate the `fieldPathId`s of all its children
- Updated the `onChange` handling of fields to make `path` required and either pass it straight through, or use the `fieldPathId.path` instead of using an empty array or appending path information
- Updated `Form` to use `toFieldPathId()` to generate `fieldPathId` instead of `idSchema`, always providing the `idPrefix` and `idSeparator` in the `globalFormOptions` and make the `path: FieldPathList` required
- Updated `LayoutGridField` to remove the `IdSchema` related code in favor of `FieldPathId` code
- Also exported the `getTestRegistry()` function from the main `index.ts` to assist developers in creating `registry` object for tests
- Updated all of the test to deal with the `idSchema` -> `fieldPathId` changes
- In @rjsf/daisyui:
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
- Also fixed the `FieldTemplate` to extract the `description` element so that it was not spread onto the `div`, fixing the snapshots
- In @rjsf/validator-ajv8:
- Updated the test to no longer try to test the delete `toIdSchema` function
- In docs:
- Updated `custom-templates.md`, `custom-widgets-fields.md` and `layout-grid.md` to change the `idSchema` documentation to `fieldPathId`
- Updated `uiSchema.md` to remove the `ui:rootFieldId` documentation
- Updated `utility-functions.md` delete `toIdSchema()`, add `toFieldPathId()` and to remove the `<T>` from the id generator functions
- Updated `v6.x upgrade guide.md` to document all the breaking changes made in this release
- Updated the `CHANGELOG.md` accordingly
* - Updated docs to mention `getTestRegistry()`
* - Responded to most of the reviewer feedback
* - Fixed tests
* - Switched `rootFieldId` to be deprecated
* - Fixed documentation
* - Moved `semantic-ui` deprecation warning into its own section
Copy file name to clipboardExpand all lines: CHANGELOG.md
+76Lines changed: 76 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -15,6 +15,82 @@ it according to semantic versioning. For example, if your PR adds a breaking cha
15
15
should change the heading of the (upcoming) version to include a major version bump.
16
16
17
17
-->
18
+
# 6.0.0-beta-20
19
+
20
+
## @rjsf/antd
21
+
22
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
23
+
24
+
## @rjsf/chakra-ui
25
+
26
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
27
+
28
+
## @rjsf/core
29
+
30
+
- BREAKING CHANGES
31
+
- Updated all of the fields, templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
32
+
-`ObjectField` and `ArrayField` to use `toFieldPathId` instead of `toIdSchema()` to generate the `fieldPathId`s of all its children
33
+
- Updated the `onChange` handling of fields to make `path` required and either pass it straight through, or use the `fieldPathId.path` instead of using an empty array or appending path information
34
+
- Updated `Form` to use `toFieldPathId()` to generate `fieldPathId` instead of `idSchema`, always providing the `idPrefix` and `idSeparator` in the `globalFormOptions` and make the `path: FieldPathList` required
35
+
- Updated `LayoutGridField` to remove the `IdSchema` related code in favor of `FieldPathId` code
36
+
- Also exported the `getTestRegistry()` function from the main `index.ts` to assist developers in creating `registry` object for tests
37
+
- Updated all of the test to deal with the `idSchema` -> `fieldPathId` changes
38
+
39
+
## @rjsf/daisyui
40
+
41
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
42
+
- Also fixed the `FieldTemplate` to extract the `description` element so that it was not spread onto the `div`, fixing the snapshots
43
+
44
+
## @rjsf/fluent-ui
45
+
46
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
47
+
48
+
## @rjsf/mantine
49
+
50
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
51
+
52
+
## @rjsf/mui
53
+
54
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
55
+
56
+
## @rjsf/primereact
57
+
58
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
59
+
60
+
## @rjsf/react-bootstrap
61
+
62
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
63
+
64
+
## @rjsf/semantic-ui
65
+
66
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
67
+
68
+
## @rjsf/shadcn
69
+
70
+
- BREAKING CHANGES - Updated all of the templates and widgets to change `idSchema` to `fieldPathId` or to remove the `<T>` off of the idGenerator functions
71
+
72
+
## @rjsf/utils
73
+
74
+
- Added new `FieldPathList` and `FieldPathId` types and `DEFAULT_ID_PREFIX` and `DEFAULT_ID_SEPARATOR` to `constants.ts`
75
+
- Added the new `toFieldPathId()` function to generate `FieldPathId`s, exporting it from the library
76
+
- Deprecated the `ui:rootFieldId` in the `UiSchema` since `idPrefix` does the same exact thing
77
+
- BREAKING CHANGES
78
+
- Removed the `IdSchema` type, replacing `idSchema: IdSchema<T>` in all types with `fieldPathId: FieldPathId`
79
+
- Updated the `idGenerators` to replace `id: IdSchema<T> | string` with `id: FieldPathId | string` removing the need for the `<T = any>` generic on the functions
80
+
- Removed the `toIdSchema()` function in the `schema` directory
81
+
- Updated the `SchemaUtilsType` and `createSchemaUtils()` to remove the `toIdSchema()` function
82
+
83
+
## @rjsf/validator-ajv8
84
+
85
+
- Updated the test to no longer try to test the delete `toIdSchema` function
86
+
87
+
## Dev / docs / playground
88
+
89
+
- Updated `custom-templates.md`, `custom-widgets-fields.md` and `layout-grid.md` to change the `idSchema` documentation to `fieldPathId`
90
+
- Updated `uiSchema.md` to mark the `ui:rootFieldId` as deprecated in the documentation
91
+
- Updated `utility-functions.md` delete `toIdSchema()`, add `toFieldPathId()` and to remove the `<T>` from the id generator functions
92
+
- Updated `v6.x upgrade guide.md` to document all the breaking changes, new functions and deprecations made in `6.0.0-beta.20`
0 commit comments