Skip to content

Commit

Permalink
Merge pull request #105 from elmastudio/update/1.10.0
Browse files Browse the repository at this point in the history
Update/1.10.0
  • Loading branch information
ellenbauer authored Jul 4, 2022
2 parents b983249 + 86151a7 commit 83e2c3f
Show file tree
Hide file tree
Showing 24 changed files with 583 additions and 1,796 deletions.
4 changes: 2 additions & 2 deletions ainoblocks.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
* Requires at least: 5.9
* Tested up to: 6.0
* Requires PHP: 7.0
* Version: 1.9.2
* Version: 1.10.0
* Author: Elma Studio
* Author URI: https://elmastudio.de/en/
* License: GPL-2.0-or-later
Expand All @@ -26,7 +26,7 @@
/**
* Define most essential constants.
*/
define( 'AINOBLOCKS_VERSION', '1.9.2' );
define( 'AINOBLOCKS_VERSION', '1.10.0' );
define( 'AINOBLOCKS_PLUGIN_DIR', plugin_dir_path( __FILE__ ) );
define( 'AINOBLOCKS_PLUGIN_URL', plugin_dir_url( __FILE__ ) );

Expand Down
4 changes: 1 addition & 3 deletions dist/blocks.editor.build.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions dist/blocks.style.build.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/js/editor.blocks.build.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ainoblocks",
"version": "1.9.2",
"version": "1.10.0",
"title": "AinoBlocks - Essential Gutenberg Page Builder Blocks",
"description": "A collection of page builder blocks for professional WordPress websites.",
"tested_up_to": "6.0",
Expand Down
18 changes: 13 additions & 5 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Author URI: https://www.elmastudio.de/en
Plugin URI: https://ainoblocks.io
Contributors: elmastudio
Tags: block, WordPress blocks, gutenberg, blocks
Requires at least: 5.5
Requires at least: 5.9
Tested up to: 6.0
Stable tag: 1.9.2
Stable tag: 1.10.0
License: GPLv2 or later
License URI: https: //www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -52,9 +52,17 @@ Yes, you can find the patterns inside the pattern library once you install the A

== Changelog ==

= 1.10.0 =

Release date: July 4, 2022

Enhance: Icon block with new icon.
Enhance: Grid Container block use useInnerBlocksProps.
Enhance: Flexbox block use useInnerBlocksProps.

= 1.9.2 =

Release date: June 19th 2022
Release date: June 19, 2022

Enhance: New block icons.
Enhance: Plugin name and description.
Expand All @@ -65,14 +73,14 @@ Enhance: Remove Icon Button block from Block collection. The block will be rebui

= 1.9.1 =

Release date: April 25th 2022
Release date: April 25, 2022

Enhance: Gradient background for Flexbox Item block.
Bugfix: Flexbox issue in header in editor view.

= 1.9.0 =

Release date: April 6th, 2022
Release date: April 6, 2022

New: Icon block (sinple first version, block will be improved in future updates).
New: Profile Image block (Author block child).
Expand Down
32 changes: 22 additions & 10 deletions src/blocks/flexbox/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const { __ } = wp.i18n;
const { Fragment } = wp.element;
const {
InspectorControls,
InnerBlocks,
useBlockProps,
useInnerBlocksProps,
} = wp.blockEditor;
const {
PanelBody,
Expand Down Expand Up @@ -201,15 +201,14 @@ export default function flexboxEdit( { attributes, setAttributes, className, onS
position, {
});

const blockProps = useBlockProps( {
className: flexboxClasses,
} );
const blockProps = useBlockProps( { className: flexboxClasses } );
const innerBlocksProps = useInnerBlocksProps( blockProps, {} );

return (
<Fragment>
<InspectorControls>
<PanelBody
title={__('Flexbox settings', 'ainoblocks')}
title={__('Flexbox Properties', 'ainoblocks')}
initialOpen={true}
>
<p><em>{ __( 'Use Preview for Desktop, Tablet and Mobile view.', 'ainoblocks' ) }</em></p>
Expand Down Expand Up @@ -244,30 +243,35 @@ export default function flexboxEdit( { attributes, setAttributes, className, onS
<Fragment>
<SelectControl
label={__("Flex Direction", "ainoblocks")}
help={__("Establishes the main-axis, thus defining the direction flex items are placed in the flex container.", "ainoblocks")}
value={flexDirectionDesktop}
options={flexDirectionDesktopOptions}
onChange={flexDirectionDesktop => setAttributes({ flexDirectionDesktop })}
/>
<SelectControl
label={__("Flex Wrap", "ainoblocks")}
help={__("Allow items to wrap as needed.", "ainoblocks")}
value={flexWrapDesktop}
options={flexWrapDesktopOptions}
onChange={flexWrapDesktop => setAttributes({ flexWrapDesktop })}
/>
<SelectControl
label={__("Justify Content", "ainoblocks")}
help={__("Define the alignment along the main axis.", "ainoblocks")}
value={justifyContentDesktop}
options={justifyContentDesktopOptions}
onChange={justifyContentDesktop => setAttributes({ justifyContentDesktop })}
/>
<SelectControl
label={__("Align Items", "ainoblocks")}
help={__("Defines how items are laid out along the cross axis on the current line. ", "ainoblocks")}
value={alignItemsDesktop}
options={alignItemsDesktopOptions}
onChange={alignItemsDesktop => setAttributes({ alignItemsDesktop })}
/>
<SelectControl
label={__("Align Content", "ainoblocks")}
help={__("Align the flex container’s lines within when there is extra space in the cross-axis.", "ainoblocks")}
value={alignContentDesktop}
options={alignContentDesktopOptions}
onChange={alignContentDesktop => setAttributes({ alignContentDesktop })}
Expand All @@ -279,30 +283,35 @@ export default function flexboxEdit( { attributes, setAttributes, className, onS
<Fragment>
<SelectControl
label={__("Flex Direction", "ainoblocks")}
help={__("Establishes the main-axis, thus defining the direction flex items are placed in the flex container.", "ainoblocks")}
value={flexDirectionTablet}
options={flexDirectionTabletOptions}
onChange={flexDirectionTablet => setAttributes({ flexDirectionTablet })}
/>
<SelectControl
label={__("Flex Wrap", "ainoblocks")}
help={__("Allow items to wrap as needed.", "ainoblocks")}
value={flexWrapTablet}
options={flexWrapTabletOptions}
onChange={flexWrapTablet => setAttributes({ flexWrapTablet })}
/>
<SelectControl
label={__("Justify Content", "ainoblocks")}
help={__("Define the alignment along the main axis.", "ainoblocks")}
value={justifyContentTablet}
options={justifyContentTabletOptions}
onChange={justifyContentTablet => setAttributes({ justifyContentTablet })}
/>
<SelectControl
label={__("Align Items", "ainoblocks")}
help={__("Defines how items are laid out along the cross axis on the current line. ", "ainoblocks")}
value={alignItemsTablet}
options={alignItemsTabletOptions}
onChange={alignItemsTablet => setAttributes({ alignItemsTablet })}
/>
<SelectControl
label={__("Align Content", "ainoblocks")}
help={__("Align the flex container’s lines within when there is extra space in the cross-axis.", "ainoblocks")}
value={alignContentTablet}
options={alignContentTabletOptions}
onChange={alignContentTablet => setAttributes({ alignContentTablet })}
Expand All @@ -315,30 +324,35 @@ export default function flexboxEdit( { attributes, setAttributes, className, onS
<Fragment>
<SelectControl
label={__("Flex Direction", "ainoblocks")}
help={__("Establishes the main-axis, thus defining the direction flex items are placed in the flex container.", "ainoblocks")}
value={flexDirectionMobile}
options={flexDirectionMobileOptions}
onChange={flexDirectionMobile => setAttributes({ flexDirectionMobile })}
/>
<SelectControl
label={__("Flex Wrap", "ainoblocks")}
help={__("Allow items to wrap as needed.", "ainoblocks")}
value={flexWrapMobile}
options={flexWrapMobileOptions}
onChange={flexWrapMobile => setAttributes({ flexWrapMobile })}
/>
<SelectControl
label={__("Justify Content", "ainoblocks")}
help={__("Define the alignment along the main axis.", "ainoblocks")}
value={justifyContentMobile}
options={justifyContentMobileOptions}
onChange={justifyContentMobile => setAttributes({ justifyContentMobile })}
/>
<SelectControl
label={__("Align Items", "ainoblocks")}
help={__("Defines how items are laid out along the cross axis on the current line. ", "ainoblocks")}
value={alignItemsMobile}
options={alignItemsMobileOptions}
onChange={alignItemsMobile => setAttributes({ alignItemsMobile })}
/>
<SelectControl
label={__("Align Content", "ainoblocks")}
help={__("Align the flex container’s lines within when there is extra space in the cross-axis.", "ainoblocks")}
value={alignContentMobile}
options={alignContentMobileOptions}
onChange={alignContentMobile => setAttributes({ alignContentMobile })}
Expand All @@ -351,7 +365,8 @@ export default function flexboxEdit( { attributes, setAttributes, className, onS
</TabPanel>
</PanelBody>
<PanelBody
title={__('Positioning', 'ainoblocks')}
title={__('Absolute Positioning', 'ainoblocks')}
description={__("Specify the positioning for the Flexbox container.", "ainoblocks")}
initialOpen={false}
>
<SelectControl
Expand All @@ -373,10 +388,7 @@ export default function flexboxEdit( { attributes, setAttributes, className, onS
/>
</PanelBody>
</InspectorControls>

<div { ...blockProps }>
<InnerBlocks />
</div>
<div { ...innerBlocksProps } />
</Fragment>
);
}
2 changes: 0 additions & 2 deletions src/blocks/flexbox/index.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
/**
* WordPress dependencies
*/
const { __, _x } = wp.i18n;
const { registerBlockCollection } = wp.blocks;

/**
Expand All @@ -12,7 +11,6 @@ import edit from './edit';
import metadata from './block.json';
import save from './save';
import './styles/style.scss';
import './styles/editor.scss';

/**
* Register block
Expand Down
15 changes: 5 additions & 10 deletions src/blocks/flexbox/save.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,9 @@ import classnames from 'classnames';
/**
* WordPress dependencies
*/
const { __ } = wp.i18n;
const {
InnerBlocks,
useBlockProps,
useInnerBlocksProps,
} = wp.blockEditor;

export default function save( { attributes } ) {
Expand Down Expand Up @@ -57,14 +56,10 @@ export default function save( { attributes } ) {
position, {
});

const blockProps = useBlockProps.save( {
className: flexboxClasses,
} );
const blockProps = useBlockProps.save( { className: flexboxClasses } );
const innerBlocksProps = useInnerBlocksProps.save( blockProps );

return (

<div { ...blockProps }>
<InnerBlocks.Content />
</div >
<div {...innerBlocksProps} />
);
}
}
Loading

0 comments on commit 83e2c3f

Please sign in to comment.