Skip to content

Commit 3905673

Browse files
author
bfintal@gmail.com
committed
Merge branch 'develop' into feat/repeater-block
2 parents ebb1dba + d4f76c7 commit 3905673

File tree

17 files changed

+1893
-2065
lines changed

17 files changed

+1893
-2065
lines changed

languages/stackable-ultimate-gutenberg-blocks.pot

Lines changed: 1750 additions & 1750 deletions
Large diffs are not rendered by default.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "stackable",
3-
"version": "3.13.7",
3+
"version": "3.13.9",
44
"private": true,
55
"description": "Blocks for everyone",
66
"author": "Benjamin Intal of Gambit",

plugin.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
* Author: Gambit Technologies, Inc
77
* Author URI: http://gambit.ph
88
* Text Domain: stackable-ultimate-gutenberg-blocks
9-
* Version: 3.13.7
9+
* Version: 3.13.9
1010
*
1111
* @package Stackable
1212
*/
@@ -24,7 +24,7 @@
2424

2525
defined( 'STACKABLE_SHOW_PRO_NOTICES' ) || define( 'STACKABLE_SHOW_PRO_NOTICES', true );
2626
defined( 'STACKABLE_BUILD' ) || define( 'STACKABLE_BUILD', 'free' );
27-
defined( 'STACKABLE_VERSION' ) || define( 'STACKABLE_VERSION', '3.13.7' );
27+
defined( 'STACKABLE_VERSION' ) || define( 'STACKABLE_VERSION', '3.13.9' );
2828
defined( 'STACKABLE_FILE' ) || define( 'STACKABLE_FILE', __FILE__ );
2929
defined( 'STACKABLE_I18N' ) || define( 'STACKABLE_I18N', 'stackable-ultimate-gutenberg-blocks' ); // Plugin slug.
3030
defined( 'STACKABLE_DESIGN_LIBRARY_URL' ) || define( 'STACKABLE_DESIGN_LIBRARY_URL', 'https://storage.googleapis.com/stackable-plugin-assets' ); // Design Library CDN URL

readme.txt

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
Contributors: bfintal, gambitph, freemius
33
Tags: blocks, gutenberg, gutenberg blocks, page builder, WordPress blocks
44
Requires at least: 6.3
5-
Tested up to: 6.6.1
5+
Tested up to: 6.6.2
66
Requires PHP: 7.3
7-
Stable tag: 3.13.7
7+
Stable tag: 3.13.9
88
License: GPLv3
99
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1010

@@ -295,6 +295,18 @@ Nope. Stackable only works with Gutenberg, the new WordPress editor.
295295

296296
== Changelog ==
297297

298+
= 3.13.9 =
299+
* Fixed: Text blocks: text gradient color doesn't show for misspelled words #3305
300+
* Fixed: Button block: adding a button block now places the cursor inside the button ##3324
301+
* Fixed: Conditional display: inspector options do not re-render when changing values #3342
302+
* Fixed: Optimized CSS: mobile styles can overwrite tablet styles sometimes (to fix, please re-save the page) #3345
303+
304+
= 3.13.8 =
305+
* Fixed: Possible editor freezing when using deprecated icon lists inside patterns #3332
306+
* Fixed: Timeline block: last timeline doesn't cut off in mobile view (part 2 of fix) #3292
307+
* Fixed: Icon List block: can produce an error when migrating from an old version #3334
308+
* Fixed: Prevent possible PHP error when calling kses too early
309+
298310
= 3.13.7 =
299311
* Fixed: Stylesheets can sometimes not load in the frontend
300312
* Fixed: SVG error when using custom SVGs with a use tag #3323

src/block/button-group/edit.js

Lines changed: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ import {
3333
FlexGapControls,
3434
Transform,
3535
} from '~stackable/block-components'
36-
import { useBlockContext, useDeviceType } from '~stackable/hooks'
36+
import { useDeviceType } from '~stackable/hooks'
3737
import {
3838
withBlockAttributeContext,
3939
withBlockWrapperIsHovered,
@@ -49,6 +49,7 @@ import {
4949
} from '@wordpress/block-editor'
5050
import { sprintf, __ } from '@wordpress/i18n'
5151
import { memo } from '@wordpress/element'
52+
import { useSelect } from '@wordpress/data'
5253

5354
const ALLOWED_INNER_BLOCKS = [ 'stackable/button', 'stackable/icon-button' ]
5455

@@ -109,7 +110,12 @@ const Edit = props => {
109110
const deviceType = useDeviceType()
110111
const rowClass = getRowClasses( attributes )
111112
const blockAlignmentClass = getAlignmentClasses( attributes )
112-
const { hasInnerBlocks } = useBlockContext()
113+
const { hasInnerBlocks } = useSelect( select => {
114+
const { getBlockOrder } = select( 'core/block-editor' )
115+
return {
116+
hasInnerBlocks: getBlockOrder( props.clientId ).length > 0,
117+
}
118+
}, [ props.clientId ] )
113119

114120
const blockClassNames = classnames( [
115121
className,
@@ -176,16 +182,15 @@ const Edit = props => {
176182
<CustomCSS mainBlockClass="stk-block-button-group" />
177183

178184
{ ! hasInnerBlocks && <GroupPlaceholder blockName="stackable/button" /> }
179-
{ hasInnerBlocks &&
180-
<div className={ contentClassNames }>
181-
<InnerBlocks
182-
orientation="horizontal"
183-
allowedBlocks={ ALLOWED_INNER_BLOCKS }
184-
template={ TEMPLATE }
185-
templateInsertUpdatesSelection={ true }
186-
/>
187-
</div>
188-
}
185+
<div className={ contentClassNames }>
186+
<InnerBlocks
187+
orientation="horizontal"
188+
allowedBlocks={ ALLOWED_INNER_BLOCKS }
189+
template={ TEMPLATE }
190+
templateInsertUpdatesSelection={ true }
191+
renderAppender={ hasInnerBlocks ? undefined : false }
192+
/>
193+
</div>
189194
</BlockDiv>
190195
{ props.isHovered && hasInnerBlocks && <MarginBottom /> }
191196
</>

src/block/button-group/variations.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,7 @@ const variations = [
3131
'stk-type': 'essential',
3232
'stk-demo': 'https://wpstackable.com/button-block/?utm_source=welcome&utm_medium=settings&utm_campaign=view_demo&utm_content=demolink',
3333
isDefault: true,
34-
innerBlocks: [
35-
[
36-
'stackable/button',
37-
{},
38-
],
39-
],
34+
innerBlocks: [],
4035
example: buttonExample,
4136
},
4237
{

src/block/icon-list-item/edit.js

Lines changed: 20 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,9 @@ import { useBlockContext } from '~stackable/hooks'
4343
import { __ } from '@wordpress/i18n'
4444
import { compose, createHigherOrderComponent } from '@wordpress/compose'
4545
import { dispatch } from '@wordpress/data'
46-
import { useEffect, memo } from '@wordpress/element'
46+
import {
47+
useEffect, useRef, memo,
48+
} from '@wordpress/element'
4749

4850
const TABS = [ 'style', 'advanced' ]
4951

@@ -68,15 +70,28 @@ const Edit = props => {
6870
'stackable/uniqueId': parentUniqueId,
6971
} = context
7072

73+
const updateOrderedTimeout = useRef()
74+
const updateUniqueIdTimeout = useRef()
75+
7176
// Set the attributes so they can be used in Save.
7277
useEffect( () => {
73-
dispatch( 'core/block-editor' ).__unstableMarkNextChangeAsNotPersistent()
74-
setAttributes( { ordered } )
78+
clearTimeout( updateOrderedTimeout.current )
79+
if ( ordered !== props.attributes.ordered ) {
80+
updateOrderedTimeout.current = setTimeout( () => {
81+
dispatch( 'core/block-editor' ).__unstableMarkNextChangeAsNotPersistent()
82+
setAttributes( { ordered } )
83+
}, 300 )
84+
}
7585
}, [ ordered ] )
7686

7787
useEffect( () => {
78-
dispatch( 'core/block-editor' ).__unstableMarkNextChangeAsNotPersistent()
79-
setAttributes( { parentUniqueId } )
88+
clearTimeout( updateUniqueIdTimeout.current )
89+
if ( parentUniqueId !== props.attributes.parentUniqueId ) {
90+
updateUniqueIdTimeout.current = setTimeout( () => {
91+
dispatch( 'core/block-editor' ).__unstableMarkNextChangeAsNotPersistent()
92+
setAttributes( { parentUniqueId } )
93+
}, 300 )
94+
}
8095
}, [ parentUniqueId ] )
8196

8297
const blockClassNames = classnames( [

src/block/icon-list/deprecated/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import {
66
deprecateBlockBackgroundColorOpacity, deprecateContainerBackgroundColorOpacity, deprecateTypographyGradientColor,
77
deprecateBlockShadowColor, deprecateContainerShadowColor,
88
} from '~stackable/block-components'
9+
import { createUniqueClass } from '~stackable/util'
910

1011
import { createBlock } from '@wordpress/blocks'
1112

@@ -109,10 +110,13 @@ const deprecated = [
109110
} else {
110111
const contents = textToArray( text )
111112
const blocks = contents.map( ( content, index ) => {
112-
return createBlock( 'stackable/icon-list-item', {
113+
const newBlock = createBlock( 'stackable/icon-list-item', {
113114
text: content,
114115
icon: getUniqueIcon( icons, index ),
115116
} )
117+
newBlock.attributes.uniqueId = createUniqueClass( newBlock.clientId )
118+
119+
return newBlock
116120
} )
117121
innerBlocks = blocks
118122
}

src/block/icon-list/deprecated/save.js

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,3 @@
1-
/**
2-
* Internal dependencies
3-
*/
4-
import { IconListStyles } from './style'
5-
61
/**
72
* External dependencies
83
*/
@@ -44,7 +39,7 @@ export const Save = props => {
4439
attributes={ attributes }
4540
version={ props.version }
4641
>
47-
<IconListStyles.Content version={ props.version } attributes={ attributes } />
42+
{ attributes.generatedCss && <style>{ attributes.generatedCss }</style> }
4843
<CustomCSS.Content attributes={ attributes } />
4944
<Typography.Content
5045
tagName={ tagName }

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy