-
Notifications
You must be signed in to change notification settings - Fork 2.3k
fix: prevent duplicate checkbox description rendering across themes #4825
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
fix: prevent duplicate checkbox description rendering across themes #4825
Conversation
|
Hi @heath-freenome , |
| onFocus={handleFocus} | ||
| error={rawErrors && rawErrors.length > 0 ? rawErrors.join('\n') : undefined} | ||
| aria-describedby={ariaDescribedByIds(id)} | ||
| {...themeProps} |
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.
How does this fix the issue with mantine?
|
@Suyog241005 Your tests are failing... Make sure to run the following commands on your branch: |
|
Hi @heath-freenome , npm install All tests are passing on my end.
It’s possible that the CI cache or environment mismatch is causing the failure. |
CHANGELOG.md
Outdated
| should change the heading of the (upcoming) version to include a major version bump. | ||
| --> | ||
| # 6.0.0 |
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.
| # 6.0.0 | |
| # 6.0.2 |
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 need you to move all of these changes in the CHANGELOG.md under the 6.0.2 section ABOVE the 6.0.1 section... With only your additions to the sections you have right now. and order the themes alphabetically
|
@Suyog241005 you'll need to rebase anyway, which will cause your tests to run again... After the rebase do again what I suggested, since the |
a5eedb7 to
0581174
Compare
|
@heath-freenome I’ve rebased, resolved conflicts, and all required checks have passed. Please review it when you get the chance. |
Can you address the feedback I've left as well. Especially the |
0581174 to
3bb4c67
Compare
|
@heath-freenome , I have updated CHANGELOG.md — moved all entries under the 6.0.2 section above 6.0.1 as requested. |
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
|
@Suyog241005 one last thing, can you update the |
|
Hi @heath-freenome , I have added the requested snapshot tests for checkbox with description, radio, and select widgets in formTests.tsx. |
|
@Suyog241005 One small set of changes to the tests, a rebase and then I will approve/merge |
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
|
@heath-freenome I've made the requested test changes, updated all snapshots, and I've also done a git rebase to ensure everything is in sync. The PR is ready for your review. |
Bumps [actions/download-artifact](https://github.com/actions/download-artifact) from 5 to 6. - [Release notes](https://github.com/actions/download-artifact/releases) - [Commits](actions/download-artifact@v5...v6) --- updated-dependencies: - dependency-name: actions/download-artifact dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 3 to 4. - [Release notes](https://github.com/github/codeql-action/releases) - [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md) - [Commits](github/codeql-action@v3...v4) --- updated-dependencies: - dependency-name: github/codeql-action dependency-version: '4' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/upload-artifact](https://github.com/actions/upload-artifact) from 4 to 5. - [Release notes](https://github.com/actions/upload-artifact/releases) - [Commits](actions/upload-artifact@v4...v5) --- updated-dependencies: - dependency-name: actions/upload-artifact dependency-version: '5' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 5 to 6. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](actions/setup-node@v5...v6) --- updated-dependencies: - dependency-name: actions/setup-node dependency-version: '6' dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com>
Bumps [mocha](https://github.com/mochajs/mocha) from 10.8.2 to 11.7.4. - [Release notes](https://github.com/mochajs/mocha/releases) - [Changelog](https://github.com/mochajs/mocha/blob/main/CHANGELOG.md) - [Commits](mochajs/mocha@v10.8.2...v11.7.4) --- updated-dependencies: - dependency-name: mocha dependency-version: 11.7.4 dependency-type: direct:development update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Heath C <51679588+heath-freenome@users.noreply.github.com>
0a422ea to
6f243ee
Compare

Reasons for making this change
This PR fixes issue #4742, where checkbox widgets rendered duplicate labels or descriptions across multiple themes (such as AntD, Chakra UI, MUI, and others).
The duplication occurred because both the FieldTemplate and the CheckboxWidget components were responsible for rendering labels and descriptions.
This change ensures that checkbox widgets render their description only once and that FieldTemplate skips redundant rendering for checkbox types.
It improves consistency across themes and avoids confusing duplicate text for users.
Fixes #4742
Checklist
npx nx run-many --target=build --exclude=@rjsf/docs && npm run test:updateto update snapshots, if needed.