-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Chakra UI v2 to v3 migration #4566
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
Chakra UI v2 to v3 migration #4566
Conversation
c9e88c6
to
212cf02
Compare
@antpaw can you rebase this to the |
212cf02
to
2058cf6
Compare
Done, I had to merge the newest |
@antpaw hmmm, I wonder why other themes are failing with your changes. Can you try starting with the |
@antpaw I just merged |
@heath-freenome Thank you for the feedback, I will look into this on Tuesday |
2058cf6
to
65d7b7e
Compare
@heath-freenome Please review my changes based on your feedback, thanks. |
f33912d
to
ee5674a
Compare
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.
Have you updated the test snapshots yet via npm run test:update
?
<ChakraProvider resetCSS={false}> | ||
<CSSReset /> | ||
<ChakraProvider value={defaultSystem}> | ||
{/* <CSSReset /> TODO: figrue out styling issues */} |
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 not sure either. What happens if you uncomment it? Do the styles in the playground look correct without it?
packages/chakra-ui/src/WrapIfAdditionalTemplate/WrapIfAdditionalTemplate.tsx
Show resolved
Hide resolved
@antpaw it looks like the |
@antpaw I am going to be focused on getting RJSF v6 ready for the beta release next week. I'd love to get these changes in by Monday. Feel free to reach out to me on discord. I'll even make some time to pair with you in the RJSF discord channel if you need it. |
23da8ae
to
e0bd2ef
Compare
@heath-freenome Thank you, I've made the CI build the project by resetting the package-lock and only applying the actual changes to it. |
I've added the hack suggested here jsdom/jsdom#3363
and now it seams like the tests are not passing because |
What if you were to create a Test wrapper component that is a wrapper around the chakra
And then updated |
@heath-freenome yes, that works! Now I'm able to use the tests to develop
|
d968a5d
to
e7fbad5
Compare
@heath-freenome tests pass locally now, I don't know why the snapshot does not match on the CI |
@antpaw If you run them multiple times locally do they pass everytime? If not, then maybe some sort of random seed is affecting the generated |
@heath-freenome I've rebased the branch and tested locally a couple of time, and I can not make the test fail locally |
@antpaw I just merged another PR that conflicts with yours (sorry). If you can resolve the conflicts, I am tempted to merge and then figure out what is going on myself. It seems puzzling that your local stuff works. Do run another |
@antpaw I know why your snapshots are failing, you need to locally run |
bb23e14
to
dc728a0
Compare
@heath-freenome I've rebased onto the newest
I can't make Chakra's Range Slider work, otherwise the playground looks good, it only fails where other themes also fail so I think it's not related to chakras upgrade. |
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.
@antpaw I am going to merge this and fix the tests in the build. Do you think, once I am done, that you can get Slider working?
@heath-freenome Thank you! I've already tried a couple of attempts to solve the slide issue, with no luck. I will reach out the chakra ui folks, so that they can take a look at the playground issue, this merge helps a lot here. |
Reasons for making this change
fixes #4389
Update Chakra UI v2 to v3 based on the work of @MilanKrupa chakra-ui-v2-to-v3-migration
I can not run tests as the
npm test
does not succeed even onmain
. I seek feedback for this PRChecklist
npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update
to update snapshots, if needed.List of my commits:
fix chakra RadioWidget value change
fix chakra CheckboxesWidget value assign
I think this is the issue mentioned previously, it was bugged because there was a
<Field>
wrapper around the form that messes up the idsadd chakra Fieldset to FieldTemplate
Instead of removing the field i've added a fieldset
fix chakra SelectWidget content position via portal
add chakra NativeSelectWidget
Users can opt out of the custom select by using this widget
update playground chakra-ui version
remove @chakra-ui/icon in favor of lucide-react
@chakra-ui/icon
is deprecated