-
-
Notifications
You must be signed in to change notification settings - Fork 32.3k
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] Document bundle size #40549
[docs] Document bundle size #40549
Conversation
To me, the issue you linked proves it doesn't so much - they chose Base UI despite having a large bundle size (although the numbers they show are for Material UI), because "the bundle size can be addressed with tree-shaking". |
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 makes sense to me—no reason to add these links manually when it could be done programmatically. |
Co-authored-by: Michał Dudak <[email protected]> Signed-off-by: Olivier Tassinari <[email protected]>
a0d82d5
to
7f8aa49
Compare
I agree but I think that current PR is already much better than what we have on HEAD today. It took 10 minutes to add. I have explored a bit the automation route, this is what I could come up with in 60 minutes: #40592. It will take probably 4 hours to get it to production (and then I expect the need for follow-up, about 4 more hours). |
7f8aa49
to
520c587
Compare
I don't really understand the point of adding this text to the page manually when we already have the "Bundle size" button right above it. It looks out of place, and redundant. If we do want to add this info to each page, I think we should do so in a way that's coherent with the doc structure, so we don't need to change it again later. Maybe something like this?
edit: I missed #40592 before but I think that solution is far preferable over adding text to the docs! |
@samuelsycamore The problem is the effort it takes today to get the information, which can be a differentiator:
Screen.Recording.2024-01-16.at.02.21.01.mov
So, how about we can combine the two PR: have the look and feel of #40592 and hard code the data of #40549. |
Now, I think there is also a case to be made in favor of continuing in this direction of this PR. The aspiration is to bring back the marketing/selling section, for example of https://mui.com/material-ui/react-modal/: we removed it in https://mui.com/base-ui/react-modal/ which feels like a step backward. A benchmark: https://www.radix-ui.com/primitives/docs/components/dialog resonates with me (the approach, not the content). If we position the highlights relative to how it's the best component in its own space, then you are more likely to convince new users. |
That makes sense to me; it's generally something that'd help folks quickly grasp what each component provides at a level. Though I definitely feel like it's a totally different thread than "documenting bundle size". I imagine you're bringing it up because they sit closely in the Radix docs design, but these are separate initiatives — would leave it out of this PR and discuss it separately in another one. |
Moving this to mui/base-ui#602 |
See #40547 (comment)
Bundle size matters. I think it's important we document it in the docs. Documenting:
https://deploy-preview-40549--material-ui.netlify.app/base-ui/react-autocomplete/
For example, see propeldata/ui-kit#157 for why, there is a reputation for bloat to debunk (Base UI) and solve (Material UI).
Ok, this PR solution it's not very clean, solving #40591 correctly would be a dream, but I think this is better than nothing. I would 💯 to add this to all the Base UI docs pages. I started to add it on a few more pages.