Skip to content

Commit

Permalink
Forms: Make file upload field block available in beta and refine its …
Browse files Browse the repository at this point in the history
…behavior (#41586)

Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/13168509805

Upstream-Ref: Automattic/jetpack@ff6b4dd
  • Loading branch information
lezama authored and matticbot committed Feb 5, 2025
1 parent b923e5b commit 4717ced
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ This is an alpha version! The changes listed here are not final.
- Forms: Update fields and button blocks to support contentOnly editing.

### Changed
- Forms: Refine file upload field block to use WordPress upload icon and follow consistent field patterns. Make the block available in beta.
- Forms: tracks forms submissions in orden to improve the product.
- Updated package dependencies.

Expand Down
2 changes: 1 addition & 1 deletion dist/blocks/editor.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('jetpack-connection', 'lodash', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => 'f486b0ffe90615fe0c10');
<?php return array('dependencies' => array('jetpack-connection', 'lodash', 'react', 'react-jsx-runtime', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '5c9070d40bde9bbf1149');
4 changes: 2 additions & 2 deletions dist/blocks/editor.js

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions src/blocks/contact-form/class-contact-form-block.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,15 +162,15 @@ public static function register_child_blocks() {
);

$blocks_variation = apply_filters( 'jetpack_blocks_variation', \Automattic\Jetpack\Constants::get_constant( 'JETPACK_BLOCKS_VARIATION' ) );
if ( 'experimental' === $blocks_variation ) {
self::register_experimental_blocks();
if ( 'beta' === $blocks_variation ) {
self::register_beta_blocks();
}
}

/**
* Register experimental blocks
* Register beta blocks
*/
private static function register_experimental_blocks() {
private static function register_beta_blocks() {
Blocks::jetpack_register_block(
'jetpack/field-file',
array(
Expand Down

0 comments on commit 4717ced

Please sign in to comment.