Skip to content

Commit

Permalink
Tidy layout grid up for release
Browse files Browse the repository at this point in the history
  • Loading branch information
johngodley committed Feb 1, 2021
1 parent 259dbfe commit b1389aa
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 6 deletions.
5 changes: 3 additions & 2 deletions blocks/layout-grid/src/grid/edit.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ import { getGridWidth, getDefaultSpan } from './grid-defaults';
import ResizeGrid from './resize-grid';
import LayoutGrid from './layout-grid';
import PreviewDevice from './preview-device';
import { desktop, grid, mobile } from '@wordpress/icons/build-types';

const ALLOWED_BLOCKS = [ 'jetpack/layout-grid-column' ];
const MINIMUM_RESIZE_SIZE = 50; // Empirically determined to be a good size
Expand Down Expand Up @@ -205,8 +206,8 @@ class Edit extends Component {
updateInspectorDevice( device ) {
this.setState( { inspectorDeviceType: device } );

// Only update if on desktop
if ( this.state.viewPort === 'Desktop' ) {
// Only update if not on mobile
if ( this.state.viewPort !== 'Mobile' ) {
this.props.setPreviewDeviceType( device );
}
}
Expand Down
1 change: 0 additions & 1 deletion blocks/layout-grid/src/grid/preview-device.js
Original file line number Diff line number Diff line change
Expand Up @@ -100,5 +100,4 @@ function PreviewDevice( props ) {
);
}

//MyMobileComponent = ifViewportMatches( '< small' )( MyMobileComponent );
export default PreviewDevice;
2 changes: 1 addition & 1 deletion bundler/bundles/layout-grid.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"blocks": [
"layout-grid"
],
"version": "1.4",
"version": "1.5",
"name": "Layout Grid",
"description": "Let any blocks align to a global grid",
"resource": "jetpack-layout-grid",
Expand Down
7 changes: 5 additions & 2 deletions bundler/resources/jetpack-layout-grid/readme.txt
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
=== Layout Grid Block ===
Contributors: automattic, jasmussen, johnny5, mkaz
Stable tag: 1.4
Stable tag: trunk
Tested up to: 5.6
Requires at least: 5.5
Requires at least: 5.6
License: GPLv2 or later
License URI: https://www.gnu.org/licenses/gpl-2.0.html
Tags: blocks, layout, grid, design
Expand All @@ -24,6 +24,9 @@ You can follow development, file an issue, suggest features, and view the source

== Changelog ==

= 1.5 - 5th February 2021 =
* Improve editor responsive behaviour on smaller devices

= 1.4 - 15th January 2021 =
* Use hyphenation for text inside a grid column
* Add missing `has-background` for columns with a custom background colour
Expand Down

0 comments on commit b1389aa

Please sign in to comment.