aws-northstar icon indicating copy to clipboard operation
aws-northstar copied to clipboard

chore: Bump material

Open mmarkelov opened this issue 4 years ago • 3 comments

The new stable version of material was released about 2 weeks ago. There are a lot of new breaking changes. So it's very difficult to migrate. I got some components pretty close to current version, but still a lot of work is required.

It's very early draft, so I just need to know what do you think about this migration?

mmarkelov avatar Sep 28 '21 18:09 mmarkelov

Hi @mmarkelov

Thank you for taking the initiative to migrating the material UI from v4 to v5. It is definitely something we would like to do. But I can see it will be a big task.

While I understand it definitely will be a major release for NorthStar, Just trying to understand the implications to our users here. From the Migration from v4 to v5, I can see that it requires:

Update React & TypeScript version
- The minimum supported version of React was increased from v16.8.0 to v17.0.0.
- The minimum supported version of TypeScript was increased from v3.2 to v3.5. 

The typescript one is fine. I will need to think about the React one a little bit. So it means all our consumers have to upgrade the React v17. And besides that, the consumers also have to upgrade their native usage on MUI if they are using any of them. Is it possible to use both versions? I can see the namespace change here.

Do you foresee any other requirements or implications to our consumers or our dependencies? For example, does it work well with the storybook/styleguist/webpack 4?

What kinds of support will you need from other maintainers / contributors? Can we distribute the efforts?

I will need to have some more thinking here. Please give me a few day. Thank you.

jessieweiyi avatar Sep 29 '21 11:09 jessieweiyi

  • From my experience I didn't face any issues with upgrading React to v17, because there were just a few breaking changes: https://reactjs.org/blog/2020/10/20/react-v17.html Also the new version will be released soon, so I suppose it will be better to migrate to the v17, before the next release

  • I'm not sure if it's possible to use two material versions - and yes, this is a problem. I just can try to check this, but not completely sure if it will be successful.

  • I faced with the issues according to use new Material UI with storybook, because of the difference between the emotion library. And because of this I had to change its configuration: https://github.com/aws/aws-northstar/blob/abd6dc70353ba2e6083e5d3f289f79ca5c5d986d/.storybook/main.js

  • Because of some breaking changes a lot of components looks different according to the current version. I try to figure out, but it's very difficult. This is just an early draft for now and it will need a lot of work. And because of this I wanted to know your thoughts on it.

mmarkelov avatar Sep 29 '21 16:09 mmarkelov

Hi @mmarkelov I have some thinkings on this migration task. While we would like to embrace the new features, bug fixes, and performance improvement in MUI v5, we still need to support some projects that cannot be upgraded in the short term.

What I propose is to maintain 2 release channels:

  • Create next branch to only include the components that we have migrated and tested
  • Create next release channel for the migration work so that we can run more testing on it
  • Port the new work and bug fixes (for the components that have been migrated) from main branch to next branch
  • Once we feel confident and include all the components, switch the current main release channel to v4 and next to main
  • Port the necessary bug fixes from main to v4 for 6 months
  • Stop the v4 release channel after 6 months

How do you think about this?

jessieweiyi avatar Oct 05 '21 07:10 jessieweiyi