Closed felixarntz closed 10 months ago
@eclarke1 @FlicHollis Just to clarify here, while this already has ACs and relates to the AdSense setup improvements epic, it should not be worked on at this point - this issue for some time after launch.
@felixarntz I think this one can be resumed now that we've been rolled out to 100% for some time now?
@aaemnnosttv Yeah, was thinking about that the other day, didn't remember we already had an issue :)
@bethanylang Let's revisit this once #5628 is done.
@aaemnnosttv We can pick this one back up now. However, we need to keep some of the V1 constants and things since those are used for the migration. Cheers.
IB ✔️
There is still a reference to v2 in the AdSense component stories. This was referenced in the IB but not part of the AC. We can clean this up in a follow-up issue.
This issue is about removing the
adsenseSetupV2
feature flag at some point, later in the future once the module has been launched and rolled out to 100% of sites. This will also allow us to delete a bunch of then unused code.This is related to the #4447 epic, but does not belong to it, since this issue can only be worked some time after launch.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
adsenseSetupV2
feature flag is present, remove the condition and the respective other code path (i.e. when the condition isfalse
).assets/js/modules/adsense/components/setup/
, except those in thev2
directory of course) should be removed.assets/js/modules/adsense/components/setup/v2/
should be moved one directory up, intoassets/js/modules/adsense/components/setup/
, then thev2
directory should be deleted.getServiceAccountSiteURL
) should be removed.Implementation Brief
assets/js/modules/adsense/index.js
assets/js/modules/adsense/components/common/ErrorNotices.js
assets/js/modules/adsense/components/module/ModuleOverviewWidget/index.js
assets/js/modules/adsense/components/settings/SettingsView.js
assets/js/modules/adsense/datastore/service.js
feature-flags.json
getSiteStatusLinkLabel
helper function inassets/js/modules/adsense/components/settings/utils.js
assets/js/modules/adsense/util/status.js
, as they are used inlegacyAccountStatuses
to determine if migration should be done inassets/js/modules/adsense/components/module/ModuleOverviewWidget/StatusMigration.js
Replace old
V1
files withV2
filesassets/js/modules/adsense/components/setup/
(except from anything fromV2
folder):index.js
and it's imports, which includes:SetupAccount***.js
SetupMain.js
SetupSiteAdd.js
SetupSiteAdded.js
utils.js
assets/js/modules/adsense/components/setup/v2/
one level up, update the paths, and removeV2
foolderSetupMainV2
inassets/js/modules/adsense/index.js
will be only setup file after feature flag removal andV2
folder move, so rename it toSetupMain
V2
text from document descriptionDatastore and util functions
determineAccountStatus
,determineAccountID
,determineSiteStatus
anddetermineClientID
fromassets/js/modules/adsense/util/status.js
getOriginalAccountStatus
selector and resolver from:assets/js/modules/adsense/datastore/settings.js
getServiceAccountSiteURL
fromassets/js/modules/adsense/datastore/service.js
alerts
store seems to be only used inV1
(beside havingreceiveGetAlerts
inV2
stories file, but it does nothing as it is not used anywhere inV2
files), so it can be removedassets/js/modules/adsense/datastore/alerts.js
assets/js/modules/adsense/datastore/urlchannels.js
as it seems it is only used withV1
as well (besidereceiveGetURLChannels
being present inV2
stories, which does nothing, likealerts
)Test Coverage
assets/js/modules/adsense/components/setup/v2/SetupMain.stories.js
stories/module-adsense-components.stories.js
assets/js/modules/adsense/util/status.test.js
, remove:determineAccountStatus
,determineAccountID
,determineSiteStatus
anddetermineClientID
functions and it's usagegetOriginalAccountStatus
and it's usageassets/js/modules/adsense/datastore/alerts.test.js
asalerts
store is also deletedV2
setupassets/js/modules/adsense/datastore/urlchannels.test.js
urlchannels
store usage in this stories here as it does nothingstories/module-adsense-setup.stories.js
QA Brief
Changelog entry