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/plugin document setting panel name #22763

Merged

Conversation

ryanwelcher
Copy link
Contributor

@ryanwelcher ryanwelcher commented May 29, 2020

Description

This PR is a first pass at close #22049

How has this been tested?

Types of changes

Instead of combining the context.name and potentially missing ownProps.name. I have update the logic to use context.name only if ownProps.name is not defined. This will address the issue of the panel being referenced as plugin-slug/undefined if there is no name property passed to the PluginDocumentSettingPanel component.

Checklist:

  • My code is tested.
  • My code follows the WordPress code style.
  • My code follows the accessibility standards.
  • 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.

@ryanwelcher ryanwelcher added the [Feature] Extensibility The ability to extend blocks or the editing experience label May 29, 2020
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

It looks good, thank you for proposing this improvement.

There is one file that was removed, I assume by accident. Otherwise, it looks good and should be good to go once my code style changes are applied to conform with WordPress guidelines.

@@ -1,118 +0,0 @@
/**
Copy link
Member

Choose a reason for hiding this comment

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

It doesn't look like this change is intentional.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for catching that! I've readded the file from master

@gziolo gziolo added the [Type] Developer Documentation Documentation for developers label Jun 16, 2020
ryanwelcher and others added 4 commits June 16, 2020 09:26
…-setting-panel.md

Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
…-setting-panel.md

Co-authored-by: Greg Ziółkowski <grzegorz@gziolo.pl>
…yanwelcher/gutenberg into fix/plugin-document-setting-panel-name
@ryanwelcher ryanwelcher requested a review from gziolo June 16, 2020 13:35
Copy link
Member

@gziolo gziolo left a comment

Choose a reason for hiding this comment

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

Cool, thank you for quick improvements :)

@ryanwelcher
Copy link
Contributor Author

@gziolo I found a couple of small items that I addressed.

@ryanwelcher ryanwelcher merged commit 1894d4b into WordPress:master Jun 17, 2020
@github-actions github-actions bot added this to the Gutenberg 8.4 milestone Jun 17, 2020
This was referenced Jun 24, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Extensibility The ability to extend blocks or the editing experience [Type] Developer Documentation Documentation for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Issue registering a PluginDocumentSettingPanel plugin
2 participants