TecKnow / muster-tools

A package for assigning players to tables at multi-table, walk-in gaming events.
GNU General Public License v3.0
0 stars 0 forks source link

Fix Material-UI theme.spacing.unit deprecation warnings. #1

Closed TecKnow closed 4 years ago

TecKnow commented 4 years ago

The project tests are now giving the following warning.

console.error node_modules/@material-ui/core/styles/createSpacing.js:71

Material-UI: theme.spacing.unit usage has been deprecated. It will be removed in v5. You can replace theme.spacing.unit * y with theme.spacing(y). You can use the https://github.com/mui-org/material-ui/tree/master/packages/material-ui-codemod/README.md#theme-spacing-api migration helper to make the process smoother.

Investigate the meaning of this through the links provided. Document the cause and possible solutions. Choose a solution and apply it to resolve the warnings.

TecKnow commented 4 years ago

Warnings resolved on the development branch in commit 792960c63275c858221bc14e4acc5b4d5990ef2e.

Resolving the warnings doesn't explain why they appeared. It will be necessary to review the Material-UI documentation to do that.

TecKnow commented 4 years ago

I have re-read the styling documentation on the Material-UI website, as well as the project's FAQ. There isn't really any information there about this change, they've simply changed most of the sample code to reflect it.

TecKnow commented 4 years ago

This page on migrating from the previous major revision simply says that the new approach is "better" and links to the documentation page.

https://medium.com/material-ui/material-ui-v4-is-out-4b7587d1e701

I think that this is all the explanation that I'm going to find.