-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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] Improve imports from the core monorepo #10418
Conversation
Deploy preview: https://deploy-preview-10418--material-ui-x.netlify.app/ |
6065124
to
b4ae149
Compare
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't love this change, I feel like the @mui/...
prefix was a nice way to indicate that it comes from another MUI package. It would be nice if we could have a standardized form to rename packages from the monorepo.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the existing docs
and docsx
approach is pretty well established in everyone's head, but I can also second this though, ideally, we should aim at using a similar approach to aliasing/naming all packages and currently docs
, docsx
and typescript-to-proptypes
are probably the only exceptions. 🤔 🤷
This could become @mui/docs
or @mui-internal/docs
(although the former would be a better fit given how the alias names are chosen)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could become @mui/docs
We already have this one but it's almost empty
I do agree that the current aliases are a mess.
But for me @mui/monorepo
is not the solution.
I would prefer, as Lukas suggest to move the code on the doc to some @mui-internal
packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For me the main pain of @mui/monorepo
is that in theory anything on the core repo is "public API" because it's used by us, so anytime they break something, maybe we are impacted.
The idea of removing this alias eventually, is to make clear which folders in there repo is public API and which one they can totally rework without caring for others.
So once we are not using @mui/monorepo
anymore, we can start cleaning the other aliases (move to the new @mui-internal
nomenclature everywhere would be a good start).
And then we will be able to move those new @mui-internal
packages to another repo if we want.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok gotcha. I'm not sure how I feel about the non-required aliases overall, they do require getting used to. When I played with the babel config a few weeks ago I wasn't sure what was what. Non-magic stuff is easier for newcomers, and doesn't require engineers who update the configs to have as much accumulated knowledge of the project.
But I do see the benefits of @mui-internals
, and if it was all standardized to that I would be reasonably happy.
Feel free to merge anyway, just wanted to voice my concerns.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are you referring to when you talk about "non-required aliases" ?
My dream scenario would be that one day we have one repo for the infra with all the code published on NPM and versioned in well-defined packages.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not following you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice cleanup overall! 👍
import MarkdownDocs from '@mui/monorepo/docs/src/modules/components/MarkdownDocs'; | ||
import MarkdownDocs from 'docs/src/modules/components/MarkdownDocs'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I feel like the existing docs
and docsx
approach is pretty well established in everyone's head, but I can also second this though, ideally, we should aim at using a similar approach to aliasing/naming all packages and currently docs
, docsx
and typescript-to-proptypes
are probably the only exceptions. 🤔 🤷
This could become @mui/docs
or @mui-internal/docs
(although the former would be a better fit given how the alias names are chosen)
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
96f9a5d
to
3e0cc6e
Compare
3e0cc6e
to
d570ed3
Compare
This pull request has conflicts, please resolve those before we can evaluate the pull request. |
Closing because a lot of things changed in the infra since I opened this PR |
The only imports from
@mui/monorepo
left are@mui/monorepo/test
I would like move utils on the core repo to an internal package
@mui-internal/test-utilities