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

[Core] Remove dependency on utils/styles from components #3169

Merged
merged 1 commit into from
Feb 4, 2016

Conversation

newoga
Copy link
Contributor

@newoga newoga commented Feb 4, 2016

This commit removes the import of mergeStyles and prepareStyles from utils/styles for most components and files. The use of mergeStyles has been replaced with Object.assign and the prepareStyles function that is imported has been replaced with the prepareStyles implementation stored in context.

As of this commit, there are only two files importing from utils/styles:

  1. menus/menu-divider.jsx (which is planned for removal in PR [Core] Remove the deprecated API of v0.14.x #3108)
  2. mixins/style-propable.js (which many components are still using, but the removal of this mixin is tracked in [Core] remove style-propable mixin from components #2852)

Signed-off-by: Neil Gabbadon neil.gabbadon@emikra.com

@newoga
Copy link
Contributor Author

newoga commented Feb 4, 2016

Note: This should probably be merged after the merge of #3124.

@alitaheri
Copy link
Member

This is awesome 👍 👍 it gives us more ground to implement memoization later on. thanks @newoga 😁

@oliviertassinari
Copy link
Member

@newoga Could you rebase?

This commit removes the import of `mergeStyles` and `prepareStyles` from `utils/styles` for most components and files. The use of `mergeStyles` has been replaced with `Object.assign` and the `prepareStyles` function that is imported has been replaced with the `prepareStyles` implementation stored in context.

As of this commit, there are only two files importing from `utils/styles`:

1. `menus/menu-divider.jsx` (which is planned for removal in PR mui#3108)
2. `mixins/style-propable.js` (which many components are still using, but the removal of this mixin is tracked in mui#2852)

Signed-off-by: Neil Gabbadon <neil.gabbadon@emikra.com>
@newoga newoga force-pushed the utils-styles-to-object-assign branch from 9e86063 to 3fa5894 Compare February 4, 2016 18:47
@newoga
Copy link
Contributor Author

newoga commented Feb 4, 2016

Done!

oliviertassinari added a commit that referenced this pull request Feb 4, 2016
[Core] Remove dependency on utils/styles from components
@oliviertassinari oliviertassinari merged commit b218c2e into mui:master Feb 4, 2016
@oliviertassinari
Copy link
Member

@newoga Looks good 🐎!

@newoga newoga deleted the utils-styles-to-object-assign branch February 6, 2016 15:30
@zannager zannager added the core Infrastructure work going on behind the scenes label Mar 14, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core Infrastructure work going on behind the scenes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants