Skip to content
This repository has been archived by the owner on Nov 6, 2022. It is now read-only.

Commit

Permalink
Merge pull request #673 from getblocklab/bump/1.5.6
Browse files Browse the repository at this point in the history
Bump BL version to 1.5.6
  • Loading branch information
kienstra authored Aug 10, 2020
2 parents c84467e + 0445808 commit 58fc6db
Show file tree
Hide file tree
Showing 10 changed files with 5,558 additions and 5,933 deletions.
2 changes: 1 addition & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"root": true,
"extends": [
"plugin:@wordpress/eslint-plugin/recommended",
"plugin:@wordpress/eslint-plugin/recommended-with-formatting",
"plugin:import/recommended",
"plugin:eslint-comments/recommended",
"plugin:jsx-a11y/recommended",
Expand Down
9 changes: 8 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,12 @@
## Changelog #

### 1.5.6 – 2020-08-10 ###

Small bugfixes, improved testing

* Fix: Prevent a console warning for a prop in WP 5.5
* New: More JS component tests, and an e2e test

### 1.5.5 – 2020-04-23 ###

Removed upgrade screen, dependency updates
Expand Down Expand Up @@ -42,7 +49,7 @@ This is a bugfix release, focused mostly on compatibility with WordPress 5.3.

### 1.5.0 – 2019-10-30 ###

Ready for a big release? We're really happy to be introducing quite a number of highly requested features, including a PHP API for registering blocks with code, a new text field with lists and headings, and some neat workflow efficiencies when building your block.
Ready for a big release? We're really happy to be introducing quite a number of highly requested features, including a PHP API for registering blocks with code, a new text field with lists and headings, and some neat workflow efficiencies when building your block.

* New: There's now a PHP API for registering blocks using code (instead of the WP Admin UI). Documentation is [here](https://github.com/getblocklab/block-lab/pull/434) for now, but more on its way soon
* New: Classic Text control (for Block Lab Pro users)! This field is similar to Rich Text, but has a few extra options for things like lists and headings
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
Contributors: lukecarbis, ryankienstra, Stino11, rheinardkorf
Tags: gutenberg, blocks, block editor, fields, template
Requires at least: 5.0
Tested up to: 5.4
Tested up to: 5.5
Requires PHP: 5.6
Stable tag: trunk
License: GPLv2 or later
Expand Down
2 changes: 1 addition & 1 deletion block-lab.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
* Plugin Name: Block Lab
* Plugin URI: https://getblocklab.com
* Description: The easy way to build custom blocks for Gutenberg.
* Version: 1.5.5
* Version: 1.5.6
* Author: Block Lab
* Author URI: https://getblocklab.com
* License: GPL2
Expand Down
18 changes: 12 additions & 6 deletions js/blocks/components/fetch-input.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,9 @@ const stopEventPropagation = ( event ) => event.stopPropagation();
class FetchInput extends Component {
/**
* Constructs the component class.
*
* @param {Object} props The component props.
* @param {Object} props.autocompleteRef The ref of the auto-complete.
*/
constructor( { autocompleteRef } ) {
super( ...arguments );
Expand Down Expand Up @@ -129,12 +132,14 @@ class FetchInput extends Component {
} );

if ( !! results.length ) {
this.props.debouncedSpeak( sprintf( _n(
'%d result found, use up and down arrow keys to navigate.',
'%d results found, use up and down arrow keys to navigate.',
results.length,
'block-lab'
), results.length ), 'assertive' );
this.props.debouncedSpeak(
/* translators: %d: the number of results */
sprintf( _n(
'%d result found, use up and down arrow keys to navigate.',
'%d results found, use up and down arrow keys to navigate.',
results.length,
'block-lab'
), results.length ), 'assertive' );

if ( null === this.state.selectedSuggestion && '' !== this.getInputValue() ) {
this.setState( {
Expand Down Expand Up @@ -169,6 +174,7 @@ class FetchInput extends Component {
}

if ( ! isValid ) {
/* translators: %s: the control name */
this.inputRef.current.setCustomValidity( sprintf( __( 'Invalid %s', 'block-lab' ), this.props.field.control ) );
this.inputRef.current.reportValidity();
} else {
Expand Down
4 changes: 1 addition & 3 deletions js/blocks/components/image.js
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ const Image = withSelect( ( select, ownProps ) => {
if ( media && media.alt ) {
imageAlt = media.alt;
} else if ( media && media.source_url ) {
/* translators: %s: the image src */
imageAlt = sprintf( __( 'This image has no alt attribute, but its src is %s', 'block-lab' ), media.source_url );
} else {
imageAlt = __( 'This image has no alt attribute', 'block-lab' );
Expand Down Expand Up @@ -101,7 +102,6 @@ const Image = withSelect( ( select, ownProps ) => {
{ ! isUploading && (
<>
<FormFileUpload
isLarge
disabled={ !! isUploading }
onChange={ ( event ) => {
const files = event.target.files;
Expand All @@ -122,7 +122,6 @@ const Image = withSelect( ( select, ownProps ) => {
render={ ( { open } ) => (
<div className="components-media-library-button">
<Button
isLarge
disabled={ !! isUploading }
className="editor-media-placeholder__button"
onClick={ open }
Expand All @@ -139,7 +138,6 @@ const Image = withSelect( ( select, ownProps ) => {
) }
{ imageSrc && (
<Button
isLarge
disabled={ !! isUploading }
className="bl-image__remove"
onClick={ removeImage }
Expand Down
4 changes: 2 additions & 2 deletions js/blocks/controls/test/color.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/**
* External dependencies
*/
import { render } from '@testing-library/react';
import { fireEvent, render } from '@testing-library/react';
import user from '@testing-library/user-event';

/**
Expand Down Expand Up @@ -33,6 +33,6 @@ test( 'color control', async () => {
// On entering a new color, it should be sent to the onChange handler.
const enteredColor = '#fff';
user.clear( input );
user.type( input, enteredColor );
fireEvent.change( input, { target: { value: enteredColor } } );
expect( mockOnChange ).toHaveBeenCalledWith( enteredColor );
} );
Loading

0 comments on commit 58fc6db

Please sign in to comment.