-
Notifications
You must be signed in to change notification settings - Fork 872
Forms: allow more core blocks inside forms #47121
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
Changes from all commits
e6ce2af
2a66333
2c7f5f7
0055e43
509b643
db7bcac
4c27bed
9afdf4b
9d1b282
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: patch | ||
| Type: changed | ||
|
|
||
| Allow Accordion, Details, and Icon blocks in forms. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: patch | ||
| Type: changed | ||
|
|
||
| File Upload Dropzone: Allow Icon block to be added inside the dropzone. |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -75,8 +75,7 @@ public static function allowed_blocks_for_jetpack_form( $allowed_block_types, $e | |
| 'jetpack/field-image-select', | ||
|
|
||
| // Supporting blocks. | ||
| 'jetpack/button', | ||
| 'core/button', | ||
| 'jetpack/button', // Used for the submit button previously. | ||
| 'jetpack/label', | ||
| 'jetpack/input', | ||
| 'jetpack/options', | ||
|
|
@@ -96,17 +95,20 @@ public static function allowed_blocks_for_jetpack_form( $allowed_block_types, $e | |
| 'jetpack/form-progress-indicator', | ||
|
|
||
| // Core blocks for rich content. | ||
| 'core/accordion', | ||
| 'core/audio', | ||
| 'core/button', | ||
| 'core/button', // Used for the submit button. | ||
| 'core/code', | ||
|
Comment on lines
97
to
101
|
||
| 'core/columns', | ||
| 'core/column', | ||
| 'core/columns', | ||
| 'core/details', | ||
| 'core/group', | ||
| 'core/heading', | ||
| 'core/html', | ||
| 'core/icon', | ||
| 'core/image', | ||
| 'core/list', | ||
| 'core/list-item', | ||
| 'core/list', | ||
| 'core/math', | ||
| 'core/paragraph', | ||
| 'core/row', | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,4 @@ | ||
| Significance: minor | ||
| Type: enhancement | ||
|
|
||
| Forms: Allow Accordion, Details, and Icon blocks in forms, and Icon block to be added inside the file upload dropzone. |
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.
The inline comments about which block is used for the submit button are misleading/inconsistent. The form editor still programmatically creates a
jetpack/buttonsubmit button (seeprojects/packages/forms/src/form-editor/index.tsx), while this list claimscore/buttonis used for submit andjetpack/buttonwas only used previously. Consider rewording these comments to reflect that bothjetpack/button(legacy) andcore/button(current) may exist for backwards compatibility, or remove the submit-button-specific wording altogether.Uh oh!
There was an error while loading. Please reload this page.
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.
@enejb, can you check if the above is true, and we need to update it to use the core button instead if it is.
(Let's keep the comment as-is.)