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

[joy-ui][docs] Fix h1 template #40017

Merged
merged 2 commits into from
Nov 27, 2023

Conversation

oliviertassinari
Copy link
Member

@oliviertassinari oliviertassinari commented Nov 26, 2023

@oliviertassinari oliviertassinari added docs Improvements or additions to the documentation package: joy-ui Specific to @mui/joy labels Nov 26, 2023
@mui-bot
Copy link

mui-bot commented Nov 26, 2023

Netlify deploy preview

https://deploy-preview-40017--material-ui.netlify.app/

Bundle size report

No bundle size changes (Toolpad)
No bundle size changes

Generated by 🚫 dangerJS against ef6548f

@@ -7,13 +7,11 @@ import Typography from '@mui/joy/Typography';
import Button from '@mui/joy/Button';
import Stack from '@mui/joy/Stack';

// Icons import
Copy link
Member Author

Choose a reason for hiding this comment

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

Seems to be noise and not consistently applies between files

Comment on lines -111 to +109
<Box
sx={{
alignItems: 'center',
gap: 1,
}}
>
<Box sx={{ alignItems: 'center', gap: 1 }}>
Copy link
Member Author

Choose a reason for hiding this comment

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

Try to keep the line count as low as possible. This is often a concern relative to Tailwind CSS: how the screen is not tall enough to see the structure of the component.

@@ -203,7 +201,6 @@ export default function EmailContent() {
>
to
</Typography>

Copy link
Member Author

Choose a reason for hiding this comment

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

We have no space for JSX line breaks in the coding style.

Comment on lines +109 to +110
function SideDrawer(
props: BoxProps & { onClose: React.MouseEventHandler<HTMLDivElement> },
Copy link
Member Author

Choose a reason for hiding this comment

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

Use function Foo(props) convention to "flag" React components.

export const closeMessagesPane = () => {
export function closeMessagesPane() {
Copy link
Member Author

Choose a reason for hiding this comment

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

Convention, no arrow function at the top level scope of a file

const status = useScript(`https://unpkg.com/feather-icons`);
const status = useScript('https://unpkg.com/feather-icons');
Copy link
Member Author

Choose a reason for hiding this comment

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

Convention, single quote when possible.

Comment on lines -99 to +92
my: 1,
mb: 1,
Copy link
Member Author

Choose a reason for hiding this comment

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

@oliviertassinari
Copy link
Member Author

oliviertassinari commented Nov 26, 2023

@zanivan One thing I noticed that is frustrating is the layout shift with the tabs:

Screen.Recording.2023-11-26.at.18.27.43.mov

In https://dashboard.workos.com/environment_01H69ZHYYTR835G2GQ78SPZT5A/configuration/directory-sync, they (WorkOK, Radix Theme, same thing) render two labels to avoid the layout shift:

Screenshot 2023-11-26 at 18 28 47


GitHub solutions to the problem look significantly better to me:

Screenshot 2023-11-26 at 19 29 11

https://github.com/primer/react/blob/f62ec728acd5c90f105c3e3c5162a69dbe0c4b6d/src/UnderlineNav/styles.ts#L100-L108


Maybe changing the font weight isn't the best idea 😁

Copy link
Contributor

@zanivan zanivan left a comment

Choose a reason for hiding this comment

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

Wow! Really appreciated all the detailed feedback and insights 🙏
Regarding the tab issue, I'll open a PR for the fix 😉

@oliviertassinari oliviertassinari merged commit c8138a1 into mui:master Nov 27, 2023
21 checks passed
@oliviertassinari oliviertassinari deleted the fix-h1-template branch November 27, 2023 13:25
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Nov 30, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 1, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 1, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 6, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 6, 2023
mnajdova pushed a commit to mnajdova/material-ui that referenced this pull request Dec 6, 2023
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 package: joy-ui Specific to @mui/joy
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants