You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This documents the need to create a new state tree (or repurpose the existing) to manage state for the sidebar admin-menu.
The expectation is to write simple actions/action creators and reducers. Selectors can be handled in another Issue.
This will interact and depend on the data layer implementation created in #45464. However, it could easily be developed against unit tests to avoid the data layer work becoming blocking. Indeed, note the data layer has the ability to transform API data into any format required by Calypso, so its perfectly acceptable that this Issue leads the way in determining the required "shape" of the data.
Tasks
Determine whether to use existing sidebar state tree or create new one (eg: admin-menu).
Mirror Redux action "namespace" with that utilised in the data layer (eg: ADMIN_MENU_ or similar).
Define all actions (not creators!) by creating constants for each - if this is too difficult at this stage then come back to this later. But ideally, we should use this as a chance to define which actions we expect to receive.
Define Reducer skeleton.
Define action creator to handle receiving new admin menus (eg: receiveMenuItems).
Write reducer to handle the action dispatched by receiveMenuItems action creator and persisting into Redux state.
The text was updated successfully, but these errors were encountered:
This is a Sub Issue of #45435.
This documents the need to create a new state tree (or repurpose the existing) to manage state for the sidebar admin-menu.
The expectation is to write simple actions/action creators and reducers. Selectors can be handled in another Issue.
This will interact and depend on the data layer implementation created in #45464. However, it could easily be developed against unit tests to avoid the data layer work becoming blocking. Indeed, note the data layer has the ability to transform API data into any format required by Calypso, so its perfectly acceptable that this Issue leads the way in determining the required "shape" of the data.
Tasks
sidebar
state tree or create new one (eg:admin-menu
).ADMIN_MENU_
or similar).receiveMenuItems
).receiveMenuItems
action creator and persisting into Redux state.The text was updated successfully, but these errors were encountered: