Skip to content

Add Mantine theme #4496

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

Closed
wants to merge 8 commits into from
Closed

Add Mantine theme #4496

wants to merge 8 commits into from

Conversation

zfarhad
Copy link

@zfarhad zfarhad commented Feb 14, 2025

Reasons for making this change

Added a new theme using Mantine UI library (@mantine/core, @mantine/hooks, @mantine/dates) for react-jsonschema-form, addressing the request in issue #4289 (fixes #4289). This theme provides a modern, customizable UI component set that integrates well with RJSF's form generation capabilities.

The Mantine theme offers:

  • Modern, clean UI components
  • Built-in dark mode support
  • Responsive design
  • Accessible components
  • Customizable styling through Mantine's theming system

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

@zfarhad zfarhad mentioned this pull request Feb 14, 2025
1 task
@jasny
Copy link

jasny commented Feb 14, 2025

@zfarhad No new features will be accepted to version 5. Please make a PR for version 6 instead, which currently is in alpha.

(I'm working on the primereact theme #4485 and was asked to do the same)

@heath-freenome
Copy link
Member

@zfarhad No new features will be accepted to version 5. Please make a PR for version 6 instead, which currently is in alpha.

(I'm working on the primereact theme #4485 and was asked to do the same)

@zfarhad Yes, @jasny is correct. We are only accepting critical fixes to the v5 release. Please make this change into the rjsf-v6 branch instead. Also, you will need to make changes to the ArrayFieldItemTemplate and add a GridTemplate. See the migrate v6 migration guide for more details.

@heath-freenome
Copy link
Member

Also, feel free to join the Friday meeting mentioned in the pinned issue

@zfarhad
Copy link
Author

zfarhad commented Feb 19, 2025

@zfarhad No new features will be accepted to version 5. Please make a PR for version 6 instead, which currently is in alpha.
(I'm working on the primereact theme #4485 and was asked to do the same)

@zfarhad Yes, @jasny is correct. We are only accepting critical fixes to the v5 release. Please make this change into the rjsf-v6 branch instead. Also, you will need to make changes to the ArrayFieldItemTemplate and add a GridTemplate. See the migrate v6 migration guide for more details.

Sounds great, I didn't know you were developing v6. So I will prepare the theme based on the rjsf-v6 branch and submit a new PR request on it.

@JoeHillyard
Copy link

Is there anything I can do to help get this over the line?

@heath-freenome
Copy link
Member

heath-freenome commented Mar 5, 2025

@zfarhad Have you had a chance to make your changes against the rjsf-v6 branch? It looks like you've deleted a whole bunch of stuff that doesn't make sense to have been deleted

@heath-freenome
Copy link
Member

@zfarhad I've merged a few PRs with updates and fixes from main. You'll have to rebase and update your PR. Also, checkout the new Layout Grid in the playground and update the layoutGrid.tsx in the samples directory to add your custom uiSchema for the grid to it.

@zfarhad
Copy link
Author

zfarhad commented Mar 17, 2025

@zfarhad I've merged a few PRs with updates and fixes from main. You'll have to rebase and update your PR. Also, checkout the new Layout Grid in the playground and update the layoutGrid.tsx in the samples directory to add your custom uiSchema for the grid to it.

@heath-freenome Sorry for my late, I will migrate the theme to the rjsf-v6 branch later this week

@dashkan
Copy link

dashkan commented Apr 3, 2025

@zfarhad Great job!

I don't know if this has been addressed in v6 layout. All the submit buttons for mantine theme are off in playground.

default theme:

image image

mantine theme:
image

custom example in playground does not look right either
image

@heath-freenome
Copy link
Member

@zfarhad still looking forward to seeing this rebased to the rjsf-v6 branch

@zfarhad zfarhad reopened this Apr 8, 2025
@heath-freenome
Copy link
Member

@zfarhad Just a reminder that we are not accepting any new features into the main build. Can you rebase your PR onto the rjsf-v6 branch?

@zfarhad
Copy link
Author

zfarhad commented Apr 10, 2025

@heath-freenome I've rebased the theme on the rjsf-v6 branch, it's ready now. Do I need to open a new PR for merging or will you continue with this one?

@heath-freenome
Copy link
Member

@heath-freenome I've rebased the theme on the rjsf-v6 branch, it's ready now. Do I need to open a new PR for merging or will you continue with this one?

Can you update this PR to merge into the rjsf-v6 branch instead of main? If not, then you'll need a new PR.

@zfarhad zfarhad changed the base branch from main to rjsf-v6 April 11, 2025 08:24
@zfarhad zfarhad mentioned this pull request Apr 11, 2025
8 tasks
@zfarhad
Copy link
Author

zfarhad commented Apr 11, 2025

@heath-freenome I've rebased the theme on the rjsf-v6 branch, it's ready now. Do I need to open a new PR for merging or will you continue with this one?

Can you update this PR to merge into the rjsf-v6 branch instead of main? If not, then you'll need a new PR.

I changed the base branch to rjsf-v6 but I couldn't change the head branch of the pull request, So I have created a new PR to merge into rjsf-v6.

@heath-freenome
Copy link
Member

@zfarhad can we close this?

@zfarhad
Copy link
Author

zfarhad commented Apr 12, 2025

@zfarhad can we close this?

Done

@zfarhad zfarhad closed this Apr 12, 2025
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.

Add a package for Mantine UI
6 participants