Skip to content

Commit

Permalink
Merge pull request #3728 from Automattic/add/domain-search-placeholde…
Browse files Browse the repository at this point in the history
…r-test

Domain Search: A/B test for the placeholder text and examples for the domains search field
  • Loading branch information
breezyskies committed Mar 4, 2016
2 parents 99183b7 + e19014d commit ecad150
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 3 deletions.
16 changes: 15 additions & 1 deletion client/components/domains/register-domain-step/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -166,6 +166,19 @@ var RegisterDomainStep = React.createClass( {
},

searchForm: function() {
var placeholderText = this.translate( 'Enter a domain or keyword' ),
exampleDomains = '';

if ( ! this.props.isInSigup && abtest( 'domainSearchPlaceholderText' ) === 'searchForADomain' ) {
placeholderText = 'Search for a domain';

exampleDomains = (
<div className="register-domain-step__search-examples">
e.g. example.com, example.net
</div>
);
}

return (
<div className="register-domain-step__search">
<SearchCard
Expand All @@ -175,11 +188,12 @@ var RegisterDomainStep = React.createClass( {
onSearch={ this.onSearch }
onSearchChange={ this.onSearchChange }
onBlur={ this.save }
placeholder={ this.translate( 'Enter a domain or keyword', { textOnly: true } ) }
placeholder={ placeholderText }
autoFocus={ true }
delaySearch={ true }
delayTimeout={ 2000 }
/>
{ exampleDomains }
</div>
);
},
Expand Down
7 changes: 7 additions & 0 deletions client/components/domains/register-domain-step/style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,13 @@
}
}

.register-domain-step__search-examples {
color: $gray;
font-size: 13px;
font-style: italic;
margin: 8px 0 0 0;
}

@keyframes shake {
0%, 100% {
transform: translate3d( 0, 0, 0 );
Expand Down
9 changes: 8 additions & 1 deletion client/lib/abtest/active-tests.js
Original file line number Diff line number Diff line change
Expand Up @@ -79,5 +79,12 @@ module.exports = {
defaultVariation: 'original',
excludeSitesWithPaidPlan: true
},

domainSearchPlaceholderText: {
datestamp: '20160304',
variations: {
original: 50,
searchForADomain: 50
},
defaultVariation: 'original'
},
};
3 changes: 2 additions & 1 deletion client/signup/steps/domains/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,8 @@ module.exports = React.createClass( {
offerMappingOption
analyticsSection="signup"
includeWordPressDotCom
showExampleSuggestions />
showExampleSuggestions
isInSigup />
);
},

Expand Down

0 comments on commit ecad150

Please sign in to comment.