Refined copy

no refs.
This commit is contained in:
Peter Zimon 2020-11-10 16:39:37 +01:00
parent 6587eca37d
commit 32d4949e1d
11 changed files with 15 additions and 13 deletions

View File

@ -16,7 +16,7 @@ const DEV_MODE_DATA = {
showPopup: true,
site: Fixtures.site,
member: Fixtures.member.paid,
page: 'accountHome'
page: 'accountPlan'
};
export default class App extends React.Component {
constructor(props) {

View File

@ -261,6 +261,7 @@ function PlanOptions({plans, selectedPlan, onPlanSelect, changePlan}) {
const isChecked = selectedPlan === name;
const classes = (isChecked ? 'gh-portal-plan-section checked' : 'gh-portal-plan-section');
const planDetails = {};
let displayName = '';
switch (name) {
case 'Free':
planDetails.feature = 'Free preview';
@ -270,6 +271,7 @@ function PlanOptions({plans, selectedPlan, onPlanSelect, changePlan}) {
planDetails.feature = 'Full access';
break;
case 'Yearly':
displayName = 'Annually';
planDetails.feature = ((hasMonthlyPlan && discount > 0) ? (discount + '% discount') : 'Full access');
break;
@ -279,7 +281,7 @@ function PlanOptions({plans, selectedPlan, onPlanSelect, changePlan}) {
return (
<div className={classes} key={name} onClick={e => onPlanSelect(e, name)}>
<Checkbox name={name} isChecked={isChecked} onPlanSelect={onPlanSelect} />
<h4 className='gh-portal-plan-name'>{name}</h4>
<h4 className='gh-portal-plan-name'>{displayName || name}</h4>
<PriceLabel name={name} currency={currency} price={price} />
<div className='gh-portal-plan-featurewrapper'>
<div className='gh-portal-plan-feature'>

View File

@ -107,7 +107,7 @@ const AccountFooter = ({onClose, handleSignout, supportAddress = ''}) => {
return (
<footer className='gh-portal-account-footer'>
<ul className='gh-portal-account-footermenu'>
<li><button className='gh-portal-btn' name='logout' aria-label='logout' onClick={e => handleSignout(e)}>Logout</button></li>
<li><button className='gh-portal-btn' name='logout' aria-label='logout' onClick={e => handleSignout(e)}>Sign out</button></li>
</ul>
<div className='gh-portal-account-footerright'>
<ul className='gh-portal-account-footermenu'>

View File

@ -110,7 +110,7 @@ const PlanConfirmationSection = ({action, member, plan, type, brandColor, onConf
let planStartDate = getDateString(subscription.current_period_end);
const currentActivePlan = getMemberActivePlan({member});
if (currentActivePlan.type !== plan.type) {
planStartDate = 'immediately';
planStartDate = 'today';
}
const planStartMessage = `${plan.currency}${plan.price}/${plan.type} Starting ${planStartDate}`;
if (type === 'changePlan') {

View File

@ -31,9 +31,9 @@ export default class MagicLinkPage extends React.Component {
<section className='gh-portal-inbox-notification'>
<header className='gh-portal-header'>
<EnvelopeIcon className='gh-portal-icon gh-portal-icon-envelope' />
<h2>Check your inbox!</h2>
<h2>We've sent you a login link!</h2>
</header>
<p>Check your inbox and click on the login link to complete the signin.</p>
<p>If the email doesn't arrive in 3 minutes, be sure to check your spam folder!</p>
</section>
);
}

View File

@ -6,7 +6,7 @@ const setup = (overrides) => {
const {mockOnActionFn, ...utils} = render(
<MagicLinkPage />
);
const inboxText = utils.getByText(/check your inbox!/i);
const inboxText = utils.getByText(/we've sent you a login link/i);
const closeBtn = utils.queryByRole('button', {name: 'Close'});
return {
inboxText,

View File

@ -74,7 +74,7 @@ export default class SigninPage extends React.Component {
const {action} = this.context;
let retry = false;
const isRunning = (action === 'signin:running');
let label = isRunning ? 'Sending login link...' : 'Send login link';
let label = isRunning ? 'Sending login link...' : 'Continue';
const disabled = isRunning ? true : false;
if (action === 'signin:failed') {
label = 'Retry';

View File

@ -12,7 +12,7 @@ const setup = (overrides) => {
}
);
const emailInput = utils.getByLabelText(/email/i);
const submitButton = utils.queryByRole('button', {name: 'Send login link'});
const submitButton = utils.queryByRole('button', {name: 'Continue'});
const signupButton = utils.queryByRole('button', {name: 'Sign up'});
return {
emailInput,

View File

@ -387,7 +387,7 @@ class SignupPage extends React.Component {
style={{color: brandColor}}
onClick={() => onAction('switchPage', {page: 'signin'})}
>
Log in
Sign in
</button>
</div>
);
@ -442,7 +442,7 @@ class SignupPage extends React.Component {
renderFormHeader() {
const {site} = this.context;
const siteTitle = site.title || 'Site Title';
const siteTitle = site.title || '';
return (
<header className='gh-portal-signup-header'>

View File

@ -14,7 +14,7 @@ const setup = (overrides) => {
const emailInput = utils.getByLabelText(/email/i);
const nameInput = utils.getByLabelText(/name/i);
const submitButton = utils.queryByRole('button', {name: 'Continue'});
const signinButton = utils.queryByRole('button', {name: 'Log in'});
const signinButton = utils.queryByRole('button', {name: 'Sign in'});
return {
nameInput,
emailInput,

View File

@ -4,7 +4,7 @@ export const FormInputError = ({field}) => {
if (field.required && !field.value) {
switch (field.name) {
case 'name':
return `What should we call you?`;
return `Enter your name`;
case 'email':
return `Enter your email address`;