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

[docs] Remove compose helper #16429

Merged
merged 2 commits into from
Jul 2, 2019
Merged

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Jun 30, 2019

Kill docs/src/modules/utils/compose.js, this has been a problem for people copy & pasting the onepirate premium theme (#14604). This is also one step closer to a full hook codebase.

export default function compose(...funcs) {
  return funcs.reduce((a, b) => (...args) => a(b(...args)), arg => arg);
}

I appreciate how it reduces the overall number of LOCs.

@oliviertassinari oliviertassinari added the docs Improvements or additions to the documentation label Jun 30, 2019
Copy link
Member

@eps1lon eps1lon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This PR is a smoke screen for another change.

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Jun 30, 2019

This PR is a smoke screen for another change.

@eps1lon Do you mean #16380 (comment)? I have noticed the potential for improvement migrating the Ad component from the classes to hooks. It was simpler to bake the change here directly. I believe that we don't need more than one char i.

@mui-pr-bot
Copy link

mui-pr-bot commented Jun 30, 2019

Details of bundle changes.

Comparing: 7fe530f...f2b702f

bundle parsed diff gzip diff prev parsed current parsed prev gzip current gzip
@material-ui/core 0.00% 0.00% 320,029 320,029 88,270 88,270
@material-ui/core/Paper 0.00% 0.00% 68,291 68,291 20,369 20,369
@material-ui/core/Paper.esm 0.00% 0.00% 61,573 61,573 19,161 19,161
@material-ui/core/Popper 0.00% 0.00% 28,945 28,945 10,395 10,395
@material-ui/core/Textarea 0.00% 0.00% 5,507 5,507 2,358 2,358
@material-ui/core/TrapFocus 0.00% 0.00% 3,753 3,753 1,578 1,578
@material-ui/core/styles/createMuiTheme 0.00% 0.00% 16,009 16,009 5,791 5,791
@material-ui/core/useMediaQuery 0.00% 0.00% 2,597 2,597 1,102 1,102
@material-ui/lab 0.00% 0.00% 140,242 140,242 43,458 43,458
@material-ui/styles 0.00% 0.00% 51,698 51,698 15,348 15,348
@material-ui/system 0.00% 0.00% 15,420 15,420 4,391 4,391
Button 0.00% 0.00% 84,316 84,316 25,722 25,722
Modal 0.00% 0.00% 14,427 14,427 5,087 5,087
Portal 0.00% 0.00% 3,473 3,473 1,572 1,572
Slider 0.00% 0.00% 74,921 74,921 23,297 23,297
colorManipulator 0.00% 0.00% 3,904 3,904 1,544 1,544
docs.landing -0.90% -0.94% 54,833 54,338 13,892 13,762
docs.main +0.04% 🔺 +0.08% 🔺 647,279 647,549 203,913 204,080
packages/material-ui/build/umd/material-ui.production.min.js 0.00% 0.00% 293,180 293,180 84,176 84,176

Generated by 🚫 dangerJS against f2b702f

@oliviertassinari
Copy link
Member Author

I have moved the ad icon change into a different pull request: #16438.

@oliviertassinari
Copy link
Member Author

rebased.

@oliviertassinari oliviertassinari merged commit 2570cd2 into mui:master Jul 2, 2019
@oliviertassinari oliviertassinari deleted the docs-hooks branch July 2, 2019 17:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Improvements or additions to the documentation
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants