Skip to content

Commit

Permalink
Merge pull request #94 from donnapep/release/2.1.1
Browse files Browse the repository at this point in the history
Release 2.1.1
  • Loading branch information
donnapep committed Mar 27, 2022
2 parents 17d7c05 + b8846d0 commit 8c13f13
Show file tree
Hide file tree
Showing 6 changed files with 46 additions and 11 deletions.
8 changes: 4 additions & 4 deletions book-review-block.php
Expand Up @@ -5,12 +5,12 @@
* Description: A Gutenberg block to add book details and a star rating to a book review post.
* Author: Donna Peplinskie
* Author URI: https://donnapeplinskie.com
* Version: 2.1.0
* Version: 2.1.1
* Text Domain: book-review-block
* License: GPL2+
* License URI: http://www.gnu.org/licenses/gpl-2.0.txt
* Requires at least: 5.4
* Tested up to: 5.6
* Requires at least: 5.7
* Tested up to: 5.9
* Requires PHP: 7.0
*/

Expand Down Expand Up @@ -67,7 +67,7 @@ public static function register() {
* @access private
*/
private function __construct() {
$this->version = '2.1.0';
$this->version = '2.1.1';
$this->slug = 'book-review-block';

require_once plugin_dir_path( __FILE__ ) . 'includes/book-review-block-settings-controller.php';
Expand Down
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
@@ -1,6 +1,6 @@
{
"name": "book-review-block",
"version": "2.1.0",
"version": "2.1.1",
"main": "index.js",
"engines": {
"node": "16.14.2",
Expand Down
10 changes: 7 additions & 3 deletions readme.txt
Expand Up @@ -2,9 +2,9 @@
Contributors: donnapep
Tags: block, book, book blog, book review, rating, review
Author URI: https://donnapeplinskie.com
Requires at least: 5.4
Tested up to: 5.6
Stable tag: 2.1.0
Requires at least: 5.7
Tested up to: 5.9
Stable tag: 2.1.1
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Expand Down Expand Up @@ -32,6 +32,10 @@ Book Review Block adds Schema markup to the HTML. This can help increase site tr

== Changelog ==

= 2.1.1 =
* Fix: Broken description in editor
* Fix: Add whitespace around book cover

= 2.1.0 =
* New: Add block preview
* Tweak: Add description to parent block
Expand Down
4 changes: 2 additions & 2 deletions src/blocks/edit.js
Expand Up @@ -162,8 +162,8 @@ function BookReviewBlock( {
dispatch( 'core/block-editor' ).updateBlockAttributes(
block.clientId,
{
// summary: volume.description ? '<p>' + volume.description + '</p>' : '',
summary: volume.description ? volume.description : '',
// Including <p> tag fixes the issue of the description not showing in the editor.
summary: volume.description ? '<p>' + volume.description + '</p>' : '',
}
);
break;
Expand Down
31 changes: 31 additions & 0 deletions src/blocks/style.scss
Expand Up @@ -6,6 +6,37 @@
&.has-background {
padding: 20px 20px;
}

.wp-block-image {
margin: 0;

.alignleft,
.alignright {
margin: 0;
margin-bottom: 1em;
}

.alignleft {
margin-right: 1em;
}

.alignright {
margin-left: 1em;
}

.aligncenter {
margin-bottom: 1em;
}
}

// TODO: alignwide and alignfull are now styled the same, when in fact alignwide should have a bit
// of margin (at least on Twenty Twenty theme). This is not a huge deal though.
.alignwide,
.alignfull,
// Align none
.wp-block-image:not(.alignwide):not(.alignfull) {
margin-bottom: 1em;
}
}

/**
Expand Down

0 comments on commit 8c13f13

Please sign in to comment.