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

(chore) Better material-ui core components import strategy #1590

Merged

Conversation

oliviertassinari
Copy link
Member

  • Fix Capture d’écran 2020-03-18 à 22 11 36
  • Import one level deep to speed-up bundling

@vercel
Copy link

vercel bot commented Mar 18, 2020

This pull request is being automatically deployed with ZEIT Now (learn more).
To see the status of your deployment, click below or on the icon next to each commit.

🔍 Inspect: https://zeit.co/mui-org/material-ui-pickers/5zvv1qf67
✅ Preview: https://material-ui-pi-git-fork-oliviertassinari-fix-external-de-92e489.mui-org.now.sh

import { makeStyles } from '@material-ui/core/styles';
import Typography from '@material-ui/core/Typography';
import IconButton from '@material-ui/core/IconButton';
import Grid from '@material-ui/core/Grid';
Copy link
Member Author

Choose a reason for hiding this comment

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

To investigate if we can't get rid of this module. However, without the bundle size tracking tool of the core repository, it might be a bit challenging to measure progress on the impact.

@dmtrKovalenko
Copy link
Member

Wouldn’t core imports be treeshaked even when mixed?

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Mar 18, 2020

Wouldn’t core imports be treeshaked even when mixed

They are.

The motivation is not to force a choice on the users regarding https://material-ui.com/guides/minimizing-bundle-size/#development-environment.

@oliviertassinari
Copy link
Member Author

Code style issues found in the above file(s). Forgot to run Prettier?

How can I run Prettier (my IDE doesn't support it)?

@dmtrKovalenko
Copy link
Member

Something broken with latest husky release. For some reason precommit hooks don’t work even for me 🤷‍♂️

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Mar 18, 2020

On the core repository, we have yarn prettier, but I'm not sure what to use here 😁. Plus, there is no visual error output I can use to patch it by hand.

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Mar 18, 2020

For some reason precommit hooks don’t work even for me

It does run on my side, I wish it didn't run actually, it's frustrating me to have to wait a couple of seconds to be able to commit.

@codecov
Copy link

codecov bot commented Mar 19, 2020

Codecov Report

Merging #1590 into next will increase coverage by 0.04%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##             next    #1590      +/-   ##
==========================================
+ Coverage   92.02%   92.07%   +0.04%     
==========================================
  Files          64       64              
  Lines        1781     1791      +10     
  Branches      307      307              
==========================================
+ Hits         1639     1649      +10     
  Misses        108      108              
  Partials       34       34
Impacted Files Coverage Δ
lib/src/_shared/ToolbarText.tsx 100% <ø> (ø) ⬆️
lib/src/views/Clock/ClockPointer.tsx 100% <ø> (ø) ⬆️
lib/src/wrappers/MobileWrapper.tsx 100% <ø> (ø) ⬆️
lib/src/_shared/PureDateInput.tsx 100% <ø> (ø) ⬆️
lib/src/views/Calendar/Year.tsx 96.77% <100%> (ø) ⬆️
lib/src/views/Calendar/CalendarView.tsx 82.5% <100%> (+0.44%) ⬆️
lib/src/views/MobileKeyboardInputView.tsx 45.45% <100%> (ø) ⬆️
lib/src/_shared/ToolbarButton.tsx 100% <100%> (ø) ⬆️
lib/src/views/Calendar/CalendarHeader.tsx 91.66% <100%> (+0.14%) ⬆️
lib/src/views/Clock/ClockNumber.tsx 94.28% <100%> (ø) ⬆️
... and 10 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eac5818...9416133. Read the comment docs.

@dmtrKovalenko dmtrKovalenko changed the title Fix external dependency import (chore) Better material-ui core components import strategy Mar 19, 2020
@dmtrKovalenko dmtrKovalenko merged commit e66baba into mui:next Mar 19, 2020
@oliviertassinari oliviertassinari deleted the fix-external-dependency-import branch March 19, 2020 10:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants