-
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
Themes: ES6ify all the things #5315
Conversation
733eff5
to
ca472ca
Compare
const oldShowcaseUrl = '//wordpress.com/themes/'; | ||
|
||
export function getSignupUrl( theme ) { | ||
let url = '/start/with-theme?ref=calypshowcase&theme=' + theme.id; |
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's a nice opportunity to apply templates literals
let url = `/start/with-theme?ref=calypshowcase&theme${ theme.id }`;
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.
TBH, I'd like to stick with simple concatenation here, since it's only two strings (plus, concatenation is more efficient than template strings ;-) )
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.
👍
|
No, that's pretty much it. Plus the usual ES6 stuff ( |
feca13d
to
ba9546e
Compare
Rebased on |
I don't see anything suspicious here. Seems fine with brief testing. 🚢 |
ba9546e
to
0479147
Compare
This ES6ifies most if not all of
my-sites/themes
, and then some. Main objective is more granular imports ofhelpers
(no morethis
references), and generally better ease-of-use (e.g. to also replacesignup
andcustomize
actions by theirget...Url()
counterparts further down the road, cf #5284).This is a change that touches a lot of files, so be sure to give it a thorough testing (try different flows in the theme showcase, be sure to cover all possible actions; use e2e tests!)