-
Notifications
You must be signed in to change notification settings - Fork 808
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
Forms: update form field and button blocks to support content only mode #41411
Conversation
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
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 🤖 The e2e test report can be found here. Please note that it can take a few minutes after the e2e tests checks are complete for the report to be available. Follow this PR Review Process:
Still unsure? Reach out in #jetpack-developers for guidance! Jetpack plugin: The Jetpack plugin has different release cadences depending on the platform:
If you have any questions about the release process, please ask in the #jetpack-releases channel on Slack. |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
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.
a407cee
to
3946192
Compare
Closes #40955, see also #40040
Proposed changes:
Makes the field and button blocks editable when using
contentOnly
editing.To achieve this, certain block attributes (ones that are considered 'content') now have the
role: content
property added to them. This allows contentOnly mode to identify which blocks contain content, and make them editable (but with a pared back interface).This is useful for a couple of different editing modes:
templateLock: 'contentOnly'
set on it.At the moment, this is about all that can be achieved with the APIs currently available in Gutenberg and WordPress core.
Other information:
Does this pull request change what data or activity we track or use?
No
Testing instructions:
The main thing to check is that every field block type works as expected.
templateLock: contentOnly
"templateLock": "contentOnly"
attribute. That group should contain a form, and that form should have pretty much every field type added. I've included the block markup for you so that you can copy/paste it into the 'Code Editor' within the block editor. Expand below to view and copy it:Expand here to view/copy block markup
role: content
to the form block, but the UI ends up a bit buggy, as contentOnly doesn't properly support parent blocks that have this role.Write Mode
Gutenberg > Experiments
and toggle on the 'Simplified site editing' experiment.+
button and the 'Undo' button, you should see a 'Tools' dropdown. Open this and ensure 'Design' is selected.