-
Notifications
You must be signed in to change notification settings - Fork 22
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
#3059: Upgrade to RJSF5 #4913
#3059: Upgrade to RJSF5 #4913
Conversation
package.json
Outdated
"@rjsf/bootstrap-4": "^5.0.0-beta.15", | ||
"@rjsf/core": "^5.0.0-beta.15", | ||
"@rjsf/utils": "^5.0.0-beta.15", | ||
"@rjsf/validator-ajv6": "^5.0.0-beta.15", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm only updating rjsf here, not the validator. Let's ensure it works first and then move to CloudFlare’s validator, not ajv 8
import React from "react"; | ||
import FormPreviewFieldTemplate, { | ||
type FormPreviewFieldProps, | ||
} from "./FormPreviewFieldTemplate"; | ||
import styles from "./FormPreviewBooleanField.module.scss"; | ||
|
||
const RjsfBooleanField = RjsfTheme.fields.BooleanField; | ||
const RjsfBooleanField = getDefaultRegistry().fields.BooleanField; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Double check that this produces the output we expect
According to the upgrade guide, they reduced duplicated code so it's possible that these fields are shared now. Maybe the theme needs to be applied separately though
Codecov ReportAttention:
Additional details and impacted files@@ Coverage Diff @@
## main #4913 +/- ##
=======================================
Coverage 70.96% 70.96%
=======================================
Files 1204 1206 +2
Lines 37237 37260 +23
Branches 6972 6983 +11
=======================================
+ Hits 26424 26442 +18
- Misses 10813 10818 +5 ☔ View full report in Codecov by Sentry. |
So this seems to work already. Could you review the code changes, the snapshots and double-check that the document builder works as expected? I did some testing and saw zero issues. This might be a good time to re-confirm that we're going to stay on RJSF and not migrating to greener pastures (if any exist.) For example you could look at the buglist to see if you see any dealbreakers https://github.com/rjsf-team/react-jsonschema-form/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc+label%3Abug |
We're staying on RJSF. I don't know of any greener pastures Looks like they'll be releasing final 5.0 version this month (hopefully): rjsf-team/react-jsonschema-form#3144 |
Potential bugs/regressions:
Confirmed working
|
@fregante see here: #4913 (comment) I bumped to the latest beta. The story shot changes look fine to me. They just changed the id format for fields |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See regressions
Looks good other than the failing test. I'll add it to my list to debug. |
… into F/deps/upgrade-to-rjsf-5
No loom links were found in the first post. Please add one there if you'd like to it to appear on Slack. Do not edit this comment manually. |
What does this PR do?
Reviewer Tips
Remaining Work
Dropdown with labels field
test. Likely due toenumOptions
change in behavior: https://rjsf-team.github.io/react-jsonschema-form/docs/migration-guides/v5.x%20upgrade%20guide#enumoptions-widgets-breaking-changesFuture Work
Checklist