Skip to content

Commit 26cb873

Browse files
committed
Merge branch 'develop' into fix/3330-text-block-pasting
2 parents 16cf632 + 6e1bf12 commit 26cb873

File tree

57 files changed

+2104
-2171
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

57 files changed

+2104
-2171
lines changed

languages/stackable-ultimate-gutenberg-blocks.pot

Lines changed: 1674 additions & 1674 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.9",
3+
"version": "3.13.10",
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.9
9+
* Version: 3.13.10
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.9' );
27+
defined( 'STACKABLE_VERSION' ) || define( 'STACKABLE_VERSION', '3.13.10' );
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: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
=== Stackable - Page Builder Gutenberg Blocks ===
22
Contributors: bfintal, gambitph, freemius
33
Tags: blocks, gutenberg, gutenberg blocks, page builder, WordPress blocks
4-
Requires at least: 6.3
4+
Requires at least: 6.4
55
Tested up to: 6.6.2
66
Requires PHP: 7.3
7-
Stable tag: 3.13.9
7+
Stable tag: 3.13.10
88
License: GPLv3
99
License URI: https://www.gnu.org/licenses/gpl-3.0.html
1010

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

296296
== Changelog ==
297297

298+
= 3.13.10 =
299+
* Fixed: Compatibility with WordPress 6.7 #3336
300+
* Fixed: Better support for custom SVGs in the icon picker #3265
301+
* Fixed: Cleanup of some code related to the previous performance update #3320
302+
* Fixed: Accordion block: text can become unselectable #3350
303+
* Fixed: Save default blocks: saving can be called multiple times and can cause the browser to hang #3355
304+
* Fixed: Map block: prevent error when using a custom map marker #3362
305+
298306
= 3.13.9 =
299307
* Fixed: Text blocks: text gradient color doesn't show for misspelled words #3305
300308
* Fixed: Button block: adding a button block now places the cursor inside the button ##3324

src/block-components/column/use-column.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,8 @@ export const useColumn = () => {
1010
const { clientId } = useBlockEditContext()
1111

1212
const onChangeDesktop = widths => {
13-
const { parentBlock } = select( 'stackable/block-context' ).getBlockContext( clientId )
13+
const parentBlockId = select( 'core/block-editor' ).getBlockRootClientId( clientId )
14+
const parentBlock = select( 'core/block-editor' ).getBlock( parentBlockId )
1415
const adjacentBlocks = parentBlock?.innerBlocks || []
1516

1617
if ( adjacentBlocks.length ) {
@@ -36,7 +37,8 @@ export const useColumn = () => {
3637
[ clientId ]: { columnWidth: width },
3738
}
3839

39-
const { parentBlock } = select( 'stackable/block-context' ).getBlockContext( clientId )
40+
const parentBlockId = select( 'core/block-editor' ).getBlockRootClientId( clientId )
41+
const parentBlock = select( 'core/block-editor' ).getBlock( parentBlockId )
4042
const adjacentBlocks = parentBlock?.innerBlocks || []
4143

4244
if ( adjacentBlocks.length ) {
@@ -63,7 +65,8 @@ export const useColumn = () => {
6365
[ clientId ]: { columnWidthTablet: width },
6466
}
6567

66-
const { parentBlock } = select( 'stackable/block-context' ).getBlockContext( clientId )
68+
const parentBlockId = select( 'core/block-editor' ).getBlockRootClientId( clientId )
69+
const parentBlock = select( 'core/block-editor' ).getBlock( parentBlockId )
6770
const adjacentBlocks = parentBlock?.innerBlocks || []
6871

6972
if ( adjacentBlocks.length ) {
@@ -89,7 +92,8 @@ export const useColumn = () => {
8992
[ clientId ]: { columnWidthMobile: width },
9093
}
9194

92-
const { parentBlock } = select( 'stackable/block-context' ).getBlockContext( clientId )
95+
const parentBlockId = select( 'core/block-editor' ).getBlockRootClientId( clientId )
96+
const parentBlock = select( 'core/block-editor' ).getBlock( parentBlockId )
9397
const adjacentBlocks = parentBlock?.innerBlocks || []
9498

9599
if ( adjacentBlocks.length ) {
@@ -110,7 +114,8 @@ export const useColumn = () => {
110114
}
111115

112116
const onResetDesktop = () => {
113-
const { parentBlock } = select( 'stackable/block-context' ).getBlockContext( clientId )
117+
const parentBlockId = select( 'core/block-editor' ).getBlockRootClientId( clientId )
118+
const parentBlock = select( 'core/block-editor' ).getBlock( parentBlockId )
114119
const adjacentBlocks = parentBlock?.innerBlocks || []
115120

116121
if ( adjacentBlocks.length ) {
@@ -120,7 +125,8 @@ export const useColumn = () => {
120125
}
121126

122127
const onResetTabletMobile = () => {
123-
const { parentBlock } = select( 'stackable/block-context' ).getBlockContext( clientId )
128+
const parentBlockId = select( 'core/block-editor' ).getBlockRootClientId( clientId )
129+
const parentBlock = select( 'core/block-editor' ).getBlock( parentBlockId )
124130
const adjacentBlocks = parentBlock?.innerBlocks || []
125131

126132
if ( adjacentBlocks.length ) {

src/block-components/columns/column-settings-button.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,8 @@ export const ColumnsControl = props => {
5454
}
5555

5656
multiClientIds.forEach( clientId => {
57-
const { numInnerBlocks, innerBlocks } = select( 'stackable/block-context' ).getBlockContext( clientId )
57+
const innerBlocks = select( 'core/block-editor' ).getBlock( clientId )?.innerBlocks
58+
const numInnerBlocks = innerBlocks.length
5859
multiInnerBlocks[ clientId ] = innerBlocks
5960
multiNumInnerBlocks[ clientId ] = numInnerBlocks
6061
} )

src/block-components/columns/edit.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ export const Controls = props => {
6161
const multiInnerBlocks = {}
6262

6363
multiClientIds.forEach( clientId => {
64-
const { innerBlocks } = select( 'stackable/block-context' ).getBlockContext( clientId )
64+
const innerBlocks = select( 'core/block-editor' ).getBlock( clientId )?.innerBlocks
6565
multiInnerBlocks[ clientId ] = innerBlocks
6666
} )
6767

src/block-components/image/index.js

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,14 +10,15 @@ import Image_ from './image'
1010
/**
1111
* External dependencies
1212
*/
13-
import { useBlockAttributesContext, useBlockContext } from '~stackable/hooks'
13+
import { useBlockAttributesContext } from '~stackable/hooks'
1414
import { pickBy } from 'lodash'
1515

1616
/**
1717
* WordPress dependencies
1818
*/
1919
import { useBlockEditContext } from '@wordpress/block-editor'
2020
import { applyFilters } from '@wordpress/hooks'
21+
import { useSelect } from '@wordpress/data'
2122

2223
export { deprecationImageOverlayOpacity } from './deprecated'
2324

@@ -28,7 +29,7 @@ export const Image = props => {
2829
...propsToPass
2930
} = props
3031

31-
const { isSelected } = useBlockEditContext()
32+
const { isSelected, clientId } = useBlockEditContext()
3233
const attributes = useBlockAttributesContext( attributes => {
3334
return {
3435
imageOverlayColorType: attributes.imageOverlayColorType,
@@ -64,7 +65,13 @@ export const Image = props => {
6465
figcaptionShow: attributes.figcaptionShow,
6566
}
6667
} )
67-
const { parentBlock } = useBlockContext()
68+
const { parentBlock } = useSelect( select => {
69+
const { getBlockRootClientId, getBlock } = select( 'core/block-editor' )
70+
const parentClientId = getBlockRootClientId( clientId )
71+
return {
72+
parentBlock: getBlock( parentClientId ),
73+
}
74+
}, [ clientId ] )
6875

6976
const { setImage } = useImage()
7077

src/block-components/linking/index.js

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
import classnames from 'classnames'
22
import { i18n } from 'stackable'
3-
import { useBlockContext, useLinking } from '~stackable/hooks'
3+
import { useLinking } from '~stackable/hooks'
44
import { useClosestLinkableBlock } from '~stackable/plugins/block-linking'
55
import { Tooltip } from '~stackable/components'
66

77
import { Dashicon } from '@wordpress/components'
88
import { useBlockEditContext } from '@wordpress/block-editor'
99
import { __ } from '@wordpress/i18n'
1010
import { getPlugin } from '@wordpress/plugins'
11+
import { useSelect } from '@wordpress/data'
1112

1213
// We split this off because we use hooks that won't allow conditional rendering
1314
// for the Linking component.
@@ -19,8 +20,14 @@ export const Linking = props => {
1920
export const _Linking = () => {
2021
const [ isLinked, setIsLinked ] = useLinking()
2122

22-
const { isOnlyBlock } = useBlockContext()
2323
const { clientId } = useBlockEditContext()
24+
const { isOnlyBlock } = useSelect( select => {
25+
const { getBlockRootClientId, getBlock } = select( 'core/block-editor' )
26+
const parentClientId = getBlockRootClientId( clientId )
27+
return {
28+
isOnlyBlock: getBlock( parentClientId ).innerBlocks.length === 1,
29+
}
30+
}, [ clientId ] )
2431

2532
const closestLinkableBlock = useClosestLinkableBlock( clientId )
2633

src/block-components/style/index.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -389,4 +389,3 @@ export const mergeStyles = ( styles, important = true ) => {
389389

390390
Style.addAttributes = addAttributes
391391

392-
export * from './use-generated-css'

0 commit comments

Comments
 (0)