-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Domains: show info notice when user has domain credit #4881
Conversation
d49b005
to
42f1750
Compare
import { hasDomainCredit } from 'state/sites/plans/selectors'; | ||
import TrackComponentView from 'lib/analytics/track-component-view'; | ||
import { | ||
recordTracksEvent |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why line breaks here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good catch, I originally imported a few more actions.
3e154c4
to
23f8c14
Compare
const currentPlan = find( plans.data, 'currentPlan' ); | ||
return currentPlan.hasDomainCredit; | ||
} | ||
return null; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it isn't needed return null;
. We could remove this line here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In selectors we tend to return null
when we have an invalid/loading state
@@ -67,6 +76,19 @@ const List = React.createClass( { | |||
sitePlans={ this.props.sitePlans } /> | |||
{ this.domainWarnings() } | |||
|
|||
{ this.props.hasDomainCredit && <Notice |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is silly thing, but I prefer to have the beginning of the component element in a new line for visual scanning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated in 05585f6
Looking good to me, I'll pick up the work on the selectors for my nudge in current-site once it's merged. |
I'd like to be able to track the impact of this. Can we run a 90/10 test, where we display the reminder 90% of the time (as appropriate) and we don't display it 10% of the time, but we trigger an impression (or no-impression) event to track both cases, and then we can run both variants against refund numbers? This wouldn't be so much to determine whether this is a good thing to do (I think it's pretty clearly a positive), but rather to track the impact of the effort. |
23f8c14
to
05585f6
Compare
I'll add that in shortly. Edit: Updated in 78a1c88 |
}; | ||
}, ( dispatch ) => { | ||
return { | ||
clickClaimDomainNotice: () => dispatch( recordTracksEvent( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nice!
Works great! |
Thanks for the reviews! Going to squash and rebase |
4c31d96
to
90df60b
Compare
90df60b
to
c1c41f8
Compare
This PR adds an information notice to domains, when a user has purchased a plan upgrade but hasn't yet claimed their custom domain. Part of #4858

Testing Instructions
localStorage.setItem('debug', 'calypso:analytics');
localStorage.setItem('ABTests','{"domainCreditsInfoNotice_20160420":"showNotice"}')
localStorage.setItem('ABTests','{"domainCreditsInfoNotice_20160420":"original"}')
cc @rralian @mtias @dmsnell @artpi @retrofox @adambbecker