Date: Mon, 26 May 2025 21:12:32 +0800
Subject: [PATCH 91/99] fix: add fallback tooltip for theme.json data with no
name like blocksy
---
src/components/advanced-range-control/index.js | 2 +-
src/components/four-range-control/index.js | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/components/advanced-range-control/index.js b/src/components/advanced-range-control/index.js
index 08ea202c36..c8dc8a47fc 100644
--- a/src/components/advanced-range-control/index.js
+++ b/src/components/advanced-range-control/index.js
@@ -175,7 +175,7 @@ const AdvancedRangeControl = props => {
]
}, [] )
propsToPass.renderTooltipContent = value => {
- return props.marks[ value ]?.name || ''
+ return props.marks[ value ]?.name || props.marks[ value ]?.slug || ''
}
// Other necessary props for steps.
diff --git a/src/components/four-range-control/index.js b/src/components/four-range-control/index.js
index afb19b3bf4..73c05d3da5 100644
--- a/src/components/four-range-control/index.js
+++ b/src/components/four-range-control/index.js
@@ -339,7 +339,7 @@ const FourRangeControl = memo( props => {
]
}, [] )
newProps.renderTooltipContent = value => {
- return props.marks[ value ]?.name || ''
+ return props.marks[ value ]?.name || props.marks[ value ]?.slug || ''
}
// Other necessary props for steps.
From e853ebd73201120c9e78e6ee2ec5459a1dfd296d Mon Sep 17 00:00:00 2001
From: Alquen Sarmiento
Date: Tue, 27 May 2025 09:41:18 +0800
Subject: [PATCH 92/99] fix: bug fixes
---
.../advanced-range-control/index.js | 48 +++---
src/components/four-range-control/index.js | 150 +++++++++++++-----
src/global-settings.php | 20 ++-
3 files changed, 149 insertions(+), 69 deletions(-)
diff --git a/src/components/advanced-range-control/index.js b/src/components/advanced-range-control/index.js
index c8dc8a47fc..dbfc373777 100644
--- a/src/components/advanced-range-control/index.js
+++ b/src/components/advanced-range-control/index.js
@@ -118,19 +118,20 @@ const AdvancedRangeControl = props => {
// If no initial value, use the given default from the settings
const [ isMarkMode, setIsMarkMode ] = useState( false )
- // Set the markMode when at first render and when device type changes
- useEffect( () => {
- let isMarkValue = !! props.marks && isMarkModeDefault
- if ( props.marks && derivedValue ) {
+ let isMarkValue = !! props.marks && isMarkModeDefault
+ if ( props.marks && derivedValue ) {
// Check if the current value exists in the marks only by their CSS variable name
// to match in case the fallback size changes.
- const derivedValueCssVarName = getCSSVarName( derivedValue )
- const matchedMark = props.marks.find( mark => getCSSVarName( mark.value ) === derivedValueCssVarName )
- isMarkValue = !! matchedMark
- if ( matchedMark ) {
- derivedValue = matchedMark.value
- }
+ const derivedValueCssVarName = getCSSVarName( derivedValue )
+ const matchedMark = props.marks.find( mark => getCSSVarName( mark.value ) === derivedValueCssVarName )
+ isMarkValue = !! matchedMark
+ if ( matchedMark ) {
+ derivedValue = matchedMark.value
}
+ }
+
+ // Set the markMode when device type changes
+ useEffect( () => {
setIsMarkMode( isMarkValue )
}, [ deviceType ] )
@@ -202,18 +203,8 @@ const AdvancedRangeControl = props => {
let rangeOnChange = _onChange
if ( isMarkMode ) {
rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
- // If the derivedValue is a CSS variable, compare with mark's CSS variable.
- // Otherwise, the derivedValue is custom, so compare with raw size and units
- if ( typeof derivedValue === 'string' && derivedValue.startsWith( 'var' ) ) {
- [ _value, _unit ] = extractNumbersAndUnits( mark.value )[ 0 ]
- } else {
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
- }
- return _value === derivedValue && ( _unit === '' || _unit === unit )
+ const [ _value, _unit ] = extractNumbersAndUnits( mark.value )[ 0 ]
+ return _value === derivedValue
} )
rangeOnChange = ( value, property = 'value' ) => {
if ( value === '' ) {
@@ -266,6 +257,19 @@ const AdvancedRangeControl = props => {
// Set the value when changing from mark mode to custom
if ( isMarkMode && rangeValue !== -1 ) {
rangeOnChange( rangeValue, 'size' )
+ } else {
+ const rangeValue = props.marks.findIndex( mark => {
+ let _unit, _value
+
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ const converted = convertToPxIfUnsupported( props.units, _unit, _value )
+ _value = converted.value
+ _unit = converted.unit
+
+ return _value === derivedValue && ( _unit === '' || _unit === unit )
+ } )
+ const markValue = props.marks[ rangeValue ]?.value || '0'
+ _onChange( markValue )
}
setIsMarkMode( ! isMarkMode )
} }
diff --git a/src/components/four-range-control/index.js b/src/components/four-range-control/index.js
index 73c05d3da5..644ffef0e5 100644
--- a/src/components/four-range-control/index.js
+++ b/src/components/four-range-control/index.js
@@ -191,39 +191,40 @@ const FourRangeControl = memo( props => {
const [ isFourMarkMode, setIsFourMarkMode ] = useState( false )
- // Set the markMode when at first render and when device type changes
- useEffect( () => {
- // Is value at first render the same as a step value? If so, do mark mode
- // at the start, or show custom
- // If no initial value, use the given default from the settings
- const isMarkValue = {
- first: !! props.marks && isMarkModeDefault,
- top: !! props.marks && isMarkModeDefault,
- right: !! props.marks && isMarkModeDefault,
- bottom: !! props.marks && isMarkModeDefault,
- left: !! props.marks && isMarkModeDefault,
+ // Is value at first render the same as a step value? If so, do mark mode
+ // at the start, or show custom
+ // If no initial value, use the given default from the settings
+ const isMarkValue = {
+ first: !! props.marks && isMarkModeDefault,
+ top: !! props.marks && isMarkModeDefault,
+ right: !! props.marks && isMarkModeDefault,
+ bottom: !! props.marks && isMarkModeDefault,
+ left: !! props.marks && isMarkModeDefault,
+ }
+
+ if ( props.marks && firstValue ) {
+ // Check if the current value exists in the marks only by their CSS variable name
+ // to match in case the fallback size changes.
+ const firstValueCssVarName = getCSSVarName( firstValue )
+ const firstMatchedMark = props.marks.find( mark => getCSSVarName( mark.value ) === firstValueCssVarName )
+ isMarkValue.first = !! firstMatchedMark
+ if ( firstMatchedMark ) {
+ firstValue = firstMatchedMark.value
}
- if ( props.marks && firstValue ) {
- // Check if the current value exists in the marks only by their CSS variable name
- // to match in case the fallback size changes.
- const firstValueCssVarName = getCSSVarName( firstValue )
- const firstMatchedMark = props.marks.find( mark => getCSSVarName( mark.value ) === firstValueCssVarName )
- isMarkValue.first = !! firstMatchedMark
- if ( firstMatchedMark ) {
- firstValue = firstMatchedMark.value
+ [ 'top', 'right', 'bottom', 'left' ].forEach( side => {
+ const sideCssVarName = getCSSVarName( value[ side ] )
+ const matchedMark = props.marks.find( mark => getCSSVarName( mark.value ) === sideCssVarName )
+ isMarkValue[ side ] = !! matchedMark
+ if ( matchedMark ) {
+ value[ side ] = matchedMark.value
}
+ } )
+ }
- [ 'top', 'right', 'bottom', 'left' ].forEach( side => {
- const sideCssVarName = getCSSVarName( value[ side ] )
- const matchedMark = props.marks.find( mark => getCSSVarName( mark.value ) === sideCssVarName )
- isMarkValue[ side ] = !! matchedMark
- if ( matchedMark ) {
- value[ side ] = matchedMark.value
- }
- } )
- setIsFourMarkMode( isMarkValue )
- }
+ // Set the markMode when device type changes
+ useEffect( () => {
+ setIsFourMarkMode( isMarkValue )
}, [ deviceType ] )
const onChangeAll = _newValue => {
@@ -359,18 +360,8 @@ const FourRangeControl = memo( props => {
let rangeOnChange = initialOnChange
if ( props.marks && isMarkMode ) {
rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
- // If the initialValue is a CSS variable, compare with mark's CSS variable.
- // Otherwise, the initialValue is custom, so compare with raw size and units
- if ( typeof initialValue === 'string' && initialValue.startsWith( 'var' ) ) {
- [ _value, _unit ] = extractNumbersAndUnits( mark.value )[ 0 ]
- } else {
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
- }
- return _value === initialValue && ( _unit === '' || _unit === unit )
+ const [ _value, _unit ] = extractNumbersAndUnits( mark.value )[ 0 ]
+ return _value === initialValue
} )
rangeOnChange = ( value, property = 'value' ) => {
if ( value === '' ) {
@@ -506,6 +497,17 @@ const FourRangeControl = memo( props => {
// Set the value when changing from mark mode to custom
if ( isFourMarkMode.first && rangeValueFirst !== -1 ) {
rangeOnChangeFirst( rangeValueFirst, 'size' )
+ } else {
+ const rangeValue = props.marks.findIndex( mark => {
+ let _unit, _value
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ const converted = convertToPxIfUnsupported( props.units, _unit, _value )
+ _value = converted.value
+ _unit = converted.unit
+ return _value === firstValue && ( ! unit || _unit === '' || _unit === unit )
+ } )
+ const markValue = props.marks[ rangeValue ]?.value || '0'
+ onChangeAll( markValue )
}
setIsFourMarkMode( prev => ( { ...prev, first: ! prev.first } ) )
} }
@@ -569,6 +571,17 @@ const FourRangeControl = memo( props => {
onClick={ () => {
if ( isFourMarkMode.top && rangeValueTop !== -1 ) {
rangeOnChangeTop( rangeValueTop, 'size' )
+ } else {
+ const rangeValue = props.marks.findIndex( mark => {
+ let _unit, _value
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ const converted = convertToPxIfUnsupported( props.units, _unit, _value )
+ _value = converted.value
+ _unit = converted.unit
+ return _value === value.top && ( ! unit || _unit === '' || _unit === unit )
+ } )
+ const markValue = props.marks[ rangeValue ]?.value || '0'
+ onChangeVertical( markValue )
}
setIsFourMarkMode( prev => ( { ...prev, top: ! prev.top } ) )
} }
@@ -628,6 +641,17 @@ const FourRangeControl = memo( props => {
onClick={ () => {
if ( isFourMarkMode.left && rangeValueLeft !== -1 ) {
rangeOnChangeLeft( rangeValueLeft, 'size' )
+ } else {
+ const rangeValue = props.marks.findIndex( mark => {
+ let _unit, _value
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ const converted = convertToPxIfUnsupported( props.units, _unit, _value )
+ _value = converted.value
+ _unit = converted.unit
+ return _value === value.left && ( ! unit || _unit === '' || _unit === unit )
+ } )
+ const markValue = props.marks[ rangeValue ]?.value || '0'
+ onChangeHorizontal( markValue )
}
setIsFourMarkMode( prev => ( { ...prev, left: ! prev.left } ) )
} }
@@ -693,6 +717,17 @@ const FourRangeControl = memo( props => {
onClick={ () => {
if ( isFourMarkMode.top && rangeValueTop !== -1 ) {
rangeOnChangeTop( rangeValueTop, 'size' )
+ } else {
+ const rangeValue = props.marks.findIndex( mark => {
+ let _unit, _value
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ const converted = convertToPxIfUnsupported( props.units, _unit, _value )
+ _value = converted.value
+ _unit = converted.unit
+ return _value === value.top && ( ! unit || _unit === '' || _unit === unit )
+ } )
+ const markValue = props.marks[ rangeValue ]?.value || '0'
+ onChangeTop( markValue )
}
setIsFourMarkMode( prev => ( { ...prev, top: ! prev.top } ) )
} }
@@ -755,6 +790,17 @@ const FourRangeControl = memo( props => {
onClick={ () => {
if ( isFourMarkMode.right && rangeValueRight !== -1 ) {
rangeOnChangeRight( rangeValueRight, 'size' )
+ } else {
+ const rangeValue = props.marks.findIndex( mark => {
+ let _unit, _value
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ const converted = convertToPxIfUnsupported( props.units, _unit, _value )
+ _value = converted.value
+ _unit = converted.unit
+ return _value === value.right && ( ! unit || _unit === '' || _unit === unit )
+ } )
+ const markValue = props.marks[ rangeValue ]?.value || '0'
+ onChangeRight( markValue )
}
setIsFourMarkMode( prev => ( { ...prev, right: ! prev.right } ) )
} }
@@ -817,6 +863,17 @@ const FourRangeControl = memo( props => {
onClick={ () => {
if ( isFourMarkMode.bottom && rangeValueBottom !== -1 ) {
rangeOnChangeBottom( rangeValueBottom, 'size' )
+ } else {
+ const rangeValue = props.marks.findIndex( mark => {
+ let _unit, _value
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ const converted = convertToPxIfUnsupported( props.units, _unit, _value )
+ _value = converted.value
+ _unit = converted.unit
+ return _value === value.bottom && ( ! unit || _unit === '' || _unit === unit )
+ } )
+ const markValue = props.marks[ rangeValue ]?.value || '0'
+ onChangeBottom( markValue )
}
setIsFourMarkMode( prev => ( { ...prev, bottom: ! prev.bottom } ) )
} }
@@ -879,6 +936,17 @@ const FourRangeControl = memo( props => {
onClick={ () => {
if ( isFourMarkMode.left && rangeValueLeft !== -1 ) {
rangeOnChangeLeft( rangeValueLeft, 'size' )
+ } else {
+ const rangeValue = props.marks.findIndex( mark => {
+ let _unit, _value
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ const converted = convertToPxIfUnsupported( props.units, _unit, _value )
+ _value = converted.value
+ _unit = converted.unit
+ return _value === value.left && ( ! unit || _unit === '' || _unit === unit )
+ } )
+ const markValue = props.marks[ rangeValue ]?.value || '0'
+ onChangeLeft( markValue )
}
setIsFourMarkMode( prev => ( { ...prev, left: ! prev.left } ) )
} }
diff --git a/src/global-settings.php b/src/global-settings.php
index f2571a3133..490aff3f1f 100644
--- a/src/global-settings.php
+++ b/src/global-settings.php
@@ -697,6 +697,14 @@ public function form_paragraph_selector() {
return $selectors;
}
+ public function clean_font_size( $font_size, $font_size_unit = '' ) {
+ if ( is_string( $font_size ) && str_starts_with( $font_size, 'var' ) ) {
+ return $font_size;
+ }
+
+ return $font_size . $font_size_unit;
+ }
+
/**
* Creates a CSS style rule with an added !important if necessary.
*
@@ -753,7 +761,7 @@ public function generate_typography_styles( $selector, $styles ) {
$css['desktop'][] = $this->create_style( 'font-family', $this->get_font_family( $styles['fontFamily'] ) );
}
if ( isset( $styles['fontSize'] ) ) {
- $css['desktop'][] = $this->create_style( 'font-size', $styles['fontSize'] . $styles['fontSizeUnit'] );
+ $css['desktop'][] = $this->create_style( 'font-size', $this->clean_font_size( $styles['fontSize'], $styles['fontSizeUnit'] ) );
}
if ( isset( $styles['fontWeight'] ) ) {
$css['desktop'][] = $this->create_style( 'font-weight', $styles['fontWeight'] );
@@ -782,12 +790,12 @@ public function generate_typography_styles( $selector, $styles ) {
if ( isset( $styles['fontSize'] ) ) {
$clamp_desktop_value = $this->clamp_inherited_style( $styles['fontSize'], $inherit_max );
if ( ! empty( $clamp_desktop_value ) ) {
- $font_size = $this->create_style( 'font-size', $clamp_desktop_value . $styles['fontSizeUnit'] );
+ $font_size = $this->create_style( 'font-size', $this->clean_font_size( $clamp_desktop_value . $styles['fontSizeUnit'] ) );
}
}
}
if ( isset( $styles['tabletFontSize'] ) ) {
- $font_size = $this->create_style( 'font-size', $styles['tabletFontSize'] . $styles['tabletFontSizeUnit'] );
+ $font_size = $this->create_style( 'font-size', $this->clean_font_size( $styles['tabletFontSize'], $styles['tabletFontSizeUnit'] ) );
}
if ( ! empty( $font_size ) ) {
$css['tablet'][] = $font_size;
@@ -810,7 +818,7 @@ public function generate_typography_styles( $selector, $styles ) {
if ( isset( $styles['fontSize'] ) ) {
$clamp_desktop_value = $this->clamp_inherited_style( $styles['fontSize'], $inherit_max );
if ( ! empty( $clamp_desktop_value ) ) {
- $font_size = $this->create_style( 'font-size', $clamp_desktop_value . $styles['fontSizeUnit'] );
+ $font_size = $this->create_style( 'font-size', $this->clean_font_size( $clamp_desktop_value, $styles['fontSizeUnit'] ) );
}
}
@@ -818,7 +826,7 @@ public function generate_typography_styles( $selector, $styles ) {
if ( isset( $styles['tabletFontSize'] ) ) {
$clamp_tablet_value = $this->clamp_inherited_style( $styles['tabletFontSize'], $inherit_max );
if ( ! empty( $clamp_tablet_value ) ) {
- $font_size = $this->create_style( 'font-size', $clamp_tablet_value . $styles['tabletFontSizeUnit'] );
+ $font_size = $this->create_style( $this->clean_font_size( 'font-size', $clamp_tablet_value, $styles['tabletFontSizeUnit'] ) );
}
}
if ( empty( $clamp_tablet_value ) ) {
@@ -831,7 +839,7 @@ public function generate_typography_styles( $selector, $styles ) {
}
}
if ( isset( $styles['mobileFontSize'] ) ) {
- $font_size = $this->create_style( 'font-size', $styles['mobileFontSize'] . $styles['mobileFontSizeUnit'] );
+ $font_size = $this->create_style( 'font-size', $this->clean_font_size( $styles['mobileFontSize'], $styles['mobileFontSizeUnit'] ) );
}
if ( ! empty( $font_size ) ) {
$css['mobile'][] = $font_size;
From 3a660e2d07451ad5468bfa751218ecac911f37a1 Mon Sep 17 00:00:00 2001
From: Alquen Sarmiento
Date: Tue, 27 May 2025 17:49:52 +0800
Subject: [PATCH 93/99] fix: bug fix
---
src/global-settings.php | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/global-settings.php b/src/global-settings.php
index 490aff3f1f..2859bb62a2 100644
--- a/src/global-settings.php
+++ b/src/global-settings.php
@@ -790,7 +790,7 @@ public function generate_typography_styles( $selector, $styles ) {
if ( isset( $styles['fontSize'] ) ) {
$clamp_desktop_value = $this->clamp_inherited_style( $styles['fontSize'], $inherit_max );
if ( ! empty( $clamp_desktop_value ) ) {
- $font_size = $this->create_style( 'font-size', $this->clean_font_size( $clamp_desktop_value . $styles['fontSizeUnit'] ) );
+ $font_size = $this->create_style( 'font-size', $this->clean_font_size( $clamp_desktop_value, $styles['fontSizeUnit'] ) );
}
}
}
@@ -898,7 +898,7 @@ public function get_font_family( $font_name ) {
* @param {Object} options
*/
public function clamp_inherited_style( $value, $max = 999999, $min = -999999 ) {
- if ( isset( $value ) ) {
+ if ( isset( $value ) && is_numeric( $value ) ) {
$clamped_value = max( $min, min( $max, $value ) );
return $clamped_value !== $value ? $clamped_value : null;
}
From 218c7b6117c72b2619495351874b8b31e19079e6 Mon Sep 17 00:00:00 2001
From: Alquen Sarmiento
Date: Tue, 27 May 2025 21:58:46 +0800
Subject: [PATCH 94/99] fix: four range reactivity
---
src/components/four-range-control/index.js | 43 ++++++++++++++--------
1 file changed, 28 insertions(+), 15 deletions(-)
diff --git a/src/components/four-range-control/index.js b/src/components/four-range-control/index.js
index 644ffef0e5..0d0c191d0d 100644
--- a/src/components/four-range-control/index.js
+++ b/src/components/four-range-control/index.js
@@ -494,8 +494,10 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- // Set the value when changing from mark mode to custom
- if ( isFourMarkMode.first && rangeValueFirst !== -1 ) {
+ const previousMarkMode = isFourMarkMode.first
+ setIsFourMarkMode( prev => ( { ...prev, first: ! prev.first } ) )
+
+ if ( previousMarkMode && rangeValueFirst !== -1 ) {
rangeOnChangeFirst( rangeValueFirst, 'size' )
} else {
const rangeValue = props.marks.findIndex( mark => {
@@ -509,7 +511,6 @@ const FourRangeControl = memo( props => {
const markValue = props.marks[ rangeValue ]?.value || '0'
onChangeAll( markValue )
}
- setIsFourMarkMode( prev => ( { ...prev, first: ! prev.first } ) )
} }
icon={ settings }
>
@@ -569,7 +570,10 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- if ( isFourMarkMode.top && rangeValueTop !== -1 ) {
+ const previousMarkMode = isFourMarkMode.top
+ setIsFourMarkMode( prev => ( { ...prev, top: ! prev.top } ) )
+
+ if ( previousMarkMode && rangeValueTop !== -1 ) {
rangeOnChangeTop( rangeValueTop, 'size' )
} else {
const rangeValue = props.marks.findIndex( mark => {
@@ -583,7 +587,6 @@ const FourRangeControl = memo( props => {
const markValue = props.marks[ rangeValue ]?.value || '0'
onChangeVertical( markValue )
}
- setIsFourMarkMode( prev => ( { ...prev, top: ! prev.top } ) )
} }
icon={ settings }
>
@@ -639,7 +642,10 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- if ( isFourMarkMode.left && rangeValueLeft !== -1 ) {
+ const previousMarkMode = isFourMarkMode.left
+ setIsFourMarkMode( prev => ( { ...prev, left: ! prev.left } ) )
+
+ if ( previousMarkMode && rangeValueLeft !== -1 ) {
rangeOnChangeLeft( rangeValueLeft, 'size' )
} else {
const rangeValue = props.marks.findIndex( mark => {
@@ -653,7 +659,6 @@ const FourRangeControl = memo( props => {
const markValue = props.marks[ rangeValue ]?.value || '0'
onChangeHorizontal( markValue )
}
- setIsFourMarkMode( prev => ( { ...prev, left: ! prev.left } ) )
} }
icon={ settings }
>
@@ -715,7 +720,10 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- if ( isFourMarkMode.top && rangeValueTop !== -1 ) {
+ const previousMarkMode = isFourMarkMode.top
+ setIsFourMarkMode( prev => ( { ...prev, top: ! prev.top } ) )
+
+ if ( previousMarkMode && rangeValueTop !== -1 ) {
rangeOnChangeTop( rangeValueTop, 'size' )
} else {
const rangeValue = props.marks.findIndex( mark => {
@@ -729,7 +737,6 @@ const FourRangeControl = memo( props => {
const markValue = props.marks[ rangeValue ]?.value || '0'
onChangeTop( markValue )
}
- setIsFourMarkMode( prev => ( { ...prev, top: ! prev.top } ) )
} }
icon={ settings }
>
@@ -788,7 +795,10 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- if ( isFourMarkMode.right && rangeValueRight !== -1 ) {
+ const previousMarkMode = isFourMarkMode.right
+ setIsFourMarkMode( prev => ( { ...prev, right: ! prev.right } ) )
+
+ if ( previousMarkMode && rangeValueRight !== -1 ) {
rangeOnChangeRight( rangeValueRight, 'size' )
} else {
const rangeValue = props.marks.findIndex( mark => {
@@ -802,7 +812,6 @@ const FourRangeControl = memo( props => {
const markValue = props.marks[ rangeValue ]?.value || '0'
onChangeRight( markValue )
}
- setIsFourMarkMode( prev => ( { ...prev, right: ! prev.right } ) )
} }
icon={ settings }
>
@@ -861,7 +870,10 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- if ( isFourMarkMode.bottom && rangeValueBottom !== -1 ) {
+ const previousMarkMode = isFourMarkMode.bottom
+ setIsFourMarkMode( prev => ( { ...prev, bottom: ! prev.bottom } ) )
+
+ if ( previousMarkMode && rangeValueBottom !== -1 ) {
rangeOnChangeBottom( rangeValueBottom, 'size' )
} else {
const rangeValue = props.marks.findIndex( mark => {
@@ -875,7 +887,6 @@ const FourRangeControl = memo( props => {
const markValue = props.marks[ rangeValue ]?.value || '0'
onChangeBottom( markValue )
}
- setIsFourMarkMode( prev => ( { ...prev, bottom: ! prev.bottom } ) )
} }
icon={ settings }
>
@@ -934,7 +945,10 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- if ( isFourMarkMode.left && rangeValueLeft !== -1 ) {
+ const previousMarkMode = isFourMarkMode.left
+ setIsFourMarkMode( prev => ( { ...prev, left: ! prev.left } ) )
+
+ if ( previousMarkMode && rangeValueLeft !== -1 ) {
rangeOnChangeLeft( rangeValueLeft, 'size' )
} else {
const rangeValue = props.marks.findIndex( mark => {
@@ -948,7 +962,6 @@ const FourRangeControl = memo( props => {
const markValue = props.marks[ rangeValue ]?.value || '0'
onChangeLeft( markValue )
}
- setIsFourMarkMode( prev => ( { ...prev, left: ! prev.left } ) )
} }
icon={ settings }
>
From 6ed023be261934a63a4573fa946bca2bfd95557f Mon Sep 17 00:00:00 2001
From: Alquen Sarmiento
Date: Wed, 28 May 2025 14:09:21 +0800
Subject: [PATCH 95/99] fix: do not actually change value when switching mode
---
.../advanced-range-control/index.js | 57 ++++--
src/components/four-range-control/index.js | 175 ++++++------------
2 files changed, 95 insertions(+), 137 deletions(-)
diff --git a/src/components/advanced-range-control/index.js b/src/components/advanced-range-control/index.js
index dbfc373777..874d1c52ed 100644
--- a/src/components/advanced-range-control/index.js
+++ b/src/components/advanced-range-control/index.js
@@ -26,7 +26,7 @@ import { settings as stackableSettings } from 'stackable'
* WordPress dependencies
*/
import {
- memo, useState, useEffect,
+ memo, useState, useEffect, useRef,
} from '@wordpress/element'
import { Button } from '@wordpress/components'
import { settings } from '@wordpress/icons'
@@ -117,6 +117,8 @@ const AdvancedRangeControl = props => {
// at the start, or show custom
// If no initial value, use the given default from the settings
const [ isMarkMode, setIsMarkMode ] = useState( false )
+ // Ensure the convesion of value from preset to custom with regards to the unit is donce once.
+ const isConversionDone = useRef( false )
let isMarkValue = !! props.marks && isMarkModeDefault
if ( props.marks && derivedValue ) {
@@ -203,8 +205,16 @@ const AdvancedRangeControl = props => {
let rangeOnChange = _onChange
if ( isMarkMode ) {
rangeValue = props.marks.findIndex( mark => {
- const [ _value, _unit ] = extractNumbersAndUnits( mark.value )[ 0 ]
- return _value === derivedValue
+ let _unit, _value
+ // If the derivedValue is a CSS variable, compare with mark's CSS variable.
+ // Otherwise, the derivedValue is custom from the previous switch from custom to preset mode,
+ // so compare with raw size and units to convert to preset.
+ if ( typeof derivedValue === 'string' && derivedValue.startsWith( 'var' ) ) {
+ [ _value, _unit ] = extractNumbersAndUnits( mark.value )[ 0 ]
+ } else {
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ }
+ return _value === derivedValue && ( _unit === '' || _unit === unit )
} )
rangeOnChange = ( value, property = 'value' ) => {
if ( value === '' ) {
@@ -230,6 +240,30 @@ const AdvancedRangeControl = props => {
}
_onChange( newValue )
+ isConversionDone.current = false
+ }
+ } else if ( typeof derivedValue === 'string' && derivedValue.startsWith( 'var' ) ) {
+ // If the derivedValue is a preset and currently not in mark mode, the derivedValue is from
+ // the previous switch from preset to custom mode. Convert to custom.
+ const currentSize = props.marks.find( mark => {
+ return derivedValue === mark.value
+ } )?.size
+ const [ _newValue, _unit ] = extractNumbersAndUnits( currentSize )[ 0 ]
+ rangeValue = _newValue
+
+ if ( _unit && ! isConversionDone.current ) {
+ dispatch( 'core/block-editor' ).__unstableMarkNextChangeAsNotPersistent()
+ setAttributes( { [ unitAttrName ]: _unit } )
+ if ( props.onChangeUnit ) {
+ props.onChangeUnit( _unit )
+ }
+ isConversionDone.current = true
+ }
+ // Since the actual previous value is a preset, force the new custom value
+ // when changing unit
+ controlProps.onChangeUnit = ( unit, unitAttrName ) => {
+ setAttributes( { [ unitAttrName ]: unit } )
+ _onChange( _newValue )
}
}
@@ -254,23 +288,6 @@ const AdvancedRangeControl = props => {
size="small"
variant="tertiary"
onClick={ () => {
- // Set the value when changing from mark mode to custom
- if ( isMarkMode && rangeValue !== -1 ) {
- rangeOnChange( rangeValue, 'size' )
- } else {
- const rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
-
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
-
- return _value === derivedValue && ( _unit === '' || _unit === unit )
- } )
- const markValue = props.marks[ rangeValue ]?.value || '0'
- _onChange( markValue )
- }
setIsMarkMode( ! isMarkMode )
} }
icon={ settings }
diff --git a/src/components/four-range-control/index.js b/src/components/four-range-control/index.js
index 0d0c191d0d..132deb5897 100644
--- a/src/components/four-range-control/index.js
+++ b/src/components/four-range-control/index.js
@@ -25,7 +25,7 @@ import { useControlHandlers } from '../base-control2/hooks'
import { Tooltip } from '@wordpress/components'
import { __ } from '@wordpress/i18n'
import {
- Fragment, useState, memo, useEffect,
+ Fragment, useState, memo, useEffect, useRef,
} from '@wordpress/element'
import { settings } from '@wordpress/icons'
import { dispatch } from '@wordpress/data'
@@ -190,6 +190,16 @@ const FourRangeControl = memo( props => {
: { desktop: _valueDesktop?.left, tablet: _valueTablet?.left }
const [ isFourMarkMode, setIsFourMarkMode ] = useState( false )
+ // Ensure the convesion of value from preset to custom with regards to the unit is donce once.
+ const isConversionDone = useRef( {
+ first: false,
+ top: false,
+ right: false,
+ bottom: false,
+ left: false,
+ vertical: false,
+ horizontal: false,
+ } )
// Is value at first render the same as a step value? If so, do mark mode
// at the start, or show custom
@@ -318,7 +328,7 @@ const FourRangeControl = memo( props => {
} ) )
}
// Support for steps. Modify the props to make the range control show steps.
- const stepSupport = ( isMarkMode, initialValue, initialOnChange ) => {
+ const stepSupport = ( isMarkMode, initialValue, initialOnChange, conversionKey = null ) => {
const newProps = { ...propsToPass }
if ( props.marks && isMarkMode ) {
@@ -360,8 +370,16 @@ const FourRangeControl = memo( props => {
let rangeOnChange = initialOnChange
if ( props.marks && isMarkMode ) {
rangeValue = props.marks.findIndex( mark => {
- const [ _value, _unit ] = extractNumbersAndUnits( mark.value )[ 0 ]
- return _value === initialValue
+ let _unit, _value
+ // If the initialValue is a CSS variable, compare with mark's CSS variable.
+ // Otherwise, the initialValue is custom from the previous switch from custom to preset mode,
+ // so compare with raw size and units to convert to preset.
+ if ( typeof initialValue === 'string' && initialValue.startsWith( 'var' ) ) {
+ [ _value, _unit ] = extractNumbersAndUnits( mark.value )[ 0 ]
+ } else {
+ [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
+ }
+ return _value === initialValue && ( _unit === '' || _unit === unit )
} )
rangeOnChange = ( value, property = 'value' ) => {
if ( value === '' ) {
@@ -388,11 +406,39 @@ const FourRangeControl = memo( props => {
}
initialOnChange( newValue )
+ isConversionDone.current[ conversionKey ] = false
+ }
+ } else if ( typeof initialValue === 'string' && initialValue.startsWith( 'var' ) &&
+ ( ( isLocked && conversionKey === 'first' ) ||
+ ( ! isLocked && [ 'top', 'right', 'left', 'bottom' ].includes( conversionKey ) ) ||
+ ( isLocked && props.vhMode && [ 'vertical', 'horizontal' ].includes( conversionKey ) ) )
+ ) {
+ // If the derivedValue is a preset and currently not in mark mode, the derivedValue is from
+ // the previous switch from preset to custom mode. Convert to custom.
+ const currentSize = props.marks.find( mark => {
+ return initialValue === mark.value
+ } )?.size
+ const [ _newValue, _unit ] = extractNumbersAndUnits( currentSize )[ 0 ]
+ rangeValue = _newValue
+
+ if ( _unit && conversionKey && ! isConversionDone.current[ conversionKey ] ) {
+ isConversionDone.current[ conversionKey ] = true
+ dispatch( 'core/block-editor' ).__unstableMarkNextChangeAsNotPersistent()
+ setAttributes( { [ unitAttrName ]: _unit } )
+ if ( props.onChangeUnit ) {
+ props.onChangeUnit( _unit )
+ }
+ }
+ // Since the actual previous value is a preset, force the new custom value
+ // when changing unit
+ controlProps.onChangeUnit = ( unit, unitAttrName ) => {
+ initialOnChange( _newValue )
+ setAttributes( { [ unitAttrName ]: unit } )
}
}
return [
- newProps, rangeValue, rangeOnChange,
+ newProps, parseFloat( rangeValue ), rangeOnChange,
]
}
@@ -413,42 +459,49 @@ const FourRangeControl = memo( props => {
isFourMarkMode.first,
firstValue,
onChangeAll,
+ 'first',
)
const [ propsToPassTop, rangeValueTop, rangeOnChangeTop ] = stepSupport(
isFourMarkMode.top,
value.top,
onChangeTop,
+ 'top'
)
const [ propsToPassRight, rangeValueRight, rangeOnChangeRight ] = stepSupport(
isFourMarkMode.right,
value.right,
onChangeRight,
+ 'right'
)
const [ propsToPassBottom, rangeValueBottom, rangeOnChangeBottom ] = stepSupport(
isFourMarkMode.bottom,
value.bottom,
onChangeBottom,
+ 'bottom'
)
const [ propsToPassLeft, rangeValueLeft, rangeOnChangeLeft ] = stepSupport(
isFourMarkMode.left,
value.left,
onChangeLeft,
+ 'left'
)
const [ propsToPassVertical, rangeValueVertical, rangeOnChangeVertical ] = stepSupport(
isFourMarkMode.top,
value.top,
onChangeVertical,
+ 'vertical'
)
const [ propsToPassHorizontal, rangeValueHorizontal, rangeOnChangeHorizontal ] = stepSupport(
isFourMarkMode.left,
value.left,
onChangeHorizontal,
+ 'horizontal'
)
return (
@@ -494,23 +547,7 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- const previousMarkMode = isFourMarkMode.first
setIsFourMarkMode( prev => ( { ...prev, first: ! prev.first } ) )
-
- if ( previousMarkMode && rangeValueFirst !== -1 ) {
- rangeOnChangeFirst( rangeValueFirst, 'size' )
- } else {
- const rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
- return _value === firstValue && ( ! unit || _unit === '' || _unit === unit )
- } )
- const markValue = props.marks[ rangeValue ]?.value || '0'
- onChangeAll( markValue )
- }
} }
icon={ settings }
>
@@ -570,23 +607,7 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- const previousMarkMode = isFourMarkMode.top
setIsFourMarkMode( prev => ( { ...prev, top: ! prev.top } ) )
-
- if ( previousMarkMode && rangeValueTop !== -1 ) {
- rangeOnChangeTop( rangeValueTop, 'size' )
- } else {
- const rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
- return _value === value.top && ( ! unit || _unit === '' || _unit === unit )
- } )
- const markValue = props.marks[ rangeValue ]?.value || '0'
- onChangeVertical( markValue )
- }
} }
icon={ settings }
>
@@ -642,23 +663,7 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- const previousMarkMode = isFourMarkMode.left
setIsFourMarkMode( prev => ( { ...prev, left: ! prev.left } ) )
-
- if ( previousMarkMode && rangeValueLeft !== -1 ) {
- rangeOnChangeLeft( rangeValueLeft, 'size' )
- } else {
- const rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
- return _value === value.left && ( ! unit || _unit === '' || _unit === unit )
- } )
- const markValue = props.marks[ rangeValue ]?.value || '0'
- onChangeHorizontal( markValue )
- }
} }
icon={ settings }
>
@@ -720,23 +725,7 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- const previousMarkMode = isFourMarkMode.top
setIsFourMarkMode( prev => ( { ...prev, top: ! prev.top } ) )
-
- if ( previousMarkMode && rangeValueTop !== -1 ) {
- rangeOnChangeTop( rangeValueTop, 'size' )
- } else {
- const rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
- return _value === value.top && ( ! unit || _unit === '' || _unit === unit )
- } )
- const markValue = props.marks[ rangeValue ]?.value || '0'
- onChangeTop( markValue )
- }
} }
icon={ settings }
>
@@ -795,23 +784,7 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- const previousMarkMode = isFourMarkMode.right
setIsFourMarkMode( prev => ( { ...prev, right: ! prev.right } ) )
-
- if ( previousMarkMode && rangeValueRight !== -1 ) {
- rangeOnChangeRight( rangeValueRight, 'size' )
- } else {
- const rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
- return _value === value.right && ( ! unit || _unit === '' || _unit === unit )
- } )
- const markValue = props.marks[ rangeValue ]?.value || '0'
- onChangeRight( markValue )
- }
} }
icon={ settings }
>
@@ -870,23 +843,7 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- const previousMarkMode = isFourMarkMode.bottom
setIsFourMarkMode( prev => ( { ...prev, bottom: ! prev.bottom } ) )
-
- if ( previousMarkMode && rangeValueBottom !== -1 ) {
- rangeOnChangeBottom( rangeValueBottom, 'size' )
- } else {
- const rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
- return _value === value.bottom && ( ! unit || _unit === '' || _unit === unit )
- } )
- const markValue = props.marks[ rangeValue ]?.value || '0'
- onChangeBottom( markValue )
- }
} }
icon={ settings }
>
@@ -945,23 +902,7 @@ const FourRangeControl = memo( props => {
size="small"
variant="tertiary"
onClick={ () => {
- const previousMarkMode = isFourMarkMode.left
setIsFourMarkMode( prev => ( { ...prev, left: ! prev.left } ) )
-
- if ( previousMarkMode && rangeValueLeft !== -1 ) {
- rangeOnChangeLeft( rangeValueLeft, 'size' )
- } else {
- const rangeValue = props.marks.findIndex( mark => {
- let _unit, _value
- [ _value, _unit ] = extractNumbersAndUnits( mark.size )[ 0 ]
- const converted = convertToPxIfUnsupported( props.units, _unit, _value )
- _value = converted.value
- _unit = converted.unit
- return _value === value.left && ( ! unit || _unit === '' || _unit === unit )
- } )
- const markValue = props.marks[ rangeValue ]?.value || '0'
- onChangeLeft( markValue )
- }
} }
icon={ settings }
>
From c158a407b980608493be1077918d3f2f477ffd66 Mon Sep 17 00:00:00 2001
From: Alquen Sarmiento
Date: Thu, 29 May 2025 16:27:15 +0800
Subject: [PATCH 96/99] fix: add presets to contentHeight and innerBlockRowGap
---
src/block-components/alignment/attributes.js | 23 ++++++++--
.../alignment/deprecated/index.js | 44 +++++++++++++++++++
src/block-components/alignment/edit.js | 6 +++
src/block-components/alignment/index.js | 2 +
src/block-components/alignment/style.js | 32 ++++++++++++--
.../advanced-range-control/index.js | 11 ++++-
src/components/four-range-control/index.js | 11 ++++-
7 files changed, 118 insertions(+), 11 deletions(-)
create mode 100644 src/block-components/alignment/deprecated/index.js
diff --git a/src/block-components/alignment/attributes.js b/src/block-components/alignment/attributes.js
index 7c635d8691..1f3ba27f4b 100644
--- a/src/block-components/alignment/attributes.js
+++ b/src/block-components/alignment/attributes.js
@@ -1,4 +1,8 @@
-export const addAttributes = attrObject => {
+import { deprecatedAddAttributes } from './deprecated/index'
+
+export const addAttributes = ( attrObject, attrNameTemplate = '%s' ) => {
+ deprecatedAddAttributes( attrObject, attrNameTemplate )
+
// Assume that the block uses the BlockDiv Block Component and has a
// uniqueId attribute
attrObject.add( {
@@ -53,13 +57,26 @@ export const addAttributes = attrObject => {
type: 'number',
default: '',
},
+ },
+ versionAdded: '3.0.0',
+ versionDeprecated: '',
+ } )
+
+ attrObject.add( {
+ attributes: {
innerBlockRowGap: {
stkResponsive: true,
- type: 'number',
+ type: 'string',
+ default: '',
+ },
+ containerHeight: {
+ stkResponsive: true,
+ type: 'string',
default: '',
},
},
- versionAdded: '3.0.0',
+ attrNameTemplate,
+ versionAdded: '3.15.3',
versionDeprecated: '',
} )
}
diff --git a/src/block-components/alignment/deprecated/index.js b/src/block-components/alignment/deprecated/index.js
new file mode 100644
index 0000000000..5bc82ac2ac
--- /dev/null
+++ b/src/block-components/alignment/deprecated/index.js
@@ -0,0 +1,44 @@
+import { getAttrNameFunction } from '~stackable/util'
+
+export const deprecatedAddAttributes = ( attrObject, attrNameTemplate = '%s' ) => {
+ attrObject.add( {
+ attributes: {
+ innerBlockRowGap: {
+ stkResponsive: true,
+ type: 'number',
+ default: '',
+ },
+ },
+ attrNameTemplate,
+ versionAdded: '3.0.0',
+ versionDeprecated: '3.15.3',
+ } )
+}
+
+export const deprecateInnerBlockRowGapAndContainerHeight = {
+ isEligible: attrNameTemplate => attributes => {
+ const getAttrName = getAttrNameFunction( attrNameTemplate )
+ const getAttribute = _attrName => attributes[ getAttrName( _attrName ) ]
+
+ const containerHeight = getAttribute( 'containerHeight' )
+ const innerBlockRowGap = getAttribute( 'innerBlockRowGap' )
+
+ return typeof containerHeight === 'number' || typeof innerBlockRowGap === 'number'
+ },
+ migrate: attrNameTemplate => attributes => {
+ const getAttrName = getAttrNameFunction( attrNameTemplate )
+ const getAttribute = _attrName => attributes[ getAttrName( _attrName ) ]
+
+ const containerHeight = getAttribute( 'containerHeight' )
+ const innerBlockRowGap = getAttribute( 'innerBlockRowGap' )
+
+ const newAttributes = {
+ ...attributes,
+ [ getAttrName( 'containerHeight' ) ]: String( containerHeight ),
+ [ getAttrName( 'innerBlockRowGap' ) ]: String( innerBlockRowGap ),
+ }
+
+ return newAttributes
+ },
+}
+
diff --git a/src/block-components/alignment/edit.js b/src/block-components/alignment/edit.js
index dd02239e32..a6efa2435d 100644
--- a/src/block-components/alignment/edit.js
+++ b/src/block-components/alignment/edit.js
@@ -13,6 +13,7 @@ import {
useBlockAttributesContext,
useBlockSetAttributesContext,
useDeviceType,
+ usePresetControls,
} from '~stackable/hooks'
/**
@@ -86,6 +87,9 @@ export const Edit = memo( props => {
enableContentAlign = true,
} = props
+ const blockHeightMarks = usePresetControls( 'blockHeights' )?.getPresetMarks() || null
+ const spacingSizeMarks = usePresetControls( 'spacingSizes' )?.getPresetMarks() || null
+
const containerSize = props.hasContainerSize && <>
{ props.hasContainerHeight &&
@@ -100,6 +104,7 @@ export const Edit = memo( props => {
allowReset={ true }
placeholder="0"
visualGuide={ { selector: '.stk-%s-container', highlight: 'outline' } }
+ marks={ blockHeightMarks }
/>
}
{
highlight: 'row-gap',
value: innerBlockRowGap,
} }
+ marks={ spacingSizeMarks }
/>
}
{ ( innerBlockOrientation && innerBlockWrap === 'wrap' ) &&
diff --git a/src/block-components/alignment/index.js b/src/block-components/alignment/index.js
index b5c242a374..08e242a83f 100644
--- a/src/block-components/alignment/index.js
+++ b/src/block-components/alignment/index.js
@@ -4,6 +4,8 @@ import { addStyles } from './style'
export * from './use-alignment'
+export { deprecateInnerBlockRowGapAndContainerHeight } from './deprecated/index'
+
export const Alignment = () => {
return null
}
diff --git a/src/block-components/alignment/style.js b/src/block-components/alignment/style.js
index 5efa60abf9..7b7258a680 100644
--- a/src/block-components/alignment/style.js
+++ b/src/block-components/alignment/style.js
@@ -211,8 +211,14 @@ export const addStyles = ( blockStyleGenerator, props = {} ) => {
styleRule: 'columnGap',
attrName: 'innerBlockColumnGap',
key: 'innerBlockColumnGapEdit',
- format: `%spx`,
responsive: 'all',
+ valueCallback: value => {
+ // Substitute with using format to work with preset controls
+ if ( typeof value === 'string' && value.startsWith( 'var' ) ) {
+ return value
+ }
+ return value + 'px'
+ },
enabledCallback: getAttribute => getAttribute( 'innerBlockOrientation' ) === 'horizontal',
dependencies: [
'innerBlockOrientation',
@@ -225,8 +231,14 @@ export const addStyles = ( blockStyleGenerator, props = {} ) => {
styleRule: 'columnGap',
attrName: 'innerBlockColumnGap',
key: 'innerBlockColumnGapSave',
- format: `%spx`,
responsive: 'all',
+ valueCallback: value => {
+ // Substitute with using format to work with preset controls
+ if ( typeof value === 'string' && value.startsWith( 'var' ) ) {
+ return value
+ }
+ return value + 'px'
+ },
enabledCallback: getAttribute => getAttribute( 'innerBlockOrientation' ) === 'horizontal',
dependencies: [
'innerBlockOrientation',
@@ -241,12 +253,18 @@ export const addStyles = ( blockStyleGenerator, props = {} ) => {
styleRule: 'rowGap',
attrName: 'innerBlockRowGap',
key: 'innerBlockRowGapEdit',
- format: `%spx`,
responsive: 'all',
enabledCallback: getAttribute => {
return getAttribute( 'innerBlockOrientation' ) !== 'horizontal' ||
( getAttribute( 'innerBlockOrientation' ) === 'horizontal' && getAttribute( 'innerBlockWrap' ) === 'wrap' )
},
+ valueCallback: value => {
+ // Substitute with using format to work with preset controls
+ if ( typeof value === 'string' && value.startsWith( 'var' ) ) {
+ return value
+ }
+ return value + 'px'
+ },
dependencies: [
'innerBlockOrientation',
'innerBlockWrap',
@@ -259,8 +277,14 @@ export const addStyles = ( blockStyleGenerator, props = {} ) => {
styleRule: 'rowGap',
attrName: 'innerBlockRowGap',
key: 'innerBlockRowGapSave',
- format: `%spx`,
responsive: 'all',
+ valueCallback: value => {
+ // Substitute with using format to work with preset controls
+ if ( typeof value === 'string' && value.startsWith( 'var' ) ) {
+ return value
+ }
+ return value + 'px'
+ },
enabledCallback: getAttribute => {
return getAttribute( 'innerBlockOrientation' ) !== 'horizontal' ||
( getAttribute( 'innerBlockOrientation' ) === 'horizontal' && getAttribute( 'innerBlockWrap' ) === 'wrap' )
diff --git a/src/components/advanced-range-control/index.js b/src/components/advanced-range-control/index.js
index 874d1c52ed..e36589efdb 100644
--- a/src/components/advanced-range-control/index.js
+++ b/src/components/advanced-range-control/index.js
@@ -248,8 +248,15 @@ const AdvancedRangeControl = props => {
const currentSize = props.marks.find( mark => {
return derivedValue === mark.value
} )?.size
- const [ _newValue, _unit ] = extractNumbersAndUnits( currentSize )[ 0 ]
- rangeValue = _newValue
+ let [ _newValue, _unit ] = extractNumbersAndUnits( currentSize )[ 0 ]
+
+ // If the attribute has no support for rem or em, and the
+ // preset units is rem or em, convert to px
+ const converted = convertToPxIfUnsupported( props.units, _unit, _newValue )
+ _newValue = converted.value
+ _unit = converted.unit
+
+ rangeValue = parseFloat( _newValue )
if ( _unit && ! isConversionDone.current ) {
dispatch( 'core/block-editor' ).__unstableMarkNextChangeAsNotPersistent()
diff --git a/src/components/four-range-control/index.js b/src/components/four-range-control/index.js
index 132deb5897..ac2480868b 100644
--- a/src/components/four-range-control/index.js
+++ b/src/components/four-range-control/index.js
@@ -418,8 +418,15 @@ const FourRangeControl = memo( props => {
const currentSize = props.marks.find( mark => {
return initialValue === mark.value
} )?.size
- const [ _newValue, _unit ] = extractNumbersAndUnits( currentSize )[ 0 ]
- rangeValue = _newValue
+ let [ _newValue, _unit ] = extractNumbersAndUnits( currentSize )[ 0 ]
+
+ // If the attribute has no support for rem or em, and the
+ // preset units is rem or em, convert to px
+ const converted = convertToPxIfUnsupported( props.units, _unit, _newValue )
+ _newValue = converted.value
+ _unit = converted.unit
+
+ rangeValue = parseFloat( _newValue )
if ( _unit && conversionKey && ! isConversionDone.current[ conversionKey ] ) {
isConversionDone.current[ conversionKey ] = true
From decb1303f7b60fb0c2152e90d3591df1f5f6c807 Mon Sep 17 00:00:00 2001
From: Alquen Sarmiento
Date: Thu, 29 May 2025 16:30:48 +0800
Subject: [PATCH 97/99] fix: add deprecation code to affected blocks, including
removing V4
---
src/block/call-to-action/deprecated.js | 18 +++++++-----------
src/block/card/deprecated.js | 18 +++++++-----------
src/block/column/deprecated.js | 20 ++++++++------------
src/block/hero/deprecated.js | 19 +++++++------------
src/block/notification/deprecated.js | 18 +++++++-----------
src/block/pricing-box/deprecated.js | 18 +++++++-----------
src/block/team-member/deprecated.js | 18 +++++++-----------
src/block/testimonial/deprecated.js | 18 +++++++-----------
8 files changed, 57 insertions(+), 90 deletions(-)
diff --git a/src/block/call-to-action/deprecated.js b/src/block/call-to-action/deprecated.js
index 3a78c5a206..b688a2b550 100644
--- a/src/block/call-to-action/deprecated.js
+++ b/src/block/call-to-action/deprecated.js
@@ -11,6 +11,7 @@ import { withVersion } from '~stackable/higher-order'
import {
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity,
deprecateBlockShadowColor, deprecateContainerShadowColor, deprecateShadowColor, deprecateBlockHeight,
+ deprecateInnerBlockRowGapAndContainerHeight,
} from '~stackable/block-components'
import compareVersions from 'compare-versions'
@@ -40,9 +41,10 @@ const deprecated = [
attributes: attributes( '3.15.2' ),
save: withVersion( '3.15.2' )( Save ),
isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
- return isNotV4 || hasNumberBlockHeight
+ const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
+
+ return hasNumberBlockHeight || hasNumberInnerBlockRowGapAndContainerHeight
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -102,6 +104,7 @@ const deprecated = [
newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes )
newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes )
newAttributes = deprecateBlockHeight.migrate( newAttributes )
+ newAttributes = deprecateInnerBlockRowGapAndContainerHeight.migrate( '%s' )( newAttributes )
return [ newAttributes, innerBlocks ]
},
@@ -115,9 +118,8 @@ const deprecated = [
const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes )
const hasTopSeparatorShadow = deprecateShadowColor.isEligible( 'topSeparator%s' )( attributes )
const hasBottomSeparatorShadow = deprecateShadowColor.isEligible( 'bottomSeparator%s' )( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow || isNotV4
+ return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -187,9 +189,8 @@ const deprecated = [
isEligible: attributes => {
const hasContainerOpacity = deprecateContainerBackgroundColorOpacity.isEligible( attributes )
const hasBlockOpacity = deprecateBlockBackgroundColorOpacity.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasContainerOpacity || hasBlockOpacity || isNotV4
+ return hasContainerOpacity || hasBlockOpacity
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -257,11 +258,6 @@ const deprecated = [
// layout & containers work.
attributes: attributes( '3.7.9' ),
save: withVersion( '3.7.9' )( Save ),
- isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
-
- return isNotV4
- },
migrate: ( attributes, innerBlocks ) => {
let newAttributes = {
...attributes,
diff --git a/src/block/card/deprecated.js b/src/block/card/deprecated.js
index d14fc94e23..00fa192487 100644
--- a/src/block/card/deprecated.js
+++ b/src/block/card/deprecated.js
@@ -13,6 +13,7 @@ import {
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity,
deprecationImageOverlayOpacity, getAlignmentClasses,
deprecateBlockShadowColor, deprecateContainerShadowColor, deprecateBlockHeight,
+ deprecateInnerBlockRowGapAndContainerHeight,
} from '~stackable/block-components'
/**
@@ -91,9 +92,10 @@ const deprecated = [
attributes: attributes( '3.15.2' ),
save: withVersion( '3.15.2' )( Save ),
isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
- return isNotV4 || hasNumberBlockHeight
+ const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
+
+ return hasNumberBlockHeight || hasNumberInnerBlockRowGapAndContainerHeight
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -152,6 +154,7 @@ const deprecated = [
newAttributes = deprecateBlockShadowColor.migrate( newAttributes )
newAttributes = deprecateContainerShadowColor.migrate( newAttributes )
newAttributes = deprecateBlockHeight.migrate( newAttributes )
+ newAttributes = deprecateInnerBlockRowGapAndContainerHeight.migrate( '%s' )( newAttributes )
return [ newAttributes, innerBlocks ]
},
@@ -163,9 +166,8 @@ const deprecated = [
isEligible: attributes => {
const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes )
const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasBlockShadow || hasContainerShadow || isNotV4
+ return hasBlockShadow || hasContainerShadow
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -234,9 +236,8 @@ const deprecated = [
isEligible: attributes => {
const hasContainerOpacity = deprecateContainerBackgroundColorOpacity.isEligible( attributes )
const hasBlockOpacity = deprecateBlockBackgroundColorOpacity.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasContainerOpacity || hasBlockOpacity || isNotV4 || deprecationImageOverlayOpacity.isEligible( attributes )
+ return hasContainerOpacity || hasBlockOpacity || deprecationImageOverlayOpacity.isEligible( attributes )
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -303,11 +304,6 @@ const deprecated = [
// layout & containers work.
attributes: attributes( '3.7.9' ),
save: withVersion( '3.7.9' )( Save ),
- isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
-
- return isNotV4
- },
migrate: ( attributes, innerBlocks ) => {
let newAttributes = {
...attributes,
diff --git a/src/block/column/deprecated.js b/src/block/column/deprecated.js
index dcfaee13c8..2ab93f2c87 100644
--- a/src/block/column/deprecated.js
+++ b/src/block/column/deprecated.js
@@ -18,6 +18,7 @@ import { semverCompare } from '~stackable/util'
import {
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity,
deprecateBlockShadowColor, deprecateContainerShadowColor, deprecateBlockHeight,
+ deprecateInnerBlockRowGapAndContainerHeight,
} from '~stackable/block-components'
// Version 3.8 added horizontal flex, we changed the stk--block-orientation-* to stk--block-horizontal-flex.
@@ -76,13 +77,14 @@ addFilter( 'stackable.column.save.blockClassNames', 'stackable/3.8.0', ( output,
const deprecated = [
{
- // Support the change of type for block height
+ // Support the change of type for block height, innerBlockRowGap and containerHeight
attributes: attributes( '3.15.2' ),
save: withVersion( '3.15.2' )( Save ),
isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
- return isNotV4 || hasNumberBlockHeight
+ const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
+
+ return hasNumberBlockHeight || hasNumberInnerBlockRowGapAndContainerHeight
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 4 || typeof attributes.version === 'undefined'
@@ -144,6 +146,7 @@ const deprecated = [
newAttributes = deprecateBlockShadowColor.migrate( newAttributes )
newAttributes = deprecateContainerShadowColor.migrate( newAttributes )
newAttributes = deprecateBlockHeight.migrate( newAttributes )
+ newAttributes = deprecateInnerBlockRowGapAndContainerHeight.migrate( '%s' )( newAttributes )
return [ newAttributes, innerBlocks ]
},
@@ -155,9 +158,8 @@ const deprecated = [
isEligible: attributes => {
const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes )
const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes )
- const isNotV4 = attributes.version < 4 || typeof attributes.version === 'undefined'
- return hasBlockShadow || hasContainerShadow || isNotV4
+ return hasBlockShadow || hasContainerShadow
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 4 || typeof attributes.version === 'undefined'
@@ -229,9 +231,8 @@ const deprecated = [
isEligible: attributes => {
const hasContainerOpacity = deprecateContainerBackgroundColorOpacity.isEligible( attributes )
const hasBlockOpacity = deprecateBlockBackgroundColorOpacity.isEligible( attributes )
- const isNotV4 = attributes.version < 4 || typeof attributes.version === 'undefined'
- return hasContainerOpacity || hasBlockOpacity || isNotV4
+ return hasContainerOpacity || hasBlockOpacity
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 4 || typeof attributes.version === 'undefined'
@@ -301,11 +302,6 @@ const deprecated = [
// layout & containers work.
attributes: attributes( '3.7.9' ),
save: withVersion( '3.7.9' )( Save ),
- isEligible: attributes => {
- const isNotV4 = attributes.version < 4 || typeof attributes.version === 'undefined'
-
- return isNotV4
- },
migrate: ( attributes, innerBlocks ) => {
let newAttributes = {
...attributes,
diff --git a/src/block/hero/deprecated.js b/src/block/hero/deprecated.js
index ad6562c0ab..fd019713fb 100644
--- a/src/block/hero/deprecated.js
+++ b/src/block/hero/deprecated.js
@@ -12,7 +12,7 @@ import compareVersions from 'compare-versions'
import {
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity,
deprecateBlockShadowColor, deprecateContainerShadowColor, deprecateShadowColor,
- deprecateBlockHeight,
+ deprecateBlockHeight, deprecateInnerBlockRowGapAndContainerHeight,
} from '~stackable/block-components'
/**
@@ -41,9 +41,10 @@ const deprecated = [
attributes: attributes( '3.15.2' ),
save: withVersion( '3.15.2' )( Save ),
isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
- return isNotV4 || hasNumberBlockHeight
+ const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
+
+ return hasNumberBlockHeight || hasNumberInnerBlockRowGapAndContainerHeight
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -103,6 +104,7 @@ const deprecated = [
newAttributes = deprecateShadowColor.migrate( 'topSeparator%s' )( newAttributes )
newAttributes = deprecateShadowColor.migrate( 'bottomSeparator%s' )( newAttributes )
newAttributes = deprecateBlockHeight.migrate( newAttributes )
+ newAttributes = deprecateInnerBlockRowGapAndContainerHeight.migrate( '%s' )( newAttributes )
return newAttributes
},
@@ -116,9 +118,8 @@ const deprecated = [
const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes )
const hasTopSeparatorShadow = deprecateShadowColor.isEligible( 'topSeparator%s' )( attributes )
const hasBottomSeparatorShadow = deprecateShadowColor.isEligible( 'bottomSeparator%s' )( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow || isNotV4
+ return hasBlockShadow || hasContainerShadow || hasTopSeparatorShadow || hasBottomSeparatorShadow
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -188,9 +189,8 @@ const deprecated = [
isEligible: attributes => {
const hasContainerOpacity = deprecateContainerBackgroundColorOpacity.isEligible( attributes )
const hasBlockOpacity = deprecateBlockBackgroundColorOpacity.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasContainerOpacity || hasBlockOpacity || isNotV4
+ return hasContainerOpacity || hasBlockOpacity
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -258,11 +258,6 @@ const deprecated = [
// layout & containers work.
attributes: attributes( '3.7.9' ),
save: withVersion( '3.7.9' )( Save ),
- isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
-
- return isNotV4
- },
migrate: ( attributes, innerBlocks ) => {
let newAttributes = {
...attributes,
diff --git a/src/block/notification/deprecated.js b/src/block/notification/deprecated.js
index 694c439735..d6c601299c 100644
--- a/src/block/notification/deprecated.js
+++ b/src/block/notification/deprecated.js
@@ -12,6 +12,7 @@ import compareVersions from 'compare-versions'
import {
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity,
deprecateBlockShadowColor, deprecateContainerShadowColor, deprecateBlockHeight,
+ deprecateInnerBlockRowGapAndContainerHeight,
} from '~stackable/block-components'
/**
@@ -40,9 +41,10 @@ const deprecated = [
attributes: attributes( '3.15.2' ),
save: withVersion( '3.15.2' )( Save ),
isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
- return isNotV4 || hasNumberBlockHeight
+ const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
+
+ return hasNumberBlockHeight || hasNumberInnerBlockRowGapAndContainerHeight
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -100,6 +102,7 @@ const deprecated = [
newAttributes = deprecateBlockShadowColor.migrate( newAttributes )
newAttributes = deprecateContainerShadowColor.migrate( newAttributes )
newAttributes = deprecateBlockHeight.migrate( newAttributes )
+ newAttributes = deprecateInnerBlockRowGapAndContainerHeight.migrate( '%s' )( newAttributes )
return newAttributes
},
@@ -111,9 +114,8 @@ const deprecated = [
isEligible: attributes => {
const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes )
const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasBlockShadow || hasContainerShadow || isNotV4
+ return hasBlockShadow || hasContainerShadow
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -181,9 +183,8 @@ const deprecated = [
isEligible: attributes => {
const hasContainerOpacity = deprecateContainerBackgroundColorOpacity.isEligible( attributes )
const hasBlockOpacity = deprecateBlockBackgroundColorOpacity.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasContainerOpacity || hasBlockOpacity || isNotV4
+ return hasContainerOpacity || hasBlockOpacity
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -249,11 +250,6 @@ const deprecated = [
// layout & containers work.
attributes: attributes( '3.7.9' ),
save: withVersion( '3.7.9' )( Save ),
- isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
-
- return isNotV4
- },
migrate: ( attributes, innerBlocks ) => {
let newAttributes = {
...attributes,
diff --git a/src/block/pricing-box/deprecated.js b/src/block/pricing-box/deprecated.js
index 48d9382153..12c90f6031 100644
--- a/src/block/pricing-box/deprecated.js
+++ b/src/block/pricing-box/deprecated.js
@@ -12,6 +12,7 @@ import compareVersions from 'compare-versions'
import {
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity,
deprecateBlockShadowColor, deprecateContainerShadowColor, deprecateBlockHeight,
+ deprecateInnerBlockRowGapAndContainerHeight,
} from '~stackable/block-components'
/**
* WordPress dependencies
@@ -39,9 +40,10 @@ const deprecated = [
attributes: attributes( '3.15.2' ),
save: withVersion( '3.15.2' )( Save ),
isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
- return isNotV4 || hasNumberBlockHeight
+ const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
+
+ return hasNumberBlockHeight || hasNumberInnerBlockRowGapAndContainerHeight
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -99,6 +101,7 @@ const deprecated = [
newAttributes = deprecateBlockShadowColor.migrate( newAttributes )
newAttributes = deprecateContainerShadowColor.migrate( newAttributes )
newAttributes = deprecateBlockHeight.migrate( newAttributes )
+ newAttributes = deprecateInnerBlockRowGapAndContainerHeight.migrate( '%s' )( newAttributes )
return newAttributes
},
@@ -110,9 +113,8 @@ const deprecated = [
isEligible: attributes => {
const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes )
const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasBlockShadow || hasContainerShadow || isNotV4
+ return hasBlockShadow || hasContainerShadow
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -180,9 +182,8 @@ const deprecated = [
isEligible: attributes => {
const hasContainerOpacity = deprecateContainerBackgroundColorOpacity.isEligible( attributes )
const hasBlockOpacity = deprecateBlockBackgroundColorOpacity.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasContainerOpacity || hasBlockOpacity || isNotV4
+ return hasContainerOpacity || hasBlockOpacity
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -248,11 +249,6 @@ const deprecated = [
// layout & containers work.
attributes: attributes( '3.7.9' ),
save: withVersion( '3.7.9' )( Save ),
- isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
-
- return isNotV4
- },
migrate: ( attributes, innerBlocks ) => {
let newAttributes = {
...attributes,
diff --git a/src/block/team-member/deprecated.js b/src/block/team-member/deprecated.js
index 47ec8ffe9f..927f56e118 100644
--- a/src/block/team-member/deprecated.js
+++ b/src/block/team-member/deprecated.js
@@ -12,6 +12,7 @@ import compareVersions from 'compare-versions'
import {
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity,
deprecateBlockShadowColor, deprecateContainerShadowColor, deprecateBlockHeight,
+ deprecateInnerBlockRowGapAndContainerHeight,
} from '~stackable/block-components'
/**
@@ -40,9 +41,10 @@ const deprecated = [
attributes: attributes( '3.15.2' ),
save: withVersion( '3.15.2' )( Save ),
isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
- return isNotV4 || hasNumberBlockHeight
+ const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
+
+ return hasNumberBlockHeight || hasNumberInnerBlockRowGapAndContainerHeight
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -100,6 +102,7 @@ const deprecated = [
newAttributes = deprecateBlockShadowColor.migrate( newAttributes )
newAttributes = deprecateContainerShadowColor.migrate( newAttributes )
newAttributes = deprecateBlockHeight.migrate( newAttributes )
+ newAttributes = deprecateInnerBlockRowGapAndContainerHeight.migrate( '%s' )( newAttributes )
return newAttributes
},
@@ -111,9 +114,8 @@ const deprecated = [
isEligible: attributes => {
const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes )
const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasBlockShadow || hasContainerShadow || isNotV4
+ return hasBlockShadow || hasContainerShadow
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -181,9 +183,8 @@ const deprecated = [
isEligible: attributes => {
const hasContainerOpacity = deprecateContainerBackgroundColorOpacity.isEligible( attributes )
const hasBlockOpacity = deprecateBlockBackgroundColorOpacity.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasContainerOpacity || hasBlockOpacity || isNotV4
+ return hasContainerOpacity || hasBlockOpacity
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -249,11 +250,6 @@ const deprecated = [
// layout & containers work.
attributes: attributes( '3.7.9' ),
save: withVersion( '3.7.9' )( Save ),
- isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
-
- return isNotV4
- },
migrate: ( attributes, innerBlocks ) => {
let newAttributes = {
...attributes,
diff --git a/src/block/testimonial/deprecated.js b/src/block/testimonial/deprecated.js
index df70cb918e..f4d3f83922 100644
--- a/src/block/testimonial/deprecated.js
+++ b/src/block/testimonial/deprecated.js
@@ -12,6 +12,7 @@ import compareVersions from 'compare-versions'
import {
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity,
deprecateBlockShadowColor, deprecateContainerShadowColor, deprecateBlockHeight,
+ deprecateInnerBlockRowGapAndContainerHeight,
} from '~stackable/block-components'
/**
@@ -40,9 +41,10 @@ const deprecated = [
attributes: attributes( '3.15.2' ),
save: withVersion( '3.15.2' )( Save ),
isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
- return isNotV4 || hasNumberBlockHeight
+ const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
+
+ return hasNumberBlockHeight || hasNumberInnerBlockRowGapAndContainerHeight
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -100,6 +102,7 @@ const deprecated = [
newAttributes = deprecateBlockShadowColor.migrate( newAttributes )
newAttributes = deprecateContainerShadowColor.migrate( newAttributes )
newAttributes = deprecateBlockHeight.migrate( newAttributes )
+ newAttributes = deprecateInnerBlockRowGapAndContainerHeight.migrate( '%s' )( newAttributes )
return newAttributes
},
@@ -111,9 +114,8 @@ const deprecated = [
isEligible: attributes => {
const hasBlockShadow = deprecateBlockShadowColor.isEligible( attributes )
const hasContainerShadow = deprecateContainerShadowColor.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasBlockShadow || hasContainerShadow || isNotV4
+ return hasBlockShadow || hasContainerShadow
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -181,9 +183,8 @@ const deprecated = [
isEligible: attributes => {
const hasContainerOpacity = deprecateContainerBackgroundColorOpacity.isEligible( attributes )
const hasBlockOpacity = deprecateBlockBackgroundColorOpacity.isEligible( attributes )
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
- return hasContainerOpacity || hasBlockOpacity || isNotV4
+ return hasContainerOpacity || hasBlockOpacity
},
migrate: ( attributes, innerBlocks ) => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
@@ -249,11 +250,6 @@ const deprecated = [
// layout & containers work.
attributes: attributes( '3.7.9' ),
save: withVersion( '3.7.9' )( Save ),
- isEligible: attributes => {
- const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
-
- return isNotV4
- },
migrate: ( attributes, innerBlocks ) => {
let newAttributes = {
...attributes,
From 2159832d1ae61cdd08723ae4e8f5ea709164ea8b Mon Sep 17 00:00:00 2001
From: Alquen Sarmiento
Date: Thu, 29 May 2025 16:51:06 +0800
Subject: [PATCH 98/99] fix: bump attribute added version to 3.16.0 and
migration version to 3.15.3
---
src/block-components/alignment/attributes.js | 2 +-
src/block-components/alignment/deprecated/index.js | 2 +-
src/block-components/columns/attributes.js | 2 +-
src/block-components/columns/deprecated/index.js | 2 +-
src/block-components/helpers/size/attributes.js | 2 +-
src/block-components/helpers/size/deprecated.js | 2 +-
src/block-components/typography/attributes.js | 2 +-
src/block-components/typography/deprecated.js | 2 +-
src/block/accordion/deprecated.js | 4 ++--
src/block/blockquote/deprecated.js | 4 ++--
src/block/button-group/deprecated/index.js | 4 ++--
src/block/button/deprecated.js | 4 ++--
src/block/call-to-action/deprecated.js | 4 ++--
src/block/card/deprecated.js | 4 ++--
src/block/carousel/deprecated.js | 4 ++--
src/block/column/deprecated.js | 4 ++--
src/block/columns/deprecated.js | 4 ++--
src/block/count-up/deprecated.js | 4 ++--
src/block/countdown/deprecated.js | 4 ++--
src/block/divider/deprecated.js | 4 ++--
src/block/expand/deprecated.js | 4 ++--
src/block/feature-grid/deprecated.js | 4 ++--
src/block/feature/deprecated.js | 4 ++--
src/block/heading/deprecated.js | 4 ++--
src/block/hero/deprecated.js | 4 ++--
src/block/horizontal-scroller/deprecated.js | 4 ++--
src/block/icon-box/deprecated.js | 4 ++--
src/block/icon-button/deprecated.js | 4 ++--
src/block/icon-label/deprecated.js | 4 ++--
src/block/icon-list-item/deprecated.js | 4 ++--
src/block/icon-list/deprecated/index.js | 4 ++--
src/block/icon/deprecated.js | 4 ++--
src/block/image-box/deprecated.js | 4 ++--
src/block/image/deprecated.js | 4 ++--
src/block/map/deprecated.js | 4 ++--
src/block/notification/deprecated.js | 4 ++--
src/block/number-box/deprecated.js | 4 ++--
src/block/posts/deprecated.js | 4 ++--
src/block/price/deprecated.js | 4 ++--
src/block/pricing-box/deprecated.js | 4 ++--
src/block/progress-bar/deprecated.js | 4 ++--
src/block/progress-circle/deprecated.js | 4 ++--
src/block/separator/deprecated.js | 4 ++--
src/block/spacer/deprecated.js | 4 ++--
src/block/subtitle/deprecated.js | 4 ++--
src/block/tab-content/deprecated.js | 4 ++--
src/block/tab-labels/deprecated.js | 4 ++--
src/block/table-of-contents/deprecated.js | 4 ++--
src/block/tabs/deprecated.js | 4 ++--
src/block/team-member/deprecated.js | 4 ++--
src/block/testimonial/deprecated.js | 4 ++--
src/block/text/deprecated.js | 4 ++--
src/block/timeline/deprecated.js | 4 ++--
src/block/video-popup/deprecated.js | 4 ++--
54 files changed, 100 insertions(+), 100 deletions(-)
diff --git a/src/block-components/alignment/attributes.js b/src/block-components/alignment/attributes.js
index 1f3ba27f4b..0fb8f5eb1f 100644
--- a/src/block-components/alignment/attributes.js
+++ b/src/block-components/alignment/attributes.js
@@ -76,7 +76,7 @@ export const addAttributes = ( attrObject, attrNameTemplate = '%s' ) => {
},
},
attrNameTemplate,
- versionAdded: '3.15.3',
+ versionAdded: '3.16.0',
versionDeprecated: '',
} )
}
diff --git a/src/block-components/alignment/deprecated/index.js b/src/block-components/alignment/deprecated/index.js
index 5bc82ac2ac..1cdd79218b 100644
--- a/src/block-components/alignment/deprecated/index.js
+++ b/src/block-components/alignment/deprecated/index.js
@@ -11,7 +11,7 @@ export const deprecatedAddAttributes = ( attrObject, attrNameTemplate = '%s' ) =
},
attrNameTemplate,
versionAdded: '3.0.0',
- versionDeprecated: '3.15.3',
+ versionDeprecated: '3.16.0',
} )
}
diff --git a/src/block-components/columns/attributes.js b/src/block-components/columns/attributes.js
index 87ece45466..0ed1283695 100644
--- a/src/block-components/columns/attributes.js
+++ b/src/block-components/columns/attributes.js
@@ -34,7 +34,7 @@ export const addAttributes = ( attrObject, attrNameTemplate = '%s' ) => {
},
},
attrNameTemplate,
- versionAdded: '3.15.3',
+ versionAdded: '3.16.0',
versionDeprecated: '',
} )
}
diff --git a/src/block-components/columns/deprecated/index.js b/src/block-components/columns/deprecated/index.js
index a489565059..75113249f3 100644
--- a/src/block-components/columns/deprecated/index.js
+++ b/src/block-components/columns/deprecated/index.js
@@ -22,7 +22,7 @@ export const deprecatedAddAttributes = ( attrObject, attrNameTemplate = '%s' ) =
},
attrNameTemplate,
versionAdded: '3.0.0',
- versionDeprecated: '3.15.3',
+ versionDeprecated: '3.16.0',
} )
}
diff --git a/src/block-components/helpers/size/attributes.js b/src/block-components/helpers/size/attributes.js
index 33f2204c4c..0a3ac2d116 100644
--- a/src/block-components/helpers/size/attributes.js
+++ b/src/block-components/helpers/size/attributes.js
@@ -52,7 +52,7 @@ export const addSizeAttributes = ( attrObject, attrNameTemplate = '%s' ) => {
},
},
attrNameTemplate,
- versionAdded: '3.15.3',
+ versionAdded: '3.16.0',
versionDeprecated: '',
} )
}
diff --git a/src/block-components/helpers/size/deprecated.js b/src/block-components/helpers/size/deprecated.js
index 8c2267a187..3871874a00 100644
--- a/src/block-components/helpers/size/deprecated.js
+++ b/src/block-components/helpers/size/deprecated.js
@@ -12,7 +12,7 @@ export const deprecatedAddAttributes = ( attrObject, attrNameTemplate = '%s' ) =
},
attrNameTemplate,
versionAdded: '3.0.0',
- versionDeprecated: '3.15.3',
+ versionDeprecated: '3.16.0',
} )
}
diff --git a/src/block-components/typography/attributes.js b/src/block-components/typography/attributes.js
index 3b26b76a3a..c2b5cfc9e3 100644
--- a/src/block-components/typography/attributes.js
+++ b/src/block-components/typography/attributes.js
@@ -108,7 +108,7 @@ export const addAttributes = ( attrObject, selector = '.stk-content', options =
stkUnits: 'px',
},
},
- versionAdded: '3.15.3',
+ versionAdded: '3.16.0',
versionDeprecated: '',
attrNameTemplate,
} )
diff --git a/src/block-components/typography/deprecated.js b/src/block-components/typography/deprecated.js
index db634c525c..773034113c 100644
--- a/src/block-components/typography/deprecated.js
+++ b/src/block-components/typography/deprecated.js
@@ -33,7 +33,7 @@ export const deprecatedAddAttributes = ( attrObject, options ) => {
},
},
versionAdded: '3.0.0',
- versionDeprecated: '3.15.3',
+ versionDeprecated: '3.16.0',
attrNameTemplate,
} )
}
diff --git a/src/block/accordion/deprecated.js b/src/block/accordion/deprecated.js
index a9ebe51e9e..bce1e02cec 100644
--- a/src/block/accordion/deprecated.js
+++ b/src/block/accordion/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/blockquote/deprecated.js b/src/block/blockquote/deprecated.js
index dbd05187c9..ceb5fa453c 100644
--- a/src/block/blockquote/deprecated.js
+++ b/src/block/blockquote/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/button-group/deprecated/index.js b/src/block/button-group/deprecated/index.js
index ba4e86cb9a..cc9d3534ad 100644
--- a/src/block/button-group/deprecated/index.js
+++ b/src/block/button-group/deprecated/index.js
@@ -12,8 +12,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/button/deprecated.js b/src/block/button/deprecated.js
index 2e11ae544f..f2e6caf5d6 100644
--- a/src/block/button/deprecated.js
+++ b/src/block/button/deprecated.js
@@ -12,8 +12,8 @@ import {
const deprecated = [
{
// Support the change of type for fontSize
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/call-to-action/deprecated.js b/src/block/call-to-action/deprecated.js
index b688a2b550..d7c8e0c7d4 100644
--- a/src/block/call-to-action/deprecated.js
+++ b/src/block/call-to-action/deprecated.js
@@ -38,8 +38,8 @@ addFilter( 'stackable.call-to-action.save.innerClassNames', 'stackable/3.8.0', (
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
diff --git a/src/block/card/deprecated.js b/src/block/card/deprecated.js
index 00fa192487..032439e3c5 100644
--- a/src/block/card/deprecated.js
+++ b/src/block/card/deprecated.js
@@ -89,8 +89,8 @@ addFilter( 'stackable.card.save.innerClassNames', 'stackable/3.0.2', ( output, p
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
diff --git a/src/block/carousel/deprecated.js b/src/block/carousel/deprecated.js
index 92bfd20efc..8ad029e728 100644
--- a/src/block/carousel/deprecated.js
+++ b/src/block/carousel/deprecated.js
@@ -11,8 +11,8 @@ import { withVersion } from '~stackable/higher-order'
const deprecated = [
{
// Support the change of type for block height and gaps
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberGaps = deprecateColumnAndRowGap.isEligible( '%s' )( attributes )
diff --git a/src/block/column/deprecated.js b/src/block/column/deprecated.js
index 2ab93f2c87..bd56ff8659 100644
--- a/src/block/column/deprecated.js
+++ b/src/block/column/deprecated.js
@@ -78,8 +78,8 @@ addFilter( 'stackable.column.save.blockClassNames', 'stackable/3.8.0', ( output,
const deprecated = [
{
// Support the change of type for block height, innerBlockRowGap and containerHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
diff --git a/src/block/columns/deprecated.js b/src/block/columns/deprecated.js
index a00faef833..2a9a521b85 100644
--- a/src/block/columns/deprecated.js
+++ b/src/block/columns/deprecated.js
@@ -39,8 +39,8 @@ addFilter( 'stackable.columns.save.contentClassNames', 'stackable/3.8.0', ( clas
const deprecated = [
{
// Support the change of type for block height and gaps
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasColumnFit = !! attributes.columnFit
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/count-up/deprecated.js b/src/block/count-up/deprecated.js
index 7c9b21f8c9..f2f6276b34 100644
--- a/src/block/count-up/deprecated.js
+++ b/src/block/count-up/deprecated.js
@@ -11,8 +11,8 @@ import {
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/countdown/deprecated.js b/src/block/countdown/deprecated.js
index 620ddb9ef6..cd79416fee 100644
--- a/src/block/countdown/deprecated.js
+++ b/src/block/countdown/deprecated.js
@@ -10,8 +10,8 @@ import { withVersion } from '~stackable/higher-order'
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasDigitFontSize = deprecateTypographyFontSize.isEligible( 'digit%s' )( attributes )
const hasLabelFontSize = deprecateTypographyFontSize.isEligible( 'label%s' )( attributes )
diff --git a/src/block/divider/deprecated.js b/src/block/divider/deprecated.js
index 90136ec005..12f770094a 100644
--- a/src/block/divider/deprecated.js
+++ b/src/block/divider/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/expand/deprecated.js b/src/block/expand/deprecated.js
index 90136ec005..12f770094a 100644
--- a/src/block/expand/deprecated.js
+++ b/src/block/expand/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/feature-grid/deprecated.js b/src/block/feature-grid/deprecated.js
index 46e7ebe17a..54f389c38f 100644
--- a/src/block/feature-grid/deprecated.js
+++ b/src/block/feature-grid/deprecated.js
@@ -63,8 +63,8 @@ addFilter( 'stackable.feature-grid.save.blockClassNames', 'stackable/3.1.0', ( o
const deprecated = [
{
// Support the change of type for block height and gaps
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasColumnFit = !! attributes.columnFit
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/feature/deprecated.js b/src/block/feature/deprecated.js
index 581002a463..8c571f29d9 100644
--- a/src/block/feature/deprecated.js
+++ b/src/block/feature/deprecated.js
@@ -65,8 +65,8 @@ addFilter( 'stackable.feature.save.innerClassNames', 'stackable/3.8.0', ( output
const deprecated = [
{
// Support the change of type for block height and gaps
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/heading/deprecated.js b/src/block/heading/deprecated.js
index 118cfee850..940d743ed1 100644
--- a/src/block/heading/deprecated.js
+++ b/src/block/heading/deprecated.js
@@ -36,8 +36,8 @@ addFilter( 'stackable.heading.save.blockClassNames', 'stackable/3.6.1', ( output
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/hero/deprecated.js b/src/block/hero/deprecated.js
index fd019713fb..6f4530145c 100644
--- a/src/block/hero/deprecated.js
+++ b/src/block/hero/deprecated.js
@@ -38,8 +38,8 @@ addFilter( 'stackable.hero.save.innerClassNames', 'stackable/3.8.0', ( output, p
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
diff --git a/src/block/horizontal-scroller/deprecated.js b/src/block/horizontal-scroller/deprecated.js
index d04b468302..649edab8b7 100644
--- a/src/block/horizontal-scroller/deprecated.js
+++ b/src/block/horizontal-scroller/deprecated.js
@@ -24,8 +24,8 @@ addFilter( 'stackable.horizontal-scroller.save.contentClassNames', 'stackable/3_
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/icon-box/deprecated.js b/src/block/icon-box/deprecated.js
index c410bb4d6d..e1ccc1cf3c 100644
--- a/src/block/icon-box/deprecated.js
+++ b/src/block/icon-box/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const isNotV4 = attributes.version < 2 || typeof attributes.version === 'undefined'
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/icon-button/deprecated.js b/src/block/icon-button/deprecated.js
index 48f200c0fd..cab6b3f206 100644
--- a/src/block/icon-button/deprecated.js
+++ b/src/block/icon-button/deprecated.js
@@ -11,8 +11,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/icon-label/deprecated.js b/src/block/icon-label/deprecated.js
index 1d35507e39..9ae19d5cd8 100644
--- a/src/block/icon-label/deprecated.js
+++ b/src/block/icon-label/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/icon-list-item/deprecated.js b/src/block/icon-list-item/deprecated.js
index c6d88e177d..1afa1eaa31 100644
--- a/src/block/icon-list-item/deprecated.js
+++ b/src/block/icon-list-item/deprecated.js
@@ -9,8 +9,8 @@ import {
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/icon-list/deprecated/index.js b/src/block/icon-list/deprecated/index.js
index 9f1a77dcdc..38173ea3cf 100644
--- a/src/block/icon-list/deprecated/index.js
+++ b/src/block/icon-list/deprecated/index.js
@@ -70,8 +70,8 @@ const getEquivalentIconSize = iconSize => {
const deprecated = [
{
// Support the change of type for font size and block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/icon/deprecated.js b/src/block/icon/deprecated.js
index 90136ec005..12f770094a 100644
--- a/src/block/icon/deprecated.js
+++ b/src/block/icon/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/image-box/deprecated.js b/src/block/image-box/deprecated.js
index 90136ec005..12f770094a 100644
--- a/src/block/image-box/deprecated.js
+++ b/src/block/image-box/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/image/deprecated.js b/src/block/image/deprecated.js
index 976b7cc2c9..94d231f322 100644
--- a/src/block/image/deprecated.js
+++ b/src/block/image/deprecated.js
@@ -62,8 +62,8 @@ addFilter( 'stackable.image.save.wrapper', 'stackable/image-caption-wrapper', (
const deprecated = [
{
// Support the change of type for fontSize
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( 'figcaption%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/map/deprecated.js b/src/block/map/deprecated.js
index f22f4db86e..06a727f8d6 100644
--- a/src/block/map/deprecated.js
+++ b/src/block/map/deprecated.js
@@ -37,8 +37,8 @@ addFilter( 'stackable.map.icon-options', 'stackable/3.13.0', ( output, attribute
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/notification/deprecated.js b/src/block/notification/deprecated.js
index d6c601299c..7301fc146c 100644
--- a/src/block/notification/deprecated.js
+++ b/src/block/notification/deprecated.js
@@ -38,8 +38,8 @@ addFilter( 'stackable.notification.save.innerClassNames', 'stackable/3.8.0', ( o
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
diff --git a/src/block/number-box/deprecated.js b/src/block/number-box/deprecated.js
index 5dc233b26b..cc3107628a 100644
--- a/src/block/number-box/deprecated.js
+++ b/src/block/number-box/deprecated.js
@@ -56,8 +56,8 @@ const depecatedSave_3_13_11 = props => {
const deprecated = [
{
// Support the change of type for fontSize
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/posts/deprecated.js b/src/block/posts/deprecated.js
index 0a2b80f225..a46cecb9d7 100644
--- a/src/block/posts/deprecated.js
+++ b/src/block/posts/deprecated.js
@@ -44,8 +44,8 @@ addFilter( 'stackable.posts.feature-image', 'stackable/3_6_3', determineFeatureI
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSizeTitle = deprecateTypographyFontSize.isEligible( 'title%s' )( attributes )
const hasNumberFontSizeCategory = deprecateTypographyFontSize.isEligible( 'category%s' )( attributes )
diff --git a/src/block/price/deprecated.js b/src/block/price/deprecated.js
index 90136ec005..12f770094a 100644
--- a/src/block/price/deprecated.js
+++ b/src/block/price/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/pricing-box/deprecated.js b/src/block/pricing-box/deprecated.js
index 12c90f6031..194bed3fbf 100644
--- a/src/block/pricing-box/deprecated.js
+++ b/src/block/pricing-box/deprecated.js
@@ -37,8 +37,8 @@ addFilter( 'stackable.pricing-box.save.innerClassNames', 'stackable/3.8.0', ( ou
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
diff --git a/src/block/progress-bar/deprecated.js b/src/block/progress-bar/deprecated.js
index 7c9b21f8c9..f2f6276b34 100644
--- a/src/block/progress-bar/deprecated.js
+++ b/src/block/progress-bar/deprecated.js
@@ -11,8 +11,8 @@ import {
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/progress-circle/deprecated.js b/src/block/progress-circle/deprecated.js
index 7c9b21f8c9..f2f6276b34 100644
--- a/src/block/progress-circle/deprecated.js
+++ b/src/block/progress-circle/deprecated.js
@@ -11,8 +11,8 @@ import {
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/separator/deprecated.js b/src/block/separator/deprecated.js
index 69cdb00e89..d5f04d49c5 100644
--- a/src/block/separator/deprecated.js
+++ b/src/block/separator/deprecated.js
@@ -11,8 +11,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/spacer/deprecated.js b/src/block/spacer/deprecated.js
index 90136ec005..12f770094a 100644
--- a/src/block/spacer/deprecated.js
+++ b/src/block/spacer/deprecated.js
@@ -10,8 +10,8 @@ import {
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/subtitle/deprecated.js b/src/block/subtitle/deprecated.js
index 809819a1c3..67a57c8e50 100644
--- a/src/block/subtitle/deprecated.js
+++ b/src/block/subtitle/deprecated.js
@@ -11,8 +11,8 @@ import {
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/tab-content/deprecated.js b/src/block/tab-content/deprecated.js
index f9d19b712d..fe39c800d5 100644
--- a/src/block/tab-content/deprecated.js
+++ b/src/block/tab-content/deprecated.js
@@ -11,8 +11,8 @@ import { withVersion } from '~stackable/higher-order'
const deprecated = [
{
// Support the change of type for block height and gaps
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberGaps = deprecateColumnAndRowGap.isEligible( '%s' )( attributes )
diff --git a/src/block/tab-labels/deprecated.js b/src/block/tab-labels/deprecated.js
index 8758b25c77..81268855a2 100644
--- a/src/block/tab-labels/deprecated.js
+++ b/src/block/tab-labels/deprecated.js
@@ -11,8 +11,8 @@ import { withVersion } from '~stackable/higher-order'
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( 'tab%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/table-of-contents/deprecated.js b/src/block/table-of-contents/deprecated.js
index e5af95f982..b1e3ebcdd5 100644
--- a/src/block/table-of-contents/deprecated.js
+++ b/src/block/table-of-contents/deprecated.js
@@ -38,8 +38,8 @@ addFilter( 'stackable.table-of-contents.save.tableOfContentsClasses', 'stackable
const deprecated = [
{
// Support the change of type for fontSize and blockHeight
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( 'title%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/tabs/deprecated.js b/src/block/tabs/deprecated.js
index a9574ef754..5935646d95 100644
--- a/src/block/tabs/deprecated.js
+++ b/src/block/tabs/deprecated.js
@@ -10,8 +10,8 @@ import { withVersion } from '~stackable/higher-order'
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
diff --git a/src/block/team-member/deprecated.js b/src/block/team-member/deprecated.js
index 927f56e118..5b53977354 100644
--- a/src/block/team-member/deprecated.js
+++ b/src/block/team-member/deprecated.js
@@ -38,8 +38,8 @@ addFilter( 'stackable.team-member.save.innerClassNames', 'stackable/3.8.0', ( ou
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
diff --git a/src/block/testimonial/deprecated.js b/src/block/testimonial/deprecated.js
index f4d3f83922..c2223e61da 100644
--- a/src/block/testimonial/deprecated.js
+++ b/src/block/testimonial/deprecated.js
@@ -38,8 +38,8 @@ addFilter( 'stackable.testimonial.save.innerClassNames', 'stackable/3.8.0', ( ou
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
const hasNumberInnerBlockRowGapAndContainerHeight = deprecateInnerBlockRowGapAndContainerHeight.isEligible( '%s' )( attributes )
diff --git a/src/block/text/deprecated.js b/src/block/text/deprecated.js
index 229a66c427..09db68cd5f 100644
--- a/src/block/text/deprecated.js
+++ b/src/block/text/deprecated.js
@@ -11,8 +11,8 @@ import {
const deprecated = [
{
// Support the change of type for fontSize
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/timeline/deprecated.js b/src/block/timeline/deprecated.js
index 6b7f581bae..c4979c84ac 100644
--- a/src/block/timeline/deprecated.js
+++ b/src/block/timeline/deprecated.js
@@ -11,8 +11,8 @@ import { withVersion } from '~stackable/higher-order'
const deprecated = [
{
// Support the change of type for fontSize
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
const hasNumberFontSize = deprecateTypographyFontSize.isEligible( '%s' )( attributes )
const hasNumberBlockHeight = deprecateBlockHeight.isEligible( attributes )
diff --git a/src/block/video-popup/deprecated.js b/src/block/video-popup/deprecated.js
index 1a0131f3b1..471924dfde 100644
--- a/src/block/video-popup/deprecated.js
+++ b/src/block/video-popup/deprecated.js
@@ -30,8 +30,8 @@ addFilter( 'stackable.video-popup.save.div.content', 'stackable/3.12.14', ( outp
const deprecated = [
{
// Support the change of type for block height
- attributes: attributes( '3.15.2' ),
- save: withVersion( '3.15.2' )( Save ),
+ attributes: attributes( '3.15.3' ),
+ save: withVersion( '3.15.3' )( Save ),
isEligible: attributes => {
return deprecateBlockHeight.isEligible( attributes )
},
From f3d9cca98b2896d45a5b5a5f2cd0acd15f0d9faa Mon Sep 17 00:00:00 2001
From: Benjamin Intal
Date: Fri, 30 May 2025 09:17:27 +0800
Subject: [PATCH 99/99] Added translation
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
---
src/block-components/helpers/size/edit.js | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/block-components/helpers/size/edit.js b/src/block-components/helpers/size/edit.js
index cdc72260b2..7d547355e7 100644
--- a/src/block-components/helpers/size/edit.js
+++ b/src/block-components/helpers/size/edit.js
@@ -140,7 +140,7 @@ const Spacing = props => {
// Add additional presets for setting margins and paddings to None
const nonePreset = {
- name: 'None',
+ name: __( 'None', i18n ),
size: '0rem',
slug: 'none',
}