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

Mobile Block Placeholder fixes #13945

Merged
merged 9 commits into from
Feb 20, 2019
2 changes: 1 addition & 1 deletion packages/block-library/src/heading/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ import { createBlock } from '@wordpress/blocks';
*/
import './editor.scss';

const minHeight = 50;
const minHeight = 24;

class HeadingEdit extends Component {
constructor( props ) {
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/paragraph/edit.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ class ParagraphEdit extends Component {
onContentSizeChange={ ( event ) => {
this.setState( { aztecHeight: event.aztecHeight } );
} }
placeholder={ placeholder || __( 'Add text or type / to add content' ) }
placeholder={ placeholder || __( 'Start writing…' ) }
/>
</View>
);
Expand Down
2 changes: 1 addition & 1 deletion packages/block-library/src/paragraph/style.native.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
.blockText {
min-height: 50;
min-height: 24;
}
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import { TextInput, TouchableWithoutFeedback, View } from 'react-native';
/**
* WordPress dependencies
*/
import { __, sprintf } from '@wordpress/i18n';
import { __ } from '@wordpress/i18n';
import { compose } from '@wordpress/compose';
import { decodeEntities } from '@wordpress/html-entities';
import { withSelect, withDispatch } from '@wordpress/data';
Expand All @@ -26,7 +26,7 @@ export function DefaultBlockAppender( {
return null;
}

const value = decodeEntities( placeholder ) || sprintf( __( 'Start writing or press %s to add content' ), '\u2295' );
const value = decodeEntities( placeholder ) || __( 'Start writing' );

return (
<TouchableWithoutFeedback
Expand Down
Original file line number Diff line number Diff line change
@@ -1,14 +1,21 @@
// @format

@import "variables.scss";
@import "colors.scss";

.blockHolder {
flex: 1 1 auto;
}

.blockContainer {
background-color: $white;
padding: 8px;
padding-top: 0;
padding-left: 16px;
padding-right: 16px;
}

.textView {
color: #87a6bc;
color: $gray;
font-size: 16px;
font-family: $default-regular-font;
}
2 changes: 1 addition & 1 deletion packages/editor/src/components/post-title/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { withDispatch } from '@wordpress/data';
import { withFocusOutside } from '@wordpress/components';
import { withInstanceId, compose } from '@wordpress/compose';

const minHeight = 53;
const minHeight = 30;

class PostTitle extends Component {
constructor() {
Expand Down
2 changes: 1 addition & 1 deletion packages/editor/src/components/rich-text/index.native.js
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ export class RichText extends Component {
} }
text={ { text: html, eventCount: this.lastEventCount } }
placeholder={ this.props.placeholder }
placeholderTextColor={ this.props.placeholderTextColor || 'lightgrey' }
placeholderTextColor={ this.props.placeholderTextColor || styles[ 'editor-rich-text' ].textDecorationColor }
onChange={ this.onChange }
onFocus={ this.props.onFocus }
onBlur={ this.props.onBlur }
Expand Down
2 changes: 2 additions & 0 deletions packages/editor/src/components/rich-text/style.native.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
@import "variables.scss";
@import "colors.scss";

.editor-rich-text {
font-family: $default-regular-font;
text-decoration-color: $gray;
}