-
Notifications
You must be signed in to change notification settings - Fork 293
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
Improve the resetPublications
action
#9176
Comments
Note for AC ReviewerI've also added an IB (including a PoC). If the IB looks good to you, please feel free to send this right to EB. |
Thanks @nfmohit. The first AC point was stating things as they are, with the invalidation occurring before the reset, and effectively needed to be reversed, which I have done. With that taken care of the AC LGTM. On the IB front, what's there looks good, but please can you update the Test Coverage section and add an estimate? |
Thank you for updating the ACs, @techanvil . I've also updated the IB, my mistake, sorry! Back to you for a final pass. |
Thanks, @nfmohit! IB ✅ |
Note: Picked this one up because I have a PoC ready for this to go, hence, it will take less time. Thanks! |
Feature Description
The RRM
resetPublications
action currently invalidates the resolver forgetPublications
first before it clears the list of publications in store. As @aaemnnosttv pointed out here, this may result in a situation where the selector may run and not fetch if publications are set in state. This order should be changed.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
resetPublications
action should clear the existing publications from the store before it invalidates thegetPublications
resolver.Implementation Brief
The following implementation brief has already been covered in this PoC, which can directly be moved to CR if deemed appropriate.
assets/js/modules/reader-revenue-manager/datastore/publications.js
:resetPublications
action:RESET_PUBLICATIONS
action type.getPublications
selector.getPublications
resolver and return its response.assets/js/modules/reader-revenue-manager/components/setup/SetupMain.js
:publications
variable so that it does not return an empty array as a fallback.useEffect
that is responsible for setting theSHOW_PUBLICATION_CREATE
key for theREADER_REVENUE_MANAGER_SETUP_FORM
core/forms
form to ensure that it is only set ifpublications
is notundefined
(beside existing conditions).PublicationCreate
component after publications are reset when one or more publications were already available.Test Coverage
QA Brief
rrmModule
feature flag.Changelog entry
resetPublications
action to clear publications before invalidating thegetPublications
resolver.The text was updated successfully, but these errors were encountered: