-
Notifications
You must be signed in to change notification settings - Fork 13.5k
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
fix(menu-button): hide the menu button when the split pane is visible or auto hide is true #18564
Conversation
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.
I noticed this the other day. Looks good!
If I'm not mistaken, the underlying issue is that the button {
width: var(--width, --height, 48px);
height: var(--height, --width, 48px);
} What do you think? Only issue I can think of is potentially accidental inheritance of the variables because "width" and "height" are quite unspecific names? May I also suggest adding a screenshot test for this? |
@simonhaenisch At the moment we don't have screenshot tests for desktop views. We only have them for mobile screens. Updating screenshot to take images of more screen sizes is on our TODO list. |
@brandyscarney I meant a test for the button + header title (:
But great news that you'll add other viewport sizes for your tests! |
Oh! Yes I can do that @simonhaenisch. 🙂 |
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.
We need to update the code so that the menu button only has width when auto-hide is false or split pane is visible
this change will make it so if auto-hide is set to false it will still hide the menu button when it shouldn't
Co-Authored-By: Simon Hänisch <[email protected]>
@brandyscarney just wondering, why is it important again that the host element has its |
@simonhaenisch It's updated that way to match the Material Design spec: https://material.io/design/components/app-bars-top.html#specs It's not as noticeable when viewing the spec there, but if you go to their demo you'll see that all of their buttons in a toolbar need width and height with their border-radius for the hover / focused states: https://material-components.github.io/material-components-web-catalog/#/component/top-app-bar/standard I'm going to be looking into a different approach to do this though. I don't like this way either but I was trying it out. |
Here’s a different approach, this actually will improve accessibility: #18702 |
@brandyscarney ah ok I see, thanks! I actually wanted to suggest the exact same idea with setting Looks good to me! |
Hey Max, I am going to close this as we are going to go with this approach: #18702. Thank you! |
This PR hides any
ion-menu-button
when a split pane is visible.Currently, split pane menu buttons are invisible but take up space in the toolbar, causing the title to be misaligned:
Before:
When forcing
ion-menu-button
to bedisplay: none
when the split pane is visible, the alignment is fixed. The menu button properly shows again when the screen size is reduced such that the split pane collapses.