Skip to content
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

Merged
merged 2 commits into from
Dec 1, 2021

Conversation

cphilleo
Copy link
Contributor

@cphilleo cphilleo commented Nov 29, 2021

Changes proposed in this Pull Request

  • Remove the requirement to collect WordAds owner information for US residents.
  • Clarify requirements for a valid PayPal email

Testing instructions

  • Apply Phab Diff D70725-code — This removes the server side requirements
  • In Calypso go to WordAds settings
  • The only field under Payment Information should be the users PayPal email
  • Save and update settings.
  • Verify no errors, and settings saved correctly

Screen Shot 2021-12-01 at 11 24 33 AM

@github-actions
Copy link

github-actions bot commented Nov 29, 2021

@matticbot
Copy link
Contributor

matticbot commented Nov 29, 2021

Here is how your PR affects size of JS and CSS bundles shipped to the user's browser:

Sections (~1460 bytes removed 📉 [gzipped])

name  parsed_size           gzip_size
earn      -6381 B  (-1.5%)    -1460 B  (-1.2%)

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.
Gzip Size: Compressed size of the JS and CSS files. This much data needs to be downloaded over network.

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>
Copy link

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

@cphilleo cphilleo force-pushed the update/remove-wordads-owner-data branch from 3e5d67a to 05a676e Compare November 29, 2021 19:27
@cphilleo cphilleo changed the title Stop collecting WordAds owner information for US residents WordAds: Stop collecting WordAds owner information for US residents Nov 30, 2021
@cphilleo cphilleo self-assigned this Nov 30, 2021
@cphilleo cphilleo added the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Nov 30, 2021
@cphilleo cphilleo requested a review from tyxla November 30, 2021 01:35
Copy link
Member

@tyxla tyxla left a 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';
Copy link
Member

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?

Copy link
Contributor Author

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?

Copy link
Member

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,
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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.

client/my-sites/earn/ads/form-settings.jsx Outdated Show resolved Hide resolved
<FormFieldset>
<FormLabel htmlFor="who_owns">{ translate( 'Who owns this site?' ) }</FormLabel>
<FormSelect
name="who_owns"
Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Member

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! 🚀

@cphilleo cphilleo requested a review from tyxla November 30, 2021 17:49
Copy link
Member

@tyxla tyxla left a 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 🚢

@cphilleo cphilleo merged commit a02ac36 into trunk Dec 1, 2021
@cphilleo cphilleo deleted the update/remove-wordads-owner-data branch December 1, 2021 17:46
@github-actions github-actions bot removed the [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. label Dec 1, 2021
@a8ci18n
Copy link

a8ci18n commented Dec 1, 2021

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.

@a8ci18n
Copy link

a8ci18n commented Dec 9, 2021

Translation for this Pull Request has now been finished.

nelsonec87 pushed a commit that referenced this pull request Dec 9, 2021
…58600)

* Update UX to stop asking for owner data

* Split text onto multiple lines
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants