-
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
WordAds: Stop collecting WordAds owner information for US residents #58600
Conversation
Link to Calypso live: https://calypso.live?image=registry.a8c.com/calypso/app:build-20806 |
Here is how your PR affects size of JS and CSS bundles shipped to the user's browser: Sections (~1460 bytes removed 📉 [gzipped])
Sections contain code specific for a given set of routes. Is downloaded and parsed only when a particular route is navigated to. Legend What is parsed and gzip size?Parsed Size: Uncompressed size of the JS and CSS files. This much code needs to be parsed and stored in memory. Generated by performance advisor bot at iscalypsofastyet.com. |
<FormSectionHeading>{ translate( 'Site Owner Information' ) }</FormSectionHeading> | ||
{ this.siteOwnerOptions() } | ||
{ this.state.us_checked ? this.taxOptions() : null } | ||
<FormSectionHeading>{ translate( 'Payment Information' ) }</FormSectionHeading> |
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.
ℹ️ String reuse speeds up translation and improves consistency. The following string might make a good alternative and has already been translated 22 times:
translate( 'Stored Payment Information' )
ES Score: 6
See 1 additional suggestions in the PR translation status page
3e5d67a
to
05a676e
Compare
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 a great cleanup, thank you ❤️
One thing that came up in testing for me though: when attempting to change the settings for an existing site, I got this error from the endpoint:
Looking at the endpoint code, it seems that this is caused by the absence of the who_owns
field.
I've also added some suggestions for further cleanup in this area, if you're interested.
import FormSettingExplanation from 'calypso/components/forms/form-setting-explanation'; | ||
import FormTextInput from 'calypso/components/forms/form-text-input'; | ||
import FormTextarea from 'calypso/components/forms/form-textarea'; | ||
import StateSelector from 'calypso/components/forms/us-state-selector'; |
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.
Besides the use in devdocs
, this is the last usage of the StateSelector
component. Would you like to remove it, too, as part of this PR?
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.
It might be a useful component for someone else to use? If it helps to reduce the build though, we can remove it. Would it be better to do it on a separate PR for visibility and to make it easier to revert later if someone wants the component?
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 agree it could be useful, but there's also a chance it may be unused forever 😉
It's easy enough to dig out of history anyway.
A separate PR to clean it up would be ace! Let me know if you need any help or a review.
addr1: '', | ||
addr2: '', | ||
city: '', | ||
name: '', | ||
optimized_ads: false, |
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.
There's also an unused additionalAdsOption
method - would you like to clean it up further? If we remove it, it looks like we can get rid of the optimized_ads
setting default value as well, since it looks like it's not used.
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.
Thanks for noticing this. I have a separate follow-up ticket to investigate where we are using optimized_ads
and whether we should remove it, or make the option available again. For now, we'll leave the default.
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.
Thanks! Let me know if I can aid with reviews or anything there.
<FormFieldset> | ||
<FormLabel htmlFor="who_owns">{ translate( 'Who owns this site?' ) }</FormLabel> | ||
<FormSelect | ||
name="who_owns" |
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 keep this field? Seems like its absence is preventing me from saving the settings.
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.
Oops, I forgot to link to the WPCOM patch that will remove this requirement: D70725-code
Once that is applied these fields will no longer be required server-side.
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.
Works well with the patch! 🚀
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.
Code LGTM and this works well 🚢
This Pull Request is now available for translation here: https://translate.wordpress.com/deliverables/7011203 Thank you @cphilleo for including a screenshot in the description! This is really helpful for our translators. |
Translation for this Pull Request has now been finished. |
…58600) * Update UX to stop asking for owner data * Split text onto multiple lines
Changes proposed in this Pull Request
Testing instructions