Skip to content

Commit

Permalink
Revue Block: Update Input Placeholders Color and Default Text (#14888)
Browse files Browse the repository at this point in the history
- Update the Revue block placeholders color in the editor when the field is not being edited in order to make it look more like a placeholder than the value of an input field (which it technically is).
The chosen color is the same used by the Contact Form block for the same purpose.

- Update the Revue block placeholders default texts, removing the unnecessary "(Optional)" text, and making them more similar to the Mailchimp block placeholders.
  • Loading branch information
Copons authored Mar 5, 2020
1 parent 76ab061 commit e14653e
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 6 deletions.
6 changes: 3 additions & 3 deletions extensions/blocks/revue/attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,15 @@ export default {
},
emailPlaceholder: {
type: 'string',
default: __( 'Your email address', 'jetpack' ),
default: __( 'Enter your email address', 'jetpack' ),
},
firstNameLabel: {
type: 'string',
default: __( 'First name', 'jetpack' ),
},
firstNamePlaceholder: {
type: 'string',
default: __( 'First name… (Optional)', 'jetpack' ),
default: __( 'Enter your first name', 'jetpack' ),
},
firstNameShow: {
type: 'boolean',
Expand All @@ -38,7 +38,7 @@ export default {
},
lastNamePlaceholder: {
type: 'string',
default: __( 'Last name… (Optional)', 'jetpack' ),
default: __( 'Enter your last name', 'jetpack' ),
},
lastNameShow: {
type: 'boolean',
Expand Down
5 changes: 5 additions & 0 deletions extensions/blocks/revue/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,16 @@
.components-base-control {
margin-bottom: 16px;
}

.components-base-control__label {
display: block;
}

.components-placeholder__learn-more {
margin-top: 1em;
}

.components-text-control__input {
color: #72777c;
}
}
6 changes: 3 additions & 3 deletions extensions/blocks/revue/revue.php
Original file line number Diff line number Diff line change
Expand Up @@ -215,12 +215,12 @@ function jetpack_get_revue_attribute( $attribute, $attributes ) {
$default_attributes = array(
'text' => __( 'Subscribe', 'jetpack' ),
'emailLabel' => __( 'Email address', 'jetpack' ),
'emailPlaceholder' => __( 'Your email address', 'jetpack' ),
'emailPlaceholder' => __( 'Enter your email address', 'jetpack' ),
'firstNameLabel' => __( 'First name', 'jetpack' ),
'firstNamePlaceholder' => __( 'First name… (Optional)', 'jetpack' ),
'firstNamePlaceholder' => __( 'Enter your first name', 'jetpack' ),
'firstNameShow' => true,
'lastNameLabel' => __( 'Last name', 'jetpack' ),
'lastNamePlaceholder' => __( 'Last name… (Optional)', 'jetpack' ),
'lastNamePlaceholder' => __( 'Enter your last name', 'jetpack' ),
'lastNameShow' => true,
);

Expand Down

0 comments on commit e14653e

Please sign in to comment.