prenda-school / design-system

Implementations of the Prenda Design System (PDS).
https://main--60b7f55f55fbd4004993da4c.chromatic.com
Other
7 stars 1 forks source link

Migrate to MUI v5 #61

Open WilliamKelley opened 3 years ago

WilliamKelley commented 3 years ago

For almost a whole year now, Material-UI has been moving to v5 and leaving v4 in critical-fix-only mode. For at least the past few months, the maintainers have actually suggested new projects start with v5.

~The v5 branch, next, is currently in late alpha, v5.0.0-alpha.35, and will soon be coming into beta. Obviously v4 -> v5 will involve breaking changes which is acceptable, but the danger of adopting an alpha is accepting even more breaking changes between alpha. By the time beta comes, that danger will pass.~

~With that in mind however, I think we would be fine to adopt a late alpha without fear or many, or any, breaking changes that affect us before beta. This lack of danger is primarily due to how few components we have and that our customizations access api's that are well established and not liable to change -- unlike lab components, or just more in-depth props in general.~

[Edit: v5 is now in beta.]

Migrating to v5 would be beneficial for many reasons

Resources:

We need to consider the situations of teams who

Since the next versions of Spark will contain breaking changes to almost every component, we really only need to consider the migration cost of consumer's existing usage of Mui v4 to v5, not Spark usage.

Questions for Consumers

WilliamKelley commented 3 years ago

Looks like v5-beta is scheduled for July 1st (milestone). Judging by the latest alpha PR, they're on track for that.

I think we should plan to migrate in July.

We need to come up with how to handle this for dependents.

Currently we depend on a peer of @material-ui/.... Keeping it this way would help the story of #75, right? Then we advise consumers to migrate their existing MUI use before updating us.

Thoughts?

siriwatknp commented 3 years ago

@WilliamKelley material-ui has migration to v5 docs. I will update it to be more of steps to follow soon. Once it is updated, would love to get your feedback.

WilliamKelley commented 3 years ago

@siriwatknp I appreciate it! I'll be sure to give feedback and ask other team members to do so as well

seigler commented 3 years ago

is the cost of migrating your current, non-Spark usage of Mui acceptable as a barrier to using Spark?

IMO for Prenda World this is "yes". Currently PW uses Material UI components in 110+ files, so the migration is substantial but worthwhile, since in addition to simplifying Spark development and maintenance, it will help us avoid doing new development on an old version of Mui.