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

Ensure Hello Dolly plugin text doesn't overlap the widgets screen UI #30729

Merged

Conversation

getsource
Copy link
Member

Description

Consolidates both classes necessary (block-editor-page and wp-embed-responsive) into one function to add required admin body classes for the new Widgets editor, gutenberg_widgets_editor_add_admin_body_classes().

Only calls add_filter() when widgets editor page is being loaded.

Closes: #26219

How has this been tested?

Tested manually with Hello Dolly in wp-env, along with existing automated tests with npm run test.

Screenshots

One of the issues this fixes is Hello Dolly text being overlapped by the editor:
Before:
Screen Shot 2021-04-12 at 17 55 42

After:
Screen Shot 2021-04-12 at 17 55 26

Types of changes

Primarily a bug fix to resolve the Hello Dolly issue above, but includes behavior changes.
block-editor-page is added to the new Widgets screen, which would mean styles targeted to that class will now be applied.

Changes the way the wp-embed-responsive class is added, as it is now only added when the widget page is loaded, instead of adding it to every admin page. I believe this is what was intended, based on the previous function's wording.

As part of this, an existing function, gutenberg_widgets_editor_add_responsive_embed_body_class is removed in favor of gutenberg_widgets_editor_add_admin_body_classes to add both classes.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • I've tested my changes with keyboard and screen readers.
  • My code has proper inline documentation.
  • I've included developer documentation if appropriate.
  • I've updated all React Native files affected by any refactorings/renamings in this PR (please manually search all *.native.js files for terms that need renaming or removal).

Consolidates both classes necessary (`block-editor-page` and `wp-embed-responsive`) into one function to add required admin body classes, `gutenberg_widgets_editor_add_admin_body_classes()`.

Only calls `add_filter()` when widgets editor page is being loaded.
@talldan talldan added [Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Bug An existing feature does not function as intended labels Apr 14, 2021
Copy link
Contributor

@talldan talldan left a comment

Choose a reason for hiding this comment

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

Thanks Mike, this does the trick 🎉

@talldan talldan changed the title Add block-editor-page admin class to widgets editor page. Ensure Hello Dolly plugin text doesn't overlap the widgets screen UI Apr 23, 2021
@talldan talldan merged commit d7cd77d into WordPress:trunk Apr 23, 2021
@talldan
Copy link
Contributor

talldan commented Apr 23, 2021

Just renaming the PR, as the title ends up in the plugin changelog, so it's good to have something more user focused.

@github-actions github-actions bot added this to the Gutenberg 10.6 milestone Apr 23, 2021
@getsource
Copy link
Member Author

That's good to know -- thank you!

@getsource getsource deleted the fix/hello-dolly-text-overlap/26219 branch April 23, 2021 08:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Widgets Screen The block-based screen that replaced widgets.php. [Type] Bug An existing feature does not function as intended
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Hello Dolly plugin causes screen breakage
2 participants