Skip to content

Fix: Fixed the tests for chakra-ui v3 #4581

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

Merged
merged 1 commit into from
Apr 28, 2025
Merged

Conversation

heath-freenome
Copy link
Member

Reasons for making this change

Fixed test for chakra-ui v3

  • Deleted CssReset as it was unused
  • Fixed up comment in NativeSelectWidget
  • Updated the GridSnap tests
  • Updated the layout grid to add small margin due to new version padding

Checklist

  • I'm updating documentation
  • I'm adding or updating code
    • I've added and/or updated tests. I've run npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:update to update snapshots, if needed.
    • I've updated docs if needed
    • I've updated the changelog with a description of the PR
  • I'm adding a new feature
    • I've updated the playground with an example use of the feature

Fixed test for `chakra-ui` v3
- Deleted `CssReset` as it was unused
- Fixed up comment in `NativeSelectWidget`
- Updated the `GridSnap` tests
- Updated the layout grid to add small margin due to new version padding
@heath-freenome heath-freenome requested a review from nickgros April 28, 2025 01:00
@heath-freenome
Copy link
Member Author

@antpaw When this PR merges you should be able to pull and run npm run refresh-node-modules then build. Can you show me HOW the slider doesn't work in a screen recording?

@heath-freenome heath-freenome merged commit 3aabe37 into rjsf-v6 Apr 28, 2025
4 checks passed
@heath-freenome heath-freenome deleted the fix-chakra-v3 branch April 28, 2025 01:07
@antpaw
Copy link
Contributor

antpaw commented Apr 28, 2025

@heath-freenome Thank you, I can now build. I dont think we need a screenrecording, i've attached a screenshot. The issue is that the slider wont move on mouse click/drag. Oddly the keyboard controls work well and the changes in formData text area are also applied.
image

@heath-freenome
Copy link
Member Author

@heath-freenome Thank you, I can now build. I dont think we need a screenrecording, i've attached a screenshot. The issue is that the slider wont move on mouse click/drag. Oddly the keyboard controls work well and the changes in formData text area are also applied. image

Thanks for the link, Do you have the bandwidth to fix it soon?

@antpaw
Copy link
Contributor

antpaw commented Apr 30, 2025

@heath-freenome Thank you, I can now build. I dont think we need a screenrecording, i've attached a screenshot. The issue is that the slider wont move on mouse click/drag. Oddly the keyboard controls work well and the changes in formData text area are also applied. image

Thanks for the link, Do you have the bandwidth to fix it soon?

I have the bandwidth, I'm just out of ideas on how to fix it. I've created an issue with steps to reproduce and will try to share it with chakra ui team #4584

@heath-freenome
Copy link
Member Author

@antpaw I'm looking at the chakra ui Slider docs and they have a very different implementation. Maybe you need to do something like what they have, breaking out the control into parts?

import { Slider } from "@chakra-ui/react"
import { useState } from "react"

const Demo = () => {
  const [value, setValue] = useState([40])
  return (
    <Slider.Root
      maxW="200px"
      value={value}
      onValueChange={(e) => setValue(e.value)}
    >
      <Slider.Control>
        <Slider.Track>
          <Slider.Range />
        </Slider.Track>
        <Slider.Thumbs />
      </Slider.Control>
    </Slider.Root>
  )
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants