-
Notifications
You must be signed in to change notification settings - Fork 297
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
Add URL params when initiating an RRM publication creation #10166
Comments
Hey @nfmohit, thanks for drafting this IB. A couple of points:
This addition shouldn't be needed, as we're already passing
It shouldn't be necessary to call |
Thank you for the kind IBR feedback, @techanvil !
Thank you. I did notice that, but it appears that the locale included in That is a good point, removed, thank you! |
Thanks @nfmohit!
That's a good point, yes, using the site locale does make sense here. I'd suggest a couple of tweaks, then:
|
Updated the IB accordingly, thank you @techanvil! Just a note that I've increased the estimate by a notch as we've specced a new selector and have included the GFI label in this one. Thanks! |
That's great, thanks @nfmohit. The IB LGTM! IB ✅ |
QA Update: ✅Verified:
Examples:
|
Feature Description
When navigating the user to the Publisher Center to create a new Reader Revenue Manager publication, in addition to the existing
utm_source=sitekit
parameter, three new parameters should be included, as follows:Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
rrmModuleV2
feature flag is enabled:prefill_canonical_domain
: This should equal to the site's reference URL.prefill_lang
: This should be obtained from WordPress, e.g. by using theget_locale
WordPress function, but replacing the underscore (e.g.en_US
) with a dash (e.g.en-US
).app_redirect
: This should equal torrm
.Implementation Brief
includes/Core/Assets/Assets.php
:get_inline_base_data()
method to include asiteLocale
item in the$inline_data
array. Its value should be obtained using the$this->context->get_locale()
method.assets/js/googlesitekit/datastore/site/info.js
:getSiteInfo()
selector (including its relevant resolver and reducer) to outputsiteLocale
fromglobal._googlesitekitBaseData
.getSiteLocale()
, that obtainssiteLocale
using thegetSiteInfo()
selector and replaces the underscore, if exists (e.g.en_US
), with a dash (e.g.en-US
). SeegetLocale
for reference.assets/js/modules/reader-revenue-manager/datastore/service.js
:getCreatePublicationLinkURL()
. It should return the service URL using thegetServiceURL
selector, including the query parameters specified in the ACs, as follows:prefill_canonical_domain
: Its value should be the site's reference URL, obtainable using theCORE_SITE
getReferenceSiteURL()
selector.prefill_lang
: Its value should be the site's locale obtained using theCORE_SITE
getSiteLocale()
selector.app_redirect
: Its value should berrm
.assets/js/modules/reader-revenue-manager/components/common/PublicationCreate.js
andassets/js/modules/reader-revenue-manager/components/setup/SetupForm.js
:serviceURL
if therrmModuleV2
feature flag is enabled to use the newgetCreatePublicationLinkURL()
selector instead ofgetServiceURL
.Test Coverage
assets/js/googlesitekit/datastore/site/info.test.js
:locale
information is included in thegetSiteInfo()
selector.getSiteLocale()
selector.assets/js/modules/reader-revenue-manager/datastore/service.test.js
:getCreatePublicationLinkURL
selector.assets/js/modules/reader-revenue-manager/components/common/PublicationCreate.test.js
:rrmModule
feature flag is enabled.QA Brief
rrmModule
feature flag."Create Publication"
button, it should contain the following query attributes in the URL:prefill_canonical_domain
: Its value should be the site's URL.prefill_lang
: Its value should be the site's locale.app_redirect
: Its value should berrm
.Changelog entry
The text was updated successfully, but these errors were encountered: