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

Editor package: fix block settings menu appearance #9777

Merged
merged 1 commit into from Sep 11, 2018

Conversation

@vindl
Member

vindl commented Sep 11, 2018

Description

This is an attempt to resolve the styling issue that's present in Gutenberg integration that rely on @wordpress/editor package and its CSS. The block settings menu was always shown with a horizontal scrollbar, and removing the width: 100% attribute from it resolved the issue, while at the same time preserving the existing look in wp-admin.

How has this been tested?

I've verified that this fixes the issue in the Gutenberg integrations that we are working on: wp-calypso and standalone repository (to rule out the possibility of visual issues caused by Calypso shared styles).

After that I've tested the change in Gutenberg local development environment and wp-admin, and made sure that the placeholder still looks the same.

Screenshots

  • In integrations that use @wordpress/components:
Before After
menu-scrollbar menu-fixed
  • There should be no visual changes in wp-admin context.

Types of changes

Bug fix (non-breaking change which fixes an issue).

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • My code has proper inline documentation.
Editor package: fix block settings menu appearance
Resolve the styling issue that were present in Gutenberg integrations
that rely on published npm packages. Outside of wp-admin context the
removed CSS line was causing the horizontal scrollbar to appear in
block settings menu.
@jasmussen

In #8756 we made it so menus can grow. I was sure thish PR would affect that, but it seems unrelated.

One of the challenges we have with menus is that plugins can add items, with very long titles, and translations can get even longer. It looks like we can still do better here:

screen shot 2018-09-11 at 10 03 40

But it seems like that issue is the same whether this rule is present or not. In other words, if this fixes an issue for you, ship it! Thanks for your PR.

@vindl vindl merged commit 7e479a0 into master Sep 11, 2018

2 checks passed

codecov/project 49.02% remains the same compared to 47cd11f
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@vindl vindl deleted the fix/block-settings-menu-styles branch Sep 11, 2018

@vindl

This comment has been minimized.

Show comment
Hide comment
@vindl

vindl Sep 11, 2018

Member

Thanks for the review @jasmussen!

Member

vindl commented Sep 11, 2018

Thanks for the review @jasmussen!

@jasmussen jasmussen added this to the 3.9 milestone Sep 11, 2018

@jasmussen

This comment has been minimized.

Show comment
Hide comment
@jasmussen

jasmussen Sep 11, 2018

Contributor

Sure thing!

Remember to add any merged PR to a milestone so we can build our changelogs properly @vindl!

Contributor

jasmussen commented Sep 11, 2018

Sure thing!

Remember to add any merged PR to a milestone so we can build our changelogs properly @vindl!

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