-
Notifications
You must be signed in to change notification settings - Fork 4.5k
List Block: Refactor setting panel to use ToolsPanel #69387
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
List Block: Refactor setting panel to use ToolsPanel #69387
Conversation
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Do you mind rebasing this PR? Somehow, I can't re-run failed CIs.
refactor-list-block-control-panel
39f0e0b
to
06fe2b1
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I overlooked an important point: the ToolsPanel
component is not available in the native app. The CI failure suggests this.
There are two ways to solve this. See #67957 (review)
Thanks for the update! Finally, we should be able to simplify the code like this: const LIST_STYLE_OPTIONS = [
{
label: __( 'Numbers' ),
value: 'decimal',
},
// ...
];
const OrderedListSettings = () => {
return (
<InspectorControls>
{ Platform.isNative ? (
<PanelBody>
{ /* // ... */ }
</PanelBody>
) : (
<ToolsPanel>
{ /* // ... */ }
</ToolsPanel>
) }
</InspectorControls>
);
};
|
Thanks for the review! |
* enhancement refactor-list-block-control-panel * add Platform.isNative condition * optimize Platform.isNative Co-authored-by: shimotmk <shimotomoki@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
Part of #67813
Make the settings panel more consistent with other blocks
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
list.mp4