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

ToolsPanel: Allow additional props on ToolsPanel #36428

Merged
merged 2 commits into from
Nov 14, 2021

Conversation

aaronrobertshaw
Copy link
Contributor

Description

Reintroduces the ability to apply custom props to a ToolsPanel.

It was previously removed to avoid expose Grid component props. Credit for the change goes to @ciampo.

See discussion here: #35621 (comment)

How has this been tested?

  1. Manually added custom props to the ToolsPanel within the Storybook example and confirmed props were applied.
  2. Confirmed that the ToolsPanel still functions correctly in the block and site editors.

Types of changes

Enhancement.

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).

@aaronrobertshaw aaronrobertshaw added the [Feature] UI Components Impacts or related to the UI component system label Nov 12, 2021
@aaronrobertshaw aaronrobertshaw self-assigned this Nov 12, 2021
Copy link
Member

@ramonjd ramonjd left a comment

Choose a reason for hiding this comment

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

Checked in post and site editors. All Tools Panel support controls work as expected.

I added a random prop to the block support Tools Panel and it was passed as expected:
Screen Shot 2021-11-12 at 3 01 00 pm

:shipit:

Copy link
Contributor

@ciampo ciampo left a comment

Choose a reason for hiding this comment

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

Code changes LGTM 🚀 Once again, thank you for addressing this feedback so promptly!

I wonder if this change deserves a little CHANGELOG entry

@aaronrobertshaw aaronrobertshaw force-pushed the update/tools-panel-allow-additional-props branch from 912389b to 93ac8e6 Compare November 14, 2021 23:04
@aaronrobertshaw aaronrobertshaw merged commit cd8aaf8 into trunk Nov 14, 2021
@aaronrobertshaw aaronrobertshaw deleted the update/tools-panel-allow-additional-props branch November 14, 2021 23:58
@github-actions github-actions bot added this to the Gutenberg 12.0 milestone Nov 14, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] UI Components Impacts or related to the UI component system
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants