From 926ed3fd20b355fd3a74528400a9e0e7b190d415 Mon Sep 17 00:00:00 2001 From: Stefanos Togoulidis Date: Sun, 24 Feb 2019 22:04:21 +0200 Subject: [PATCH] [Native mobile] Bring release v1.0.1 back to "mobile develop" (#14075) * Don't allow placeholder to moves once we tap on it (#14066) * Use platform based SCSS vars for block minHeight (#14070) --- packages/block-library/src/heading/edit.native.js | 7 ++++--- packages/block-library/src/heading/style.native.scss | 5 +++++ packages/block-library/src/image/edit.native.js | 11 +++-------- .../block-library/src/paragraph/style.native.scss | 4 +++- .../editor/src/components/post-title/index.native.js | 4 ++-- .../src/components/post-title/style.native.scss | 4 ++++ 6 files changed, 21 insertions(+), 14 deletions(-) create mode 100644 packages/block-library/src/heading/style.native.scss diff --git a/packages/block-library/src/heading/edit.native.js b/packages/block-library/src/heading/edit.native.js index d28021a0bbd992..dab8589b9c9236 100644 --- a/packages/block-library/src/heading/edit.native.js +++ b/packages/block-library/src/heading/edit.native.js @@ -19,9 +19,7 @@ import { createBlock } from '@wordpress/blocks'; /** * Internal dependencies */ -import './editor.scss'; - -const minHeight = 24; +import styles from './style.scss'; class HeadingEdit extends Component { constructor( props ) { @@ -47,6 +45,9 @@ class HeadingEdit extends Component { } = attributes; const tagName = 'h' + level; + + const minHeight = styles.blockText.minHeight; + return ( diff --git a/packages/block-library/src/heading/style.native.scss b/packages/block-library/src/heading/style.native.scss new file mode 100644 index 00000000000000..d5018ce8e30b86 --- /dev/null +++ b/packages/block-library/src/heading/style.native.scss @@ -0,0 +1,5 @@ +@import "variables.scss"; + +.blockText { + min-height: $min-height-heading; +} diff --git a/packages/block-library/src/image/edit.native.js b/packages/block-library/src/image/edit.native.js index eabcdc9941a263..64a7c6a73eb45c 100644 --- a/packages/block-library/src/image/edit.native.js +++ b/packages/block-library/src/image/edit.native.js @@ -340,14 +340,6 @@ class ImageEdit extends React.Component { imageHeightWithinContainer, } = sizes; - if ( imageWidthWithinContainer === undefined ) { - return ( - - - - ); - } - let finalHeight = imageHeightWithinContainer; if ( height > 0 && height < imageHeightWithinContainer ) { finalHeight = height; @@ -362,6 +354,9 @@ class ImageEdit extends React.Component { { getInspectorControls() } { getMediaOptions() } + { ! imageWidthWithinContainer && + + }