-
Notifications
You must be signed in to change notification settings - Fork 25
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
Clean up the React app #820
Conversation
bluehost/bluehost-wordpress-plugin
|
description: __( | ||
"Contact one of our friendly Customer Care Specialists, as we are waiting to help at " + getSupportPhoneNumber() + ". Open 24 hours - 7 days.", | ||
`Contact one of our friendly Customer Care Specialists, as we are waiting to help at ${ getSupportPhoneNumber() }. Open 24 hours - 7 days.`, |
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.
Should we replace the hyphen with an en (–
) or em (—
) dash? Pedantically I think that is more appropriate, but also this is a very minor nitpick.
'wp-plugin-bluehost')} | ||
title={ __( 'Help', 'wp-plugin-bluehost' ) } | ||
subTitle={ __( | ||
'We are available 24/7 to help answer questions and solve your problems.', |
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.
We use "24 hours - 7 days" elsewhere, should these be consistent?
If this text comes from marketing or somewhere else, feel free to ignore.
src/app/pages/home/helpCard.js
Outdated
/> | ||
<p>From DIY to full-service help.</p> | ||
<p> | ||
Call or chat 24/7 for support or let our experts build |
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.
🔢 "24/7" vs "24 hours - 7 days"
'Oops, there was an error loading the marketplace, please try again later.', | ||
'bluehost-wordpress-plugin' | ||
), | ||
noProducts: __( | ||
'Sorry, no marketplace items. Please, try again later.', | ||
'bluehost-wordpress-plugin' |
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.
Can we make the "Please try again later" consistent?
I'd suggest , please try again later.
for both.
'bluehost-wordpress-plugin' | ||
), | ||
noProducts: __( | ||
'Sorry, no marketplace items. Please, try again later.', |
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.
Can we change this to "Sorry, no marketplace items found" to be more clear?
<SectionHeader | ||
title={ __( 'Performance', 'wp-plugin-bluehost' ) } | ||
subTitle={ __( | ||
'This is where you can manage cache settings for your website.', |
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.
Is the "This is where you" necessary?
Maybe simplify to "Manage your website's cache settings"?
'Coming soon page is active. Site requires login.', | ||
'wp-plugin-bluehost' | ||
) | ||
'Coming soon page is active. Site requires login.', |
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.
'Coming soon page is active. Site requires login.', | |
'Coming soon page is active. Site is only accessible to logged in users.', |
'Coming soon page is not active. Site is live to visitors.', | ||
'wp-plugin-bluehost' | ||
); | ||
'Coming soon page is not active. Site is live to visitors.', |
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.
'Coming soon page is not active. Site is live to visitors.', | |
'Coming soon page is not active. Site is public and accessible to all visitors.', |
<Alert variant="info"> | ||
{__('Your website is currently displaying a "Coming Soon" page.', 'wp-plugin-bluehost')} | ||
{ __( | ||
'Your website is currently displaying a "Coming Soon" page.', |
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.
'Your website is currently displaying a "Coming Soon" page.', | |
'Your site is currently displaying a "Coming Soon" page.', |
If we prefer "website", then there's a few other places we should update from "site" → "website" for consistency.
<Alert variant="error"> | ||
{__('Oops! Something went wrong. Please try again.', 'wp-plugin-bluehost')} | ||
{ __( | ||
'Oops! Something went wrong. Please try again.', |
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.
🔢 Related to previous comments about "please try again", let's have this match whatever gets decided there.
'Comments on posts are disabled after ', | ||
'wp-plugin-bluehost' | ||
) + | ||
closeCommentsDays + | ||
_n(' day.', ' days.', parseInt(closeCommentsDays), 'wp-plugin-bluehost') | ||
_n( | ||
' day.', | ||
' days.', | ||
parseInt( closeCommentsDays ), | ||
'wp-plugin-bluehost' |
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 should be using sprintf
to fill the closeCommentsDays
and the day
/days
, not all languages will follow the same grammatical format as English.
<SectionHeader | ||
title={ __( 'Settings', 'wp-plugin-bluehost' ) } | ||
subTitle={ __( | ||
'This is where you can manage common settings for your website.', |
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 where you can manage X" vs "Manage X"
nextWebinar.hasTime = nextWebinar.time ? true : false; | ||
nextWebinar.link = nextWebinar.link ?? 'https://www.bluehost.com/blog/events/'; | ||
nextWebinar.link = | ||
nextWebinar.link ?? 'https://www.bluehost.com/blog/events/'; | ||
nextWebinar.ctaText = nextWebinar.ctaText ?? 'Register Now'; |
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.
🔢 Need to make this translatable
src/app/pages/home/helpCard.js
Outdated
src={ SupportIllustration } | ||
alt="Help Agent Illustration" | ||
/> | ||
<p>From DIY to full-service help.</p> |
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.
🔢 Need to make this translatable
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.
Addressed in this commit: f2189f1
<Alert variant="error"> | ||
{__('Oops! Something went wrong. Please try again.', 'wp-plugin-bluehost')} | ||
{ __( | ||
'Oops! Something went wrong. Please try again.', |
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.
🔢 please try again consistency
|
||
/** | ||
* Wrapper method to dispatch snackbar notice | ||
* | ||
* @param string text text for notice | ||
* @param text | ||
* @param {string} text text for 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.
* @param {string} text text for notice | |
* @param {string} text Text for notice. |
* @param {Object} data object of data | ||
* @param {Function} passError setter for the error in component | ||
* @param {Function} thenCallback method to call in promise then |
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.
* @param {Object} data object of data | |
* @param {Function} passError setter for the error in component | |
* @param {Function} thenCallback method to call in promise then | |
* @param {Object} data Object of data. | |
* @param {Function} passError Setter for the error in component. | |
* @param {Function} thenCallback Method to call in promise then. |
* @param {Object} data object of data | ||
* @param {Function} passError setter for the error in component | ||
* @param {Function} thenCallback method to call in promise then |
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.
* @param {Object} data object of data | |
* @param {Function} passError setter for the error in component | |
* @param {Function} thenCallback method to call in promise then | |
* @param {Object} data Object of data. | |
* @param {Function} passError Setter for the error in component. | |
* @param {Function} thenCallback Method to call in promise then. |
comingsoonadminbar.style.color = "#E01C1C"; | ||
comingsoonadminbar.textContent = "Coming Soon"; | ||
comingsoonadminbar.style.color = '#E01C1C'; | ||
comingsoonadminbar.textContent = 'Coming Soon'; |
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.
🔢 translation strings
@bradp Thanks for your feedback. I addressed some of your comments in this commit: f2189f1 I think most of what's left is a language/copy change that we should address in a different PR in a more thought-out way. Since this language is being used across other brand plugins, so we don't have to go back and change it again. |
Add some pizzazz to the "Welcome to Bluehost" console.log
…eaner-imports * update/react-app-cleanup: Fix minor ESLint issue after PR merge Translate strings Fix linting Update console ascii art Update eslint.yml Remove example page Add php dependencies to eslint action Move handlePageLoad function to react hook ESLint action Fix webinar banner component lint issue Other lint fixes Add `eslint` and lint js files # Conflicts: # src/app/data/routes.js # webpack.config.js
…mports Add module alias for cleaner imports
1 flaky test on run #5511 ↗︎
Details:
tests/cypress/integration/help.cy.js • 1 flaky test
Review all test suite changes for PR #820 ↗︎ |
Proposed changes
Since we moved a little bit quickly in 3.0 release, we didn't have enough time to clean up old code and structure the app properly, also we received new components/code from other teams with little time to give feedback. This PR aims to clean up the code of the React app including:
plugin:@wordpress/eslint-plugin/recommended
.Todo:
Type of Change
Checklist
Further comments