Skip to content

Commit eb060f3

Browse files
authored
Forms: Make rating and slider fields also available as beta blocks (#45092)
* enable experimental blocks for beta as well * changelog
1 parent 0829070 commit eb060f3

File tree

3 files changed

+8
-3
lines changed

3 files changed

+8
-3
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Significance: patch
2+
Type: changed
3+
Comment: Making some Form fields that are available as experimental blocks to beta as well. Should not have any effect for normal users
4+
5+

projects/packages/forms/src/blocks/contact-form/child-blocks.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export const childBlocks = [
6060
JetpackTelephoneField,
6161
JetpackTextareaField,
6262
JetpackFieldFile,
63-
...( getJetpackBlocksVariation() === 'experimental'
63+
...( [ 'experimental', 'beta' ].includes( getJetpackBlocksVariation() )
6464
? [ JetpackRatingField, JetpackRatingInput, JetpackFieldSlider, JetpackSliderInput ]
6565
: [] ),
6666
...( getJetpackBlocksVariation() === 'beta' ? [ JetpackTimeField, JetpackHiddenField ] : [] ),

projects/packages/forms/src/blocks/contact-form/class-contact-form-block.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ public static function register_child_blocks() {
262262
)
263263
);
264264

265-
if ( Blocks::get_variation() === 'experimental' ) {
265+
if ( Blocks::get_variation() === 'experimental' || Blocks::get_variation() === 'beta' ) {
266266
Blocks::jetpack_register_block(
267267
'jetpack/input-rating',
268268
array(
@@ -454,7 +454,7 @@ public static function register_child_blocks() {
454454
);
455455
}
456456

457-
if ( Blocks::get_variation() === 'experimental' ) {
457+
if ( Blocks::get_variation() === 'experimental' || Blocks::get_variation() === 'beta' ) {
458458
Blocks::jetpack_register_block(
459459
'jetpack/field-rating',
460460
array(

0 commit comments

Comments
 (0)