-
Notifications
You must be signed in to change notification settings - Fork 49
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
Upgrade to MUI 5 #871
Comments
Okay from Västtrafik's point of view. |
Here's a list of what's left to be done after we've completed the main migration:
|
Thanks! When Hajk is to be upgraded next time, we will also migrate @material-ui/pickers. |
I've found that we're getting an error when we're using a custom theme on the documentHandler. E.g. the following documentHandlerTheme.json throws an error: The error we're seeing is the following: Seems like the theme is a bit mixed between camelCase and kebab-case, Fortunately this is an easy fix, just make sure to only use camelCase in documentHandlerTheme.json. |
I've given it a go to migrate VTSearch as well. Approx 50% done, progress can be found in the following branch: There are some components that i can't test, so i would be happy if someone from vt can give it a quick look sometime :) |
Yes, marginBottom is correct. We should have used camelCase all the way. |
I've updated documentHandlerTheme.json in the MUI-migration-branch, so it'll be fixed when we merge it :) I've also almost migrated VTSearch completely, there is one component to go, and then some testing of course. |
Many thanks, it's a big step forward. I will report back to Västtrafik that migration will not be such a big effort for us. |
Quick update: The migration is about to be completed. Only the Documenthandler- and VTSearch-plugin (almost done in another branch) to go. |
Fantastic work as always @Hallbergs! |
There's definitively a reason for this change, such as the increased contrast that we've talked about. I like it. 👍 |
Recent merge of We have a couple of minor fixes left however. One noteworthy is the behavior inside LayerSwitcher: the size of lables depends on the visibility of FeatureInfo window: Skarminspelning.2022-01-17.kl.13.16.02.mov |
Oh some css-specificity-errors! How fun!! |
Yeah, it's probably some more generic part then just this override in FeatureInfo. I can see funny things going on as soon as any window with custom styling gets "focus" (or is active/in front/injects its' custom styling). See this one: Skarminspelning.2022-01-17.kl.13.25.02.movI'll investigate! |
I think we'll have to dig into the migration-guide 😵💫 |
Alright, the two issues mentioned and illustrated with videos closed as of af55efe! |
Fantastic work! So all the issues came from bad imports? |
Yeah, should've migrated all related components before panicking 😉 |
@jesade-vbg, you've previously added a custom styling to oursnackbars. Any idea how it is supposed to look? It looks like this on small viewports currently. What should be different? |
Hi @jesade-vbg, I took a look at how it was previously, e.g. in Hajk 3.7 (which is available on karta.halmstad.se). The override doesn't seem to work. I think that's something very specific in your Varberg setup that you target, but it never worked for anyone else: |
It worked fine in the beginning of April. When it stopped working I dont know. |
Well, I agree that the placement of snackbars on small screens is indeed an issue, but it's a really small one. Especially compared to the benefits this updated gives us, such as a way smaller bundle size and latest packages across the board (=security). In addition, the fix hasn't worked for a couple of the latest releases, and no-one cared to fix it then. To sum up: it is an issue, but I don't see it as a deal-breaker. The issue #731 should be re-opened and handled separately from #871. (If someone who really cares wants to fix it as part of #871, the contribution is welcomed, of course.) |
The why: https://mui.com/blog/mui-core-v5/
The how: https://mui.com/guides/migration-v4/
The who: (funny, eh?) @Hallbergs and @jacobwod will give it a go. However, we won't be able to test all plugins as some code isn't easily setup in our environments. This is mainly a concern for Västtrafik (@sweco-semtto) and Varberg (FME, KID/FIR - @maan002, @jesade-vbg).
Rough roadmap:
@mui/styles
frompackage.json
. This step is a breaking change.The progress can be found in this branch if someone wants to test something before we merge it to master.
Progress:
Ongoing discussion, deprecated?Yes, we're not migrating this.Another change: migrated!@mui/styles
frompackage.json
. This will make the old styling unusable.The text was updated successfully, but these errors were encountered: