-
Notifications
You must be signed in to change notification settings - Fork 291
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
Implement automatic refresh for RRM module setup flow #8839
Comments
Nice work, @ankitrox ! IB LGTM 👍 ✅ |
QA Update
|
QA Update ✅After a round of review, this aria hidden console error actually happens on other SK module dropdowns as well. This ticket is good to be moved to approval. The 3 scenarios were verified good: ✅
|
Feature Description
The Reader Revenue Manager module setup should support automatic refresh behaviour similar to the AdSense module's setup flow: If you navigate away for a certain amount of time and then return to the tab, it should automatically re-run the relevant API requests, to see if maybe something on the SwG API side has changed. This is crucial since all write actions happen within the Publisher Center UI and are therefore unknown to Site Kit.
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
publicationID
module setting is not set.Implementation Brief
resetPublications
inassets/js/module/reader-revenue-manager/datastore/publications.js
added in Implement RRMgetPublications()
selector #8794.getPublications
selector.getPublications
usinginvalidateResolutionForStoreSelector
onmodules/reader-revenue-manager
store. Refer the similar implementation in adsense module.SetupMain
component for the module, create a functionreset
.publicationID
is set in the module settings. It can be checked usinggetPublicationID
selector.publicationID
is not set,resetPublications
action should be called.useReFocus
hook should be used to callreset
function mentioned above every 15 seconds.Test Coverage
Add tests for
resetPublications
action.QA Brief
Scenario i. Publication ID is not set.
Activate the module. This will redirect to the setup screen.
There should be a progress bar which shows the publications are loading.
Once publications dropdown is visible, navigate away from the current tab in browser. You can open a different tab and stay there for 15+ seconds. Come back to the setup tab again and you should see that publications are loading again (a progress bar to load publications).
Scenario ii. Populating publications when synced.
Activate the module. This will redirect to the setup screen. Wait till publication dropdown appears.
Run the following command in browser.
This will clear all publications from dropdown.
Scenario iii. Publication ID is set, publications should not get loaded again.
Activate the module. This will redirect to the setup screen. Wait till publication dropdown appears.
Run the following command in browser.
Changelog entry
The text was updated successfully, but these errors were encountered: