-
Notifications
You must be signed in to change notification settings - Fork 286
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 RRM getPublications()
selector
#8794
Comments
getPublications
selector for RRMgetPublications()
selector
IB ✅ |
Hi @ankitrox . About the IB, I've removed the requirement of only including the |
QA Update:
|
We have a separate ticket where
Yes, this is expected! The reason for that is we do not have the #8800 ready yet, but you can refer to #8796 IB where step 2 would help to resolve this issue. const settings = {
publicationID: "CAow6J6vDA",
publicationOnboardingState: "ONBOARDING_STATE_UNSPECIFIED",
publicationOnboardingStateLastSyncedAtMs: 0
};
googlesitekit.data.dispatch('modules/reader-revenue-manager').setSettings( settings );
googlesitekit.data.dispatch('modules/reader-revenue-manager').saveSettings(); |
QA Update ✅
Moving ticket to Approval. |
Feature Description
The
getPublications()
selector should be implemented for the Reader Revenue Manager module that should interact with theGET:publications
REST endpoint and return a list of publications.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
getPublications()
selector should be added to the Reader Revenue Manager module data store.GET:publications
REST endpoint (being implemented in #8791) to return the list of available publications for the site.Implementation Brief
assets/js/module/reader-revenue-manager/datastore/publications.js
. This would be a data store to fetch the publications.Data.combineStores
inassets/js/module/reader-revenue-manager/index.js
added in Add JS entry point for RRM #8786createFetchStore
to create the publication store (getPublicationStore
). This should useGET:publications
endpoint (being implemented in Implement RRMGET:publications
REST endpoint #8791) to return the list of available publications for the site.baseName
for the storegetPublications
.baseInitialState
) should have thepublications
property which would beundefined
initially and will be set to the list of publications. It should be array of publication objects.reducerCallback
insidecreateFetchStore
, set thepublications
property instate
.baseResolvers
object.*getPublications
generator inside it. It should callgetPublications
selector. If it is undefined, it will yield the result by callinggetPublicationStore.actions.fetchGetPublications
baseSelectors
object.getPublications
which should returnstate.publications
.Data.combineStores
and pass the followingbaseInitialState
asinitialState
baseActions
,reducer
as empty object.resolvers
and passbaseResolvers
.selectors
and passbaseSelectors
.Test Coverage
publications
data store. We can usefetchMock
to mock the API calls.QA Brief
rrmModule
feature flag and the Reader Revenue Manager module.google-site-kit/v1/modules/reader-revenue-manager/data/publications
endpoint.Changelog entry
The text was updated successfully, but these errors were encountered: