Skip to content

Commit

Permalink
Merge pull request #189 from tomusborne/release/1.4.1
Browse files Browse the repository at this point in the history
Release 1.4.1
  • Loading branch information
tomusborne authored Jan 17, 2022
2 parents 74cfd3c + 3a953d9 commit 46f1533
Show file tree
Hide file tree
Showing 12 changed files with 20,120 additions and 28 deletions.
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ node_modules
vendor
.DS_Store
*.zip
package-lock.json
composer.lock
## Uncomment line below if you prefer to
## keep compiled files out of version control
Expand Down
2 changes: 1 addition & 1 deletion dist/blocks.asset.php
Original file line number Diff line number Diff line change
@@ -1 +1 @@
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'abd3bfade39adca2eab3e5e23b36a2ed');
<?php return array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => 'aefbe130c6a5e0b06c160b0b4d0eaee1');
4 changes: 2 additions & 2 deletions dist/blocks.css

Large diffs are not rendered by default.

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

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion includes/class-rest.php
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ public function update_settings( WP_REST_Request $request ) {

foreach ( $new_settings as $name => $value ) {
// Skip if the option hasn't changed.
if ( $current_settings[ $name ] === $new_settings[ $name ] ) {
if ( isset( $current_settings[ $name ] ) && $current_settings[ $name ] === $new_settings[ $name ] ) {
unset( $new_settings[ $name ] );
continue;
}
Expand Down
20,061 changes: 20,061 additions & 0 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "generateblocks",
"version": "1.4.0",
"version": "1.4.1",
"private": true,
"description": "A small collection of lightweight WordPress blocks that can accomplish nearly anything.",
"author": "Tom Usborne",
Expand Down
4 changes: 2 additions & 2 deletions plugin.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
* Description: A small collection of lightweight WordPress blocks that can accomplish nearly anything.
* Author: Tom Usborne
* Author URI: https://tomusborne.com
* Version: 1.4.0
* Version: 1.4.1
* Requires at least: 5.4
* Requires PHP: 5.6
* License: GPL2+
Expand All @@ -19,7 +19,7 @@
exit; // Exit if accessed directly.
}

define( 'GENERATEBLOCKS_VERSION', '1.4.0' );
define( 'GENERATEBLOCKS_VERSION', '1.4.1' );
define( 'GENERATEBLOCKS_DIR', plugin_dir_path( __FILE__ ) );
define( 'GENERATEBLOCKS_DIR_URL', plugin_dir_url( __FILE__ ) );

Expand Down
9 changes: 7 additions & 2 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@ Contributors: edge22
Donate link: https://generateblocks.com
Tags: blocks, gutenberg, container, headline, grid, columns, page builder, wysiwyg, block editor
Requires at least: 5.4
Tested up to: 5.8
Tested up to: 5.9
Requires PHP: 5.6
Stable tag: 1.4.0
Stable tag: 1.4.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -77,6 +77,11 @@ GenerateBlocks was built to work hand-in-hand with [GeneratePress](https://gener

== Changelog ==

= 1.4.1 =
* Fix: Color picker UI in WP 5.9
* Fix: PHP notice when first saving Dashboard settings
* Tweak: Make Container appender relative positioned in WP 5.9

= 1.4.0 =
* New: Add flex (flex-grow, flex-shrink, flex-basis) options to grid item containers
* New: Add "auto" width option to grid item containers on tablet and mobile
Expand Down
28 changes: 16 additions & 12 deletions src/blocks/container/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -325,17 +325,21 @@ body .gb-container .wp-block {
}
}

.gb-container > .gb-inside-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender .block-editor-button-block-appender {
background: unset;
color: #000;
box-shadow: inset 0 0 0 1px #fff;
border: 1px solid #000;
padding: 5px 12px;

svg path {
fill: #000;
stroke: #fff;
stroke-width: 2px;
paint-order: stroke;
.gb-container > .gb-inside-container > .block-editor-inner-blocks > .block-editor-block-list__layout > .block-list-appender {
position: relative;

.block-editor-button-block-appender {
background: unset;
color: #000;
box-shadow: inset 0 0 0 1px #fff;
border: 1px solid #000;
padding: 5px 12px;

svg path {
fill: #000;
stroke: #fff;
stroke-width: 2px;
paint-order: stroke;
}
}
}
28 changes: 26 additions & 2 deletions src/components/color-picker/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,23 @@
display: none;
}

.react-colorful {
width: 100% !important;

.react-colorful__saturation {
height: 150px;
}

.react-colorful__hue,
.react-colorful__alpha {
width: calc(100% - 40px);
}

& + div {
display: none;
}
}

.gblocks-color-input-wrapper {
display: flex;
padding: 16px 16px 0;
Expand Down Expand Up @@ -44,8 +61,14 @@
display: flex;
flex-wrap: wrap;

.components-circular-option-picker__option-wrapper {
margin: 0 8px 8px 0;
.components-circular-option-picker__swatches {
display: flex;
flex-wrap: wrap;
gap: 6px;

.components-circular-option-picker__option-wrapper {
margin: 0;
}
}
}
}
Expand All @@ -56,6 +79,7 @@

.components-color-picker {
padding: 5px;
width: 100%;
}

.components-color-picker__body {
Expand Down
5 changes: 2 additions & 3 deletions src/components/color-picker/index.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import classnames from 'classnames';
import hexToRGBA from '../../utils/hex-to-rgba';
import getIcon from '../../utils/get-icon';

Expand Down Expand Up @@ -98,7 +97,7 @@ export default class GenerateBlocksColorPicker extends Component {

<div className="gblocks-color-picker-area">
{ ! this.state.isVisible &&
<div className={ classnames( 'components-color-palette__item-wrapper components-circular-option-picker__option-wrapper', value ? '' : 'components-color-palette__custom-color' ) }>
<div className="components-circular-option-picker__option-wrapper">
<Tooltip text={ __( 'Choose Color', 'generateblocks' ) }>
<button
type="button"
Expand All @@ -115,7 +114,7 @@ export default class GenerateBlocksColorPicker extends Component {
}

{ this.state.isVisible &&
<div className={ classnames( 'components-color-palette__item-wrapper components-circular-option-picker__option-wrapper', value ? '' : 'components-color-palette__custom-color' ) }>
<div className="components-circular-option-picker__option-wrapper">
<Tooltip text={ __( 'Choose Color', 'generateblocks' ) }>
<button
type="button"
Expand Down

0 comments on commit 46f1533

Please sign in to comment.