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

Editor package: fix block settings menu appearance #9777

Merged
merged 1 commit into from
Sep 11, 2018

Conversation

vindl
Copy link
Member

@vindl 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.

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.
@vindl vindl self-assigned this Sep 11, 2018
@vindl vindl added [Type] Bug An existing feature does not function as intended [Package] Editor /packages/editor labels Sep 11, 2018
Copy link
Contributor

@jasmussen jasmussen left a comment

Choose a reason for hiding this comment

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

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
@vindl vindl deleted the fix/block-settings-menu-styles branch September 11, 2018 09:10
@vindl
Copy link
Member Author

vindl commented Sep 11, 2018

Thanks for the review @jasmussen!

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

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
Labels
[Package] Editor /packages/editor [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants