Skip to content

[material-ui][docs] Refine templates theme selector#43396

Merged
zanivan merged 12 commits intonextfrom
refine-theme-selector
Aug 22, 2024
Merged

[material-ui][docs] Refine templates theme selector#43396
zanivan merged 12 commits intonextfrom
refine-theme-selector

Conversation

@zanivan
Copy link
Collaborator

@zanivan zanivan commented Aug 21, 2024

Description

Fixes item 10 from #41469
Fixes item 1 from #42609

Refined the theme and mode selector by moving them from within the template to a top bar that also includes a back button. This change cleans up the template layout and enhances the visibility of the theme selector and mode toggler.

Preview

All templates from https://deploy-preview-43396--material-ui.netlify.app/material-ui/getting-started/templates/

Current New
image image

@zanivan zanivan added docs Improvements or additions to the documentation. package: material-ui design This is about UI or UX design, please involve a designer. labels Aug 21, 2024
@zanivan zanivan self-assigned this Aug 21, 2024
@zanivan zanivan requested a review from aarongarciah August 21, 2024 18:48
Copy link
Member

@aarongarciah aarongarciah left a comment

Choose a reason for hiding this comment

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

@zanivan
Copy link
Collaborator Author

zanivan commented Aug 22, 2024

Hey @aarongarciah, could you give me a hand with the double scrollbar in the templates? After adding the navbar, some templates ended up with a double scrollbar, and I haven’t been able to figure out how to remove it 😬

@aarongarciah
Copy link
Member

@zanivan sure, let me take a look

@aarongarciah
Copy link
Member

aarongarciah commented Aug 22, 2024

@zanivan this scrollable container highlighted in the screenshot is the responsible:

Screenshot 2024-08-22 at 13 41 46

It should use height: calc(100vh - 60px) instead of height: 100vh.

I think we could make it work without calculations, too. Let me take a deeper look. But for now, that should fix it.

@aarongarciah
Copy link
Member

@zanivan here's an example approach of how we could treat the navbar as a "frame" so we don't need to make calculations for scrollable containers:

aarongarciah@905d8b7

Not to be applied in this PR (unless you want to), just wanted to let you know another approach.


There's a small issue on small viewports where the scroll bar is partially hidden behind the header. We can fix it in another PR.
Screenshot 2024-08-22 at 14 22 51

@zanivan
Copy link
Collaborator Author

zanivan commented Aug 22, 2024

@aarongarciah Thanks so much! Will merge this one and open a new just to fix the frames 👍

<FormControl variant="outlined" sx={{ minWidth: 180 }}>
<Select
size="small"
labelId="theme-select-label"
Copy link
Member

Choose a reason for hiding this comment

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

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Thanks for the feedback—it should be fixed in #43604

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

design This is about UI or UX design, please involve a designer. docs Improvements or additions to the documentation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants