-
Notifications
You must be signed in to change notification settings - Fork 4
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 MaterialUI to v4 and provide MaterialUI via CDN #101
Comments
After upgrading to material ui v4, we should use the new |
Just for additional information, material-ui have a migration page here dedicated to moving from v3 to v4. There is a supporting GitHub README. A material-ui guide to minimising bundle size is available as well. |
Specific material-ui v4 changes:
|
As a result of the upgrade, unit tests are failing due to the ukri object (within the theme - UKRITheme) not being recognised. The shallow rendering is not working with the custom theme as it is not being passed down. |
@louise-davies has suggested a way of constructing the wrapper to hold the components without any styles/redux so that we can manually provide the props. The unit tests need to now be updated to complete the transition to material-ui v4.
|
Since the second objective to invesigate whether providing |
@louise-davies @agbeltran I have removed the task of investigating the material-ui bundle size and CDN/tree-shaking methods to a separate issue (#137 ). This issue can be closed once the pull request for the MaterialUI v4 upgrade (#132 ) has been merged into master. |
thank you @GoelBiju ! |
Description:
New updates in MaterialUI v4 means that the library can be more easily provided via CDN, meaning ADR 7 can be revisited. However, this requires an upgrade to MaterialUI v4 and there are some breaking changes that will need to be refactored.
Note: do we even want to do this? doing it this way means we are providing the whole library once, whereas making each plugin import it's own means we only pick the things we need but consequently we import those things multiple times. We might need to investigate which results in less code being downloaded to the client
Acceptance criteria:
material-ui
dependency tov4
[ ] Investigate whether supplyingmaterial-ui
as an external dependency actually improves efficiency or whether tree-shaking is more efficient - probably depends on the amount of plugins being loaded.The text was updated successfully, but these errors were encountered: