Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Native mobile] Bring release v1.0.1 back to "mobile develop" #14075

Merged
merged 2 commits into from
Feb 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions packages/block-library/src/heading/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand All @@ -47,6 +45,9 @@ class HeadingEdit extends Component {
} = attributes;

const tagName = 'h' + level;

const minHeight = styles.blockText.minHeight;

return (
<View>
<BlockControls>
Expand Down
5 changes: 5 additions & 0 deletions packages/block-library/src/heading/style.native.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
@import "variables.scss";

.blockText {
min-height: $min-height-heading;
}
11 changes: 3 additions & 8 deletions packages/block-library/src/image/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -340,14 +340,6 @@ class ImageEdit extends React.Component {
imageHeightWithinContainer,
} = sizes;

if ( imageWidthWithinContainer === undefined ) {
return (
<View style={ styles.imageContainer } >
<Dashicon icon={ 'format-image' } size={ 300 } />
</View>
);
}

let finalHeight = imageHeightWithinContainer;
if ( height > 0 && height < imageHeightWithinContainer ) {
finalHeight = height;
Expand All @@ -362,6 +354,9 @@ class ImageEdit extends React.Component {
<View style={ { flex: 1 } } >
{ getInspectorControls() }
{ getMediaOptions() }
{ ! imageWidthWithinContainer && <View style={ styles.imageContainer } >
<Dashicon icon={ 'format-image' } size={ 300 } />
</View> }
<ImageBackground
style={ { width: finalWidth, height: finalHeight, opacity } }
resizeMethod="scale"
Expand Down
4 changes: 3 additions & 1 deletion packages/block-library/src/paragraph/style.native.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "variables.scss";

.blockText {
min-height: 24;
min-height: $min-height-paragraph;
}
4 changes: 2 additions & 2 deletions packages/editor/src/components/post-title/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,6 @@ import { withInstanceId, compose } from '@wordpress/compose';
*/
import styles from './style.scss';

const minHeight = 30;

class PostTitle extends Component {
constructor() {
super( ...arguments );
Expand Down Expand Up @@ -72,6 +70,8 @@ class PostTitle extends Component {
const decodedPlaceholder = decodeEntities( placeholder );
const borderColor = this.state.isSelected ? focusedBorderColor : 'transparent';

const minHeight = styles.blockText.minHeight;

return (
<View style={ [ styles.titleContainer, borderStyle, { borderColor } ] }>
<RichText
Expand Down
4 changes: 4 additions & 0 deletions packages/editor/src/components/post-title/style.native.scss
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@

@import "variables.scss";

.blockText {
min-height: $min-height-title;
}

.titleContainer {
padding-left: 16;
padding-right: 16;
Expand Down