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

Update AdSense account statuses based on new API capabilities #5051

Closed
felixarntz opened this issue Apr 7, 2022 · 5 comments
Closed

Update AdSense account statuses based on new API capabilities #5051

felixarntz opened this issue Apr 7, 2022 · 5 comments
Labels
Module: AdSense Google AdSense module related issues P0 High priority QA: Eng Requires specialized QA by an engineer Type: Enhancement Improvement of an existing feature

Comments

@felixarntz
Copy link
Member

felixarntz commented Apr 7, 2022

Based on the recently released new AdSense API capabilities and the corresponding enhancements to the design doc, some of the account statuses we need to support needs to be tweaked. This is essentially a follow-up to #4755.


Do not alter or remove anything below. The following sections will be managed by moderators only.

Acceptance criteria

  • The AdSense account status constants should be tweaked as follows:
    • The ACCOUNT_STATUS_APPROVED status should be moved to the group of "V1 setup flow" constants, as going forward it will be replaced with a new ACCOUNT_STATUS_READY (value: "ready"). The latter should be added to the "V2 setup flow" group accordingly.
    • The ACCOUNT_STATUS_PENDING_TASKS status should be entirely replaced (not moved!) with a new ACCOUNT_STATUS_NEEDS_ATTENTION (value: "needs-attention").
      • Any of its usages in the codebase should then obviously be updated accordingly.
    • The following additional account statuses should be added to the "V2 setup flow" group:
      • ACCOUNT_STATUS_CLIENT_REQUIRES_REVIEW (value: "client-requires-review")
      • ACCOUNT_STATUS_CLIENT_GETTING_READY (value: "client-getting-ready")
  • All usages of ACCOUNT_STATUS_APPROVED in the V2 components should be replaced with using ACCOUNT_STATUS_READY instead.
  • Any potential references to the changed statuses in V2 Storybook should also be updated.

Implementation Brief

  • Using assets/js/modules/adsense/util/status.js, update the statuses as per the AC.
  • Update the use of ACCOUNT_STATUS_PENDING_TASKS by ACCOUNT_STATUS_NEEDS_ATTENTION across the codebase. At the time of writing, assets/js/modules/adsense/components/setup/v2/SetupAccount.js is the only file that needs to be updated.
  • Update the use of ACCOUNT_STATUS_APPROVED by ACCOUNT_STATUS_READY within files in assets/js/modules/adsense/components/setup/v2 and stories if need to be.

Test Coverage

  • No new tests to be added.

QA Brief

  • Ensure the stories under AdSense -> Components -> Setup -> v2 -> SetupMain render correctly.
  • Ensure the above constants were added.

Changelog entry

  • Update AdSense V2 code constants to use new API capabilities.
@felixarntz felixarntz added P0 High priority Type: Enhancement Improvement of an existing feature Module: AdSense Google AdSense module related issues labels Apr 7, 2022
@felixarntz felixarntz assigned felixarntz and unassigned felixarntz Apr 7, 2022
@asvinb asvinb assigned asvinb and unassigned asvinb Apr 8, 2022
@eugene-manuilov eugene-manuilov self-assigned this Apr 11, 2022
@eugene-manuilov
Copy link
Collaborator

IB ✔️

@eugene-manuilov eugene-manuilov removed their assignment Apr 11, 2022
@asvinb asvinb assigned asvinb and unassigned asvinb Apr 13, 2022
@tofumatt tofumatt assigned tofumatt and unassigned tofumatt Apr 13, 2022
@wpdarren
Copy link
Collaborator

QA Upate: ⚠️

@asvinb I feel I need more direction on what I should expect to see in the stories?

E.g. I am looking at the first component in the AC

... as going forward it will be replaced with a new ACCOUNT_STATUS_READY (value: "ready"). The latter should be added to the "V2 setup flow" group accordingly.

This is what I see on the Site Ready story I don't see any UI, just this TODO message.

image

Is this what I would expect to see? Am I missing something? Thoughts welcome! 😄

@wpdarren wpdarren self-assigned this Apr 14, 2022
@asvinb
Copy link
Collaborator

asvinb commented Apr 14, 2022

@wpdarren That is correct. Those are only placeholders for now till we actually build the UI for them.

@asvinb asvinb added the QA: Eng Requires specialized QA by an engineer label Apr 14, 2022
@wpdarren
Copy link
Collaborator

wpdarren commented Apr 14, 2022

QA Update: ✅

I have gone through Storybook and confirmed placeholders for the components in the AC.

The ticket has been labelled QA:Eng because in the AC it says Any of its usages in the codebase should then obviously be updated accordingly.

@wpdarren wpdarren assigned wpdarren and unassigned wpdarren Apr 14, 2022
@hussain-t hussain-t self-assigned this Apr 18, 2022
@hussain-t
Copy link
Collaborator

QA Verified ✅

  • Verified the stories under AdSense -> Components -> Setup -> v2 -> SetupMain render correctly.
  • Verified the constants were added/removed as per the AC.

@hussain-t hussain-t removed their assignment Apr 18, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Module: AdSense Google AdSense module related issues P0 High priority QA: Eng Requires specialized QA by an engineer Type: Enhancement Improvement of an existing feature
Projects
None yet
Development

No branches or pull requests

6 participants