Skip to content
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

chore: upgrade to mui v6 #267

Merged
merged 3 commits into from
Sep 11, 2024
Merged

chore: upgrade to mui v6 #267

merged 3 commits into from
Sep 11, 2024

Conversation

Xhale1
Copy link
Contributor

@Xhale1 Xhale1 commented Sep 1, 2024

Material UI v6 is out!

This PR upgrades the dev dependencies for the dependencies of the example web app to use mui v6, and widens the peer dependencies to include the existing v5 and the new v6.

Type checking, linting, and tests seem to pass. The example app also appears to work as normal. It might be nice to try running tests for both mui v5 and v6 before merging this PR.

@Xhale1 Xhale1 mentioned this pull request Sep 1, 2024
@Xhale1
Copy link
Contributor Author

Xhale1 commented Sep 3, 2024

Looks like react-hook-form-mui now supports v6 and their PR similarly has required no logic changes which gives me confidence on this implimentation.

@sjdemartini
Copy link
Owner

Awesome, thanks for making this PR and looking into it @Xhale1. I'll take a closer look at this and aim to merge soon!

@Xhale1
Copy link
Contributor Author

Xhale1 commented Sep 11, 2024

Looks like the workflow failed due to pnpm dedupe needing to be run. Should be fixed now.

Note that this required also running:

```
pnpm add tss-react@4.9.13
pnpm dedupe
pnpm remove tss-react
pnpm i
```

in order to ensure that we were on a compatible version of tss-react
with mui v6 specified as our MUI dep. Otherwise:

```
 WARN  Issues with peer dependencies found
.
└─┬ mui-tiptap 1.10.0
  └─┬ tss-react 4.9.10
    └── ✕ unmet peer @mui/material@^5.0.0: found 6.0.1
```

(v6 support was added in 4.9.13 of tss-react
garronej/tss-react@d09cbfe)
@sjdemartini
Copy link
Owner

Thanks again @Xhale1! Looks good, just needed to make one adjustment to also update the example project lockfile. (Thanks for the quick fix on pnpm dedupe once CI ran.) I'll get this published shortly!

@sjdemartini sjdemartini merged commit 7335880 into sjdemartini:main Sep 11, 2024
1 check passed
@sjdemartini
Copy link
Owner

sjdemartini commented Sep 11, 2024

This is published now in v1.11.0! (I also mistakenly pushed a 1.10.1 tag that released the same changes—oops!—but it's redundant, so I'd recommend 1.11.0.)

And re

It might be nice to try running tests for both mui v5 and v6 before merging this PR.

I agree that'd be nice, though at this point in time, the minimal tests here don't rely on MUI stuff anyway, so it wouldn't make a difference. Sometime in the future, it'd be nice to add playwright or similar tests here, but for now, the builds, type-checking, and manual smoke-testing will have to do.

And thanks for the details and confirmation around what other third party mui projects did for v6!

@Xhale1
Copy link
Contributor Author

Xhale1 commented Sep 11, 2024

Exciting! And that all makes sense to me :)

I appreciate your work (using this library over at trainwell). I'm happy to help out a bit with dependency update and whatnot if that's at all of interest.

@sjdemartini sjdemartini linked an issue Sep 12, 2024 that may be closed by this pull request
@sjdemartini
Copy link
Owner

@Xhale1 great to hear! Yes, I'd definitely appreciate PRs for things like this 😄

Since you ask, if you happen to have suggestions about how to properly support both NextJS and Node environments (and also bundler environments / CommonJS), this is at the top of my list #264, and I haven't come up with a solution or had more time to dig in again yet.

It also turns out that just today @mui/icons-material published a version that properly adds ESM support https://github.com/mui/material-ui/releases/tag/v6.1.0, so perhaps it's possible to get things working and avoid the issues I mentioned here #258 (comment).

sjdemartini added a commit that referenced this pull request Sep 12, 2024
Avoid mistakenly pushing other tags, like what happened as mentioned
here
#267 (comment)
sjdemartini added a commit that referenced this pull request Sep 12, 2024
Avoid mistakenly pushing other tags, like what happened as mentioned
here
#267 (comment)
@flobamediaacc
Copy link

Hey, we had the same problem. I've now gone back from 1.10.1 to 1.9.5, it works there.

@Xhale1
Copy link
Contributor Author

Xhale1 commented Sep 13, 2024

@flobamediaacc what problem is that? Perhaps it should be opened as a separate issue?

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.

Mui v6 support
3 participants