Skip to content
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

Move a few components to es6 with mixin decorator #2436

Closed
wants to merge 1 commit into from
Closed

Move a few components to es6 with mixin decorator #2436

wants to merge 1 commit into from

Conversation

rob0rt
Copy link
Contributor

@rob0rt rob0rt commented Dec 8, 2015

This PR moves app-bar, app-canvas, and avatar to es6 style classes with a stage-1 decorator to handle the mixin. Most of the code changes were done with react-codemod with some minor changes to account for things in es7 syntax the tool does not account for (like static properties on the class).

Each component took about 1 minute to migrate from es5 to es6/es7.

No behavioral changes were introduced, the demo still runs as expected, and all tests still pass.

This PR is in reference to #458.

Review on Reviewable

@oliviertassinari
Copy link
Member

I think that we should wait to release v0.14 before migrating to ES6 class.

@rob0rt
Copy link
Contributor Author

rob0rt commented Dec 8, 2015

That's fair; this was just a swing to see how much the codemod tool could do with or without the mixins, and try and move a few components over. Realistically, I believe the whole library could be moved in a couple of hours of fairly idle work, just from trying this.

This also kind of proves that nothing breaks; everything behaves exactly the same as before.

@alitaheri
Copy link
Member

😱 I think this is worth it 👍 👍 but 0.14.0 cannot contain this. we'll have to clean up some stuff and PRs before we merge this. otherwise we'll have a hellstorm of conflicts :D

@rob0rt
Copy link
Contributor Author

rob0rt commented Dec 8, 2015

I'd be more than happy to move some more components over and keep adding to this PR, or I could deal with it however you think is best (I can totally understand not wanting one very bloated PR, so I could split it up or something).

@rob0rt
Copy link
Contributor Author

rob0rt commented Dec 8, 2015

I wrote my comment before you edited yours @subjectix. I completely agree, I don't think a syntax change on the entire library should be put into a release that's in an RC phase.

@alitaheri
Copy link
Member

@BobertForever I have another suggestion if @oliviertassinari agrees. I think it's best to add an es6-classes branch, do all the migration, planning, etc there and when all is ready merge with master.

@oliviertassinari
Copy link
Member

es6-classes branch

Sounds ok to me. @shaurya947?

@rob0rt
Copy link
Contributor Author

rob0rt commented Dec 8, 2015

Cool! I can re-direct this PR there when you make it.

@alitaheri
Copy link
Member

@BobertForever Please redirect this to the es6-classes branch. thanks 👍

@oliviertassinari, @shaurya947 Agreed with this in gitter 😬

@alitaheri alitaheri closed this Dec 8, 2015
@zannager zannager added the package: system Specific to @mui/system label Mar 15, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
package: system Specific to @mui/system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants