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

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

Merged
merged 12 commits into from
Aug 22, 2024
Merged

Conversation

zanivan
Copy link
Contributor

@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 Specific to @mui/material design This is about UI or UX design, please involve a designer labels Aug 21, 2024
@zanivan zanivan self-assigned this Aug 21, 2024
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
Contributor 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
Contributor Author

zanivan commented Aug 22, 2024

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

@zanivan zanivan merged commit af6a748 into next Aug 22, 2024
31 checks passed
@zanivan zanivan deleted the refine-theme-selector branch August 22, 2024 12:31
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 package: material-ui Specific to @mui/material
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants