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

Commit 58fc6db

Browse files
authored
Merge pull request #673 from getblocklab/bump/1.5.6
Bump BL version to 1.5.6
2 parents c84467e + 0445808 commit 58fc6db

File tree

10 files changed

+5558
-5933
lines changed

10 files changed

+5558
-5933
lines changed

.eslintrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"root": true,
33
"extends": [
4-
"plugin:@wordpress/eslint-plugin/recommended",
4+
"plugin:@wordpress/eslint-plugin/recommended-with-formatting",
55
"plugin:import/recommended",
66
"plugin:eslint-comments/recommended",
77
"plugin:jsx-a11y/recommended",

CHANGELOG.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
## Changelog #
22

3+
### 1.5.6 – 2020-08-10 ###
4+
5+
Small bugfixes, improved testing
6+
7+
* Fix: Prevent a console warning for a prop in WP 5.5
8+
* New: More JS component tests, and an e2e test
9+
310
### 1.5.5 – 2020-04-23 ###
411

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

4350
### 1.5.0 – 2019-10-30 ###
4451

45-
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.
52+
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.
4653

4754
* 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
4855
* 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

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
Contributors: lukecarbis, ryankienstra, Stino11, rheinardkorf
44
Tags: gutenberg, blocks, block editor, fields, template
55
Requires at least: 5.0
6-
Tested up to: 5.4
6+
Tested up to: 5.5
77
Requires PHP: 5.6
88
Stable tag: trunk
99
License: GPLv2 or later

block-lab.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
* Plugin Name: Block Lab
1010
* Plugin URI: https://getblocklab.com
1111
* Description: The easy way to build custom blocks for Gutenberg.
12-
* Version: 1.5.5
12+
* Version: 1.5.6
1313
* Author: Block Lab
1414
* Author URI: https://getblocklab.com
1515
* License: GPL2

js/blocks/components/fetch-input.js

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,9 @@ const stopEventPropagation = ( event ) => event.stopPropagation();
2929
class FetchInput extends Component {
3030
/**
3131
* Constructs the component class.
32+
*
33+
* @param {Object} props The component props.
34+
* @param {Object} props.autocompleteRef The ref of the auto-complete.
3235
*/
3336
constructor( { autocompleteRef } ) {
3437
super( ...arguments );
@@ -129,12 +132,14 @@ class FetchInput extends Component {
129132
} );
130133

131134
if ( !! results.length ) {
132-
this.props.debouncedSpeak( sprintf( _n(
133-
'%d result found, use up and down arrow keys to navigate.',
134-
'%d results found, use up and down arrow keys to navigate.',
135-
results.length,
136-
'block-lab'
137-
), results.length ), 'assertive' );
135+
this.props.debouncedSpeak(
136+
/* translators: %d: the number of results */
137+
sprintf( _n(
138+
'%d result found, use up and down arrow keys to navigate.',
139+
'%d results found, use up and down arrow keys to navigate.',
140+
results.length,
141+
'block-lab'
142+
), results.length ), 'assertive' );
138143

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

171176
if ( ! isValid ) {
177+
/* translators: %s: the control name */
172178
this.inputRef.current.setCustomValidity( sprintf( __( 'Invalid %s', 'block-lab' ), this.props.field.control ) );
173179
this.inputRef.current.reportValidity();
174180
} else {

js/blocks/components/image.js

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ const Image = withSelect( ( select, ownProps ) => {
2929
if ( media && media.alt ) {
3030
imageAlt = media.alt;
3131
} else if ( media && media.source_url ) {
32+
/* translators: %s: the image src */
3233
imageAlt = sprintf( __( 'This image has no alt attribute, but its src is %s', 'block-lab' ), media.source_url );
3334
} else {
3435
imageAlt = __( 'This image has no alt attribute', 'block-lab' );
@@ -101,7 +102,6 @@ const Image = withSelect( ( select, ownProps ) => {
101102
{ ! isUploading && (
102103
<>
103104
<FormFileUpload
104-
isLarge
105105
disabled={ !! isUploading }
106106
onChange={ ( event ) => {
107107
const files = event.target.files;
@@ -122,7 +122,6 @@ const Image = withSelect( ( select, ownProps ) => {
122122
render={ ( { open } ) => (
123123
<div className="components-media-library-button">
124124
<Button
125-
isLarge
126125
disabled={ !! isUploading }
127126
className="editor-media-placeholder__button"
128127
onClick={ open }
@@ -139,7 +138,6 @@ const Image = withSelect( ( select, ownProps ) => {
139138
) }
140139
{ imageSrc && (
141140
<Button
142-
isLarge
143141
disabled={ !! isUploading }
144142
className="bl-image__remove"
145143
onClick={ removeImage }

js/blocks/controls/test/color.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
/**
22
* External dependencies
33
*/
4-
import { render } from '@testing-library/react';
4+
import { fireEvent, render } from '@testing-library/react';
55
import user from '@testing-library/user-event';
66

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

0 commit comments

Comments
 (0)