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] Fix broken link & update MUI packages explanation #29583

Merged
merged 7 commits into from
Nov 11, 2021

Conversation

siriwatknp
Copy link
Member

@siriwatknp siriwatknp commented Nov 9, 2021

@siriwatknp siriwatknp added the docs Improvements or additions to the documentation label Nov 9, 2021
@mui-pr-bot
Copy link

mui-pr-bot commented Nov 9, 2021

No bundle size changes

Generated by 🚫 dangerJS against 7d56777

Copy link
Member

@mbrookes mbrookes left a comment

Choose a reason for hiding this comment

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

styled-engine is the (unfortunate) name for the style library wrapper / adapter package, but there's no such thing as a "styled-engine" as a generic term. Should we stick to something like "style library adapter" when not referring to the styled-engine package specifically? It's quite confusing otherwise.

Co-authored-by: Matt <github@nospam.33m.co>
@siriwatknp siriwatknp requested a review from mbrookes November 10, 2021 04:57
@mnajdova
Copy link
Member

Should we stick to something like "style library adapter" when not referring to the styled-engine package specifically? It's quite confusing otherwise.

"style library adapter" sounds good to me.

@oliviertassinari
Copy link
Member

styled-engine is the (unfortunate) name for the style library wrapper / adapter package, but there's no such thing as a "styled-engine" as a generic term.

@mbrookes We can agree not to agree (an nth time). When I read "styled-engine-sc" I think: "oh, styled-components is the engine that powers the styled() API". What name would you use?

Tl;dr

Is this capitalization correct? I'm used to seeing TL;DR with uppercases because it's an acyronms.

Other packages, such as @mui/utils and @mui/types, are used internally in the packages listed above.

This is not how we have been treating them so far. The private modules in utils are prefixed with unstable_. We put in these packages what we might need to share between @mui/base and @mui/system/@mui/styled-engine.

Screenshot 2021-11-10 at 11 39 51

core -> base

there is no need to install @mui/core because it is a built in dependency the design system package, @mui/material.

This can be controversial. Yarn 2 doesn't even allow implicit transitive dependency. There is eslint rule that warns against them: https://github.com/import-js/eslint-plugin-import/blob/main/docs/rules/no-extraneous-dependencies.md. I think that it would be wiser not to say anything.

siriwatknp and others added 3 commits November 11, 2021 10:51
Co-authored-by: Olivier Tassinari <olivier.tassinari@gmail.com>
@siriwatknp
Copy link
Member Author

siriwatknp commented Nov 11, 2021

Is this capitalization correct?

changed to TL;DR

This is not how we have been treating them so far

content removed.

core -> base

image updated.

This can be controversial

content removed.

Copy link
Member

@mnajdova mnajdova left a comment

Choose a reason for hiding this comment

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

LGTM

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 11, 2021

Are we sure about the size of the images?

For example, /static/images/packages/mui-packages.png displays blurry on my x2 screen. Its displayed size is 448px so I would assume that we can use an image with an intrinsic size of 896px (x2). It's currently 1381px. Same for docs/public/static/images/packages/mui-system.png. It definitely makes a visible difference in my screen display environment, but I don't know if it would also help developers with an x1 display.

BTW, I have purchased the latest MackBook Pro, only for the XDR display, so I can be pickier in the future with visual aesthetics 👼. Looks good otherwise

@siriwatknp
Copy link
Member Author

Are we sure about the size of the images?

For example, /static/images/packages/mui-packages.png displays blurry on my x2 screen. Its displayed size is 448px so I would assume that we can use an image with an intrinsic size of 896px (x2). It's currently 1381px. Same for docs/public/static/images/packages/mui-system.png. It definitely makes a visible difference in my screen display environment, but I don't know if it would also help developers with an x1 display.

BTW, I have purchased the latest MackBook Pro, only for the XDR display, so I can be pickier in the future with visual aesthetics 👼. Looks good otherwise

The size looks correct to me, 1381px is more than 896px so wouldn't it give a similar result.

I can open a fix later.

@siriwatknp siriwatknp merged commit 24a53e5 into mui:master Nov 11, 2021
@danilo-leal
Copy link
Contributor

so I can be pickier in the future with visual aesthetics 👼.

👀 👀 👀 fancy!

@oliviertassinari
Copy link
Member

oliviertassinari commented Nov 11, 2021

1381px is more than 896px so wouldn't it give a similar result.

@siriwatknp Yeah, I don't know if this only helps people like me on macOS hardware or Windows developers with regular screens too. In the case of Apple, the CSS pixel is 448, so it uses 896 real pixels. Now, if the image is also 896 pixels, then the OS doesn't need to resize it 👌. With a larger image size, the OS has to resize it, the text loses its crispness, it becomes fuzzy, harder to read.

At the end of the day, does it make a difference? For macOS users, with x2 resolution, I can notice for sure, it looks easier to read. For Windows users, maybe it doesn't matter; I have no idea, I suspect it doesn't matter, unless 2px -> 1px yields better resize results than 2.3px -> 1px for the algorithms used. I could test that with my girlfriend's laptop.

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.

[docs] Unclear note on styled engines
6 participants