-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Form Input: Convert Form Input block settings to ToolsPanel #70249
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
Form Input: Convert Form Input block settings to ToolsPanel #70249
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.
Thanks for the PR!
It almost looks good, but we need to make some tweaks because the default value of the required
attribute is false
.
@t-hamano You're correct, but as we can see from the 'Before' screencast, the required check is enabled by default, that's why I kept it true. I have made the changes in the latest commit. |
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!
as we can see from the 'Before' screencast, the required check is enabled by default
This is because the Form block explicitly defines the opposite of the default value as a template.
See:
required: true, |
…s#70249) * Form Input: Convert Form Input block settings to ToolsPanel * Form Input: Align initial settings with the default configuration * Form Input: Update default value for the required field to true Co-authored-by: himanshupathak95 <abcd95@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
What?
Closes #70243
Refactors the Form Input block's settings panel to use
ToolsPanel
instead ofPanelBody
for improved UI consistency and enhanced reset functionality.Why?
This change aligns the Form Input block with the ongoing effort to standardize block inspector controls across Gutenberg using
ToolsPanel
. TheToolsPanel
component provides a better user experience with reset capabilities, improved organization, and consistent UI patterns across all blocks.How?
PanelBody
withToolsPanel
in the InspectorControlsToolsPanelItem
componentsresetAll
functionality to reset both inline label and required settings to their defaultsTesting Instructions
Blocks: add Form and input blocks
is turned ONScreencast
Before
Screen.Recording.2025-05-30.at.11.38.18.mov
After
Screen.Recording.2025-05-30.at.11.36.00.mov