-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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] Use main repo as source of truth #144
Conversation
oliviertassinari
commented
Aug 2, 2020
•
edited
Loading
edited
- https://deploy-preview-144--material-ui-x.netlify.app/components/autocomplete/#ComboBox.tsx
- https://deploy-preview-144--material-ui-x.netlify.app/storybook/
724d78a
to
86de61e
Compare
docs/pages/_app.js
Outdated
import MyApp from '@material-ui/monorepo/docs/pages/_app'; | ||
|
||
export default MyApp; |
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.
The beauty of the approach
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.
How aboutexport {default as MyApp} from...
? 1 line
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.
As far as I know, named export doesn't work with Next.js custom App: https://nextjs.org/docs/advanced-features/custom-app.
We could probably do
export { default } from '@material-ui/monorepo/docs/pages/_app';
But the commit the comment is based on is outdated, the file has grown to:
import MyApp from '@material-ui/monorepo/docs/pages/_app';
import { LicenseInfo } from '@material-ui/x-grid';
// Remove the license warning from demonstration purposes
LicenseInfo.setLicenseKey(
'0f94d8b65161817ca5d7f7af8ac2f042T1JERVI6TVVJLVN0b3J5Ym9vayxFWFBJUlk9MTY1NDg1ODc1MzU1MCxLRVlWRVJTSU9OPTE=',
);
export default MyApp;
@dtassone It seems that we could move forward with the approach. There is still a lot to clean up (+123k LOC diff is wrong, should probably be 1/10 that figure), but a possible architecture is in place:
Et voilà, we can focus on building features, not infrastructure :D. Advantages
Drawbacks
Overall, I think for us, it worth it. Thoughts? |
86de61e
to
dfd1e99
Compare
9ee5b33
to
a2185c4
Compare
Have you considered using git submodules instead? |
@eps1lon I haven't seen git submodules in use since my first internship in the industry in 2014 but that doesn't mean they can't be a better solution to documenting the components. I'm looking into it. |
I used them for https://github.com/eps1lon/material-ui-playroom to use the docs demos. Maybe something similar works too. Probably easier to handle than the indirection with another repo that needs to be published. |
I think this is a great temporary solution. I tend to think that we should rethink the solution as a whole, Core, docs, and X. I wouldn't spend more time on this, for now, as the solution will get to where we want. |
For the little exploration I did with git submodules, it seems to shine especially in the case where work is required in material-ui in order to accommodate for constraints of material-ui-x. Is this a case we should optimize for? Not sure it will be very frequent. Outside of that, I didn't find anything (yet?) that is significantly better. Also, it seems that we can switch between yarn git and git submodules without a massive refactorization, so maybe we could keep the same direction and course correct if we hit something compelling enough to switch later on? |
a11e460
to
467b121
Compare
467b121
to
46fdf64
Compare
41d9276
to
a638c91
Compare
a638c91
to
5136df9
Compare
Nice one 👍 |
cf04dbd
to
3e957de
Compare
I'm not sure if the best part of the pull request is the |
Infra for doc 👍 |
@dtassone Should I migrate the first page, as an example so we can then parallelize the work? |
Sounds like a plan 😄 |