refine icon indicating copy to clipboard operation
refine copied to clipboard

Mantine 7 support

Open glebtv opened this issue 1 year ago • 15 comments

closes #5178

I fixed theme-mantine-demo, most of the other examples are untested and probably won't work.

Notable problems: Mantine 7 uses CSS modules for styling, and @refinedev/mantine uses tsup to build, which doesn't support css modules https://github.com/egoist/tsup/issues/536

Any input or feedback welcome

Mantine migration guides: https://v6.mantine.dev/changelog/6-0-0/ https://mantine.dev/guides/6x-to-7x/

glebtv avatar Dec 01 '23 16:12 glebtv

🦋 Changeset detected

Latest commit: 515dc57922ddcaf0df3287c3c6a255c0289d8dfa

The changes in this PR will be included in the next version bump.

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

changeset-bot[bot] avatar Dec 01 '23 16:12 changeset-bot[bot]

Hey @glebtv, thank you for the PR! Great work! I'll request reviews from the core members and let's see what we can work on here. I had a quick look and it looks good actually and I think we can provide couple of solutions for the CSS and then we can just update the mantine examples and ship it 🚢

About the styling issues, I think there are couple of solutions that we can try;

  • Maybe try to use as much as the base styles and try to minimize the manual styling to the style props.
  • We can try using a css-in-js solution but I don't think they will work well with the SSR features.
  • If we had to, we can also export a css file from the package and let the users import it in their apps. So we'll use some prefixed classnames for our components and let users be able to use those class names as selectors.

Thanks again for the PR, we'll keep you updated as soon as possible when we have the chance for a detailed review. 🚀

aliemir avatar Dec 05 '23 13:12 aliemir

any update on this? :) thanks for your pr!

piccinnigius avatar Dec 30 '23 15:12 piccinnigius

  • also export a css file from the package and let the users import it in their apps. So we'll use some prefixed classnames for our components and let users be able to use those class names as selectors.

Hello @piccinnigius, we are waiting for @glebtv to make the requested changes. if @glebtv is not available and you would like to continue this development, we would appreciate it 🙌

alicanerdurmaz avatar Jan 02 '24 08:01 alicanerdurmaz

Hey @glebtv , any update on this? :) highly appreciated!

amirmamaghani avatar Jan 16 '24 19:01 amirmamaghani

Hey @glebtv , any update on this? :) highly appreciated!

Hey @amirmamaghani we are open to contributions from the community, as the original owner of the PR seeems to be unresponsive.

BatuhanW avatar Jan 24 '24 06:01 BatuhanW

Hey @glebtv , any update on this? :) highly appreciated!

Hey @amirmamaghani we are open to contributions from the community, as the original owner of the PR seeems to be unresponsive.

Hey @BatuhanW , is there any how to guide how to work on these subpackages? I quickly tried to run it but I find it difficult to dig through sourcecodes without seeing any Storybook or sth. Thanks!

amirmamaghani avatar Jan 24 '24 14:01 amirmamaghani

Hey @glebtv , any update on this? :) highly appreciated!

Hey @amirmamaghani we are open to contributions from the community, as the original owner of the PR seeems to be unresponsive.

Hey @BatuhanW , is there any how to guide how to work on these subpackages? I quickly tried to run it but I find it difficult to dig through sourcecodes without seeing any Storybook or sth. Thanks!

Hey @amirmamaghani you can check our contribution guide. https://refine.dev/docs/guides-concepts/contributing/

BatuhanW avatar Jan 24 '24 15:01 BatuhanW

Hi, what exactly do you need help with this PR? Fix checks or something else?

arloktev avatar Feb 02 '24 05:02 arloktev

Sorry, I didn't have any time for this PR, but now I have rebased it to current master and am planning to fix the remaining examples soon

glebtv avatar Feb 09 '24 11:02 glebtv

I made @test at packages/ui-tests/tsup.config.ts a separate entrypoint so TestWrapper and render function could be replaced to add MantineProvider to the tests.

Unfortunately this breaks tests in other packages because ui-tests start to use test helpers and TestWrapper from the package and not from ui-tests itself

And TestWrapper in ui-tests uses legacy router, as most of ui-tests

A better solution is welcome if anyone has any

glebtv avatar Feb 12 '24 13:02 glebtv

Can someone trigger tests and examples build please?

glebtv avatar Feb 14 '24 08:02 glebtv

☁️ Nx Cloud Report

CI is running/has finished running commands for commit 515dc57922ddcaf0df3287c3c6a255c0289d8dfa. As they complete they will appear below. Click to see the status, the terminal output, and the build insights.

📂 See all runs for this CI Pipeline Execution


🟥 Failed Commands
lerna run cypress:run --scope inferencer-mantine -- --record --key --group inferencer-mantine
✅ Successfully ran 28 targets

Sent with 💌 from NxCloud.

nx-cloud[bot] avatar Feb 14 '24 08:02 nx-cloud[bot]

Please try the builds again, all tests and examples should work now.

Please note there is now <Select> and <MultiSelect> components in refinedev/mantine, since mantine 7 Select doesn't work with integers as values, and a useMultiSelect since the MultiSelect prop type is incompatible with Select's.

This component is currently a wrapper around mantine's Selelct but can be later replaced with a custom implementation, like https://mantine.dev/combobox/?e=AsyncAutocomplete

But Mantine select is overall not as good as react-select, maybe replace it with react-select?

Also should I rewrite\clean up the commits or will you squash them?

glebtv avatar Feb 15 '24 10:02 glebtv

This PR will also fix MUI snapshots, currently they are broken because of random css- classes.

Will update the branch to fix a conflict in snapshots

glebtv avatar Feb 15 '24 10:02 glebtv

I've updated and cleaned up the commits so they are more manageable. Please tell me if there's anything else I could do to help get this merged.

glebtv avatar Feb 21 '24 12:02 glebtv

Please try again, all e2e tests should also work now. Also fixed sider border

glebtv avatar Feb 22 '24 09:02 glebtv

Seems that snapshots were broken by master merge, I've updated them, please run the build again.

glebtv avatar Feb 26 '24 16:02 glebtv

I believe we can remove packages/mantine/src/components/themedLayout/index.tsx and other related components completely, <ThemedLayout /> is already deprecated. We can just continue with <ThemedLayoutV2 />

alicanerdurmaz avatar Feb 27 '24 07:02 alicanerdurmaz

Having trouble getting GithubBanner component to work with mantine's AppShell since AppShell uses fixed positioning, and the banner shows up below the layout.

I've moved the github banner to footer, please tell if this is ok, or is it ok to put a copy of the banner in the mantine package and modify it to show up properly at the top

New themedLayoutV2 uses Mantine's appshell internally https://mantine.dev/core/app-shell/ - the old layout didn't

glebtv avatar Feb 27 '24 11:02 glebtv

Is this PR on-track to land in the April Refine release?

adamfeldman avatar Mar 27 '24 00:03 adamfeldman

Passing run #10884 ↗︎

0 236 32 0 Flakiness 0

Details:

docs(faq): section about network errors in faq (#5789)
Project: refine Commit: 7fddc23c61
Status: Passed Duration: 21:47 💡
Started: Mar 29, 2024 6:15 AM Ended: Mar 29, 2024 6:37 AM

Review all test suite changes for PR #5340 ↗︎

cypress[bot] avatar Mar 29 '24 06:03 cypress[bot]

Hey @glebtv, we've merged releases/april branch, so your PR is closed. Could you re-open your PR?

BatuhanW avatar Apr 03 '24 06:04 BatuhanW

Hey @glebtv sorry for the inconvenience. I've also emailed you.

BatuhanW avatar Apr 04 '24 07:04 BatuhanW

Any news about Mantine 7 support guys ? Thanks !

mkhennoussi avatar Apr 22 '24 14:04 mkhennoussi

I'm sorry but currently I don't have time to continue this work, anyone is free to open a new pull using (or not using) my changes

glebtv avatar Apr 23 '24 10:04 glebtv

@glebtv Thanks for your answer and for your work ! @BatuhanW is Mantine v7 on the roadmap ? as it seems we are very close to support it...

mkhennoussi avatar May 10 '24 21:05 mkhennoussi

Hey @glebtv thanks for the contributions! You've come a long way and we appreciate it.

@mkhennoussi We are open to community contributions for this one.

BatuhanW avatar Jun 05 '24 11:06 BatuhanW