-
Notifications
You must be signed in to change notification settings - Fork 284
-
Notifications
You must be signed in to change notification settings - Fork 284
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 new selector for shared ownership modules #4791
Labels
P0
High priority
Rollover
Issues which role over to the next sprint
Type: Enhancement
Improvement of an existing feature
Comments
aaemnnosttv
added
P0
High priority
Type: Enhancement
Improvement of an existing feature
labels
Feb 4, 2022
IB ✅ |
18 tasks
QA Update: ✅Verified: With
With
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
P0
High priority
Rollover
Issues which role over to the next sprint
Type: Enhancement
Improvement of an existing feature
Feature Description
Related to shared ownership modules (see #4790), the
core/modules
store will be extended to make these modules selectable.Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
getSharedOwnershipModules
selector should be added to thecore/modules
store which should return a list of module objects (the shared ownership modules)receiveSharedOwnershipModules
action should be added for storing the given list of module slugs in the store's state for use by the selectorImplementation Brief
In
assets/js/googlesitekit/modules/datastore/modules.js
,Create a resolver generator function (method)
*getSharedOwnershipModules()
with the following:getSharedOwnershipModules()
selector and return early if the selector returns non-undefined value.sharedOwnershipModules
fromglobal._googlesitekitDashboardSharing
.receiveSharedOwnershipModules
action to setsharedOwnershipModules
in the state.Create an action method
receiveSharedOwnershipModules()
with the following:sharedOwnershipModules
and it should set it in the state asstate.sharedOwnershipModules
.sharedOwnershipModules
in thebaseInitialState
and setundefined
as the default value.Create
RECEIVE_SHARED_OWNERSHIP_MODULES
case in thebaseReducer
with the following:sharedOwnershipModules
from thepayload
.sharedOwnershipModules
along with the state.Create
getSharedOwnershipModules()
selector with the following:modules
from thegetModules
selector.undefined
if thegetModules
selector is not yet loaded.undefined
if thesharedOwnershipModules
isundefined
in the state.sharedOwnershipModules
from thestate
.Test Coverage
getSharedOwnershipModules
selector andreceiveSharedOwnershipModules
actionQA Brief
QA
This isn't QA-able directly in the plugin yet. For now, QA here can be a simple regression test with and without dashboard sharing enabled.
QA:Eng
dashboardSharing
feature flag is enabled.googlesitekit.data.select('core/modules').getSharedOwnershipModules()
dashboardSharing
feature flag and rungooglesitekit.data.select('core/modules').getSharedOwnershipModules()
undefined
and the console errorCould not load core/modules dashboard sharing
.Changelog entry
The text was updated successfully, but these errors were encountered: