-
Notifications
You must be signed in to change notification settings - Fork 843
Forms: replace jetpack buttons with core #46166
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
base: trunk
Are you sure you want to change the base?
Conversation
Replaces usage of the custom jetpack/button block with the core/buttons and core/button blocks for submit actions in the contact form. Updates block variations, editor logic, and server-side rendering to support and enhance compatibility with core/buttons, including interactivity attributes and error handling. This change improves alignment with WordPress core blocks and future-proofs the contact form implementation.
Introduces a spinner animation to the submit button when the form is submitting by adding CSS for a loading indicator and keyframes for the spinner effect.
Co-authored-by: Mikael Korpela <[email protected]>
Co-authored-by: Mikael Korpela <[email protected]>
Co-authored-by: Manzoor Wani <[email protected]>
…form-block.php Co-authored-by: Manzoor Wani <[email protected]>
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! Jetpack plugin: No scheduled milestone found for this plugin. If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
Code Coverage SummaryCoverage changed in 3 files.
Full summary · PHP report · JS report Coverage check overridden by
Coverage tests to be added later
|
82662a1 to
ef3b913
Compare
| <!-- wp:jetpack/field-textarea {"label":"Notes"} /--> | ||
| <!-- wp:jetpack/button {"element":"button","text":"Book Appointment","lock":{"remove":true}} /--> | ||
| <!-- wp:button {"tagName":"button","type":"submit","className":"jetpack-form-submit-button"} --> | ||
| <div class="wp-block-button jetpack-form-submit-button"><button type="submit" class="wp-block-button__link wp-element-button">Book Appointment</button></div> |
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.
Do we need to specify the html?
This is a takeover from #45007
Proposed changes:
Following the original PR, this is a simpler approach just using core/button to replace jetpack/button
Other information:
Jetpack product discussion
None
Does this pull request change what data or activity we track or use?
No
Testing instructions:
(verbatim from original PR)
Existing post smoke-test
New form
Variations
Editor layout