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

Fix overflowing menu bar on admin sections #527

Conversation

ScopeyNZ
Copy link
Contributor

This addresses an issue raised in silverstripe/silverstripe-comments#243 and #498 where the menu at the top of the admin screen extends into the preview when in split mode.

This is caused by the whole content section having content that is larger than the container. The blocks do not flex-shrink in some browsers due to a quirk where they need a width or min-width set low enough to indicate the block width can be shrunk to less than the width of the content in it. This happens when there's an inflexible block (the page tree in this case). Here's some relevant SO questions I dug up trying to diagnose the issue:

https://stackoverflow.com/questions/38723559/flex-item-exceeds-its-container
https://stackoverflow.com/questions/33790219/firefox-not-respecting-flex-shrink

The change affects all blocks with the class flexbox-area-grow but it should only change any block that has overflowing content. In testing I couldn't identify any other block with this class that was negatively affected.

@robbieaverill
Copy link
Contributor

cc @clarkepaul

@ScopeyNZ ScopeyNZ force-pushed the pulls/1.0/admin-menu-overflow branch from ff186a6 to bf5b578 Compare May 21, 2018 04:44
@clarkepaul
Copy link
Contributor

Cool, took a look and seems to fix the tab issue. I don't fully understand how this works or if there is a better fix but I think this fix does what we need it to. In other words "Looks good".

This fix wont stop content from extending the panel which is below the tabs when in Split Mode (for example whats happening on this issue silverstripe/silverstripe-comments#250 ), but does ensure the tabs are usable.

@robbieaverill
Copy link
Contributor

The change looks good to me, but seeing as flexbox-area-grow is used in so much of the CMS I'd like to get someone with a bit more CSS knowledge to have a look first. @lukereative would you mind having a look when you have a minute?

@lukereative lukereative self-requested a review June 18, 2018 01:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants