To make further progress in offline support it's imperative we consolidate our historical data approaches under the same redux state tree. Read Our Approach to Data.
In general we need to move data from Flux stores and older -list type structures into the single redux state tree. That means porting over the actions and selectors as well as creating relevant query-components.
store module dependency.Query components to a folder at the root of client.QuerySites. #5066 QuerySiteDomains #4972sitesList.fetch() instances.sitesList.getSelectedSite() to getSelectedSite( state ). #8726site.fetchSettings and site.saveSettings with corresponding Redux Actions / Selectors / Reducer and QuerySiteSettings Component. #9056 QueryUpdates component.JetpackSite.prototype. Add query components, actions, selectors and reducers for:[ ] Move logic to server side
[ ] Move "user" data to redux and remove localStorage dependency.
[ ] Move user settings data to redux #7927
QueryPosts in "/posts" section.[x] Implement QueryPosts in "Drafts list". #4936
[x] Move "stats" data to redux and remove localStorage dependency. #5743
[ ] Create post.stats state sub-tree.
stats state sub-treestats state sub-treestats state sub-treestats state sub-treestats state sub-treestats state sub-treestats state sub-treestats state sub-treestats state sub-treestats state sub-treestats state sub-tree #10520[ ] Move "editor" to redux. #2993
QueryMedia component.MediaListData component.QueryPageTemplates component (#7229)PageTemplatesData component (#7229)QueryPostFormats component. (#8402)PostFormatsData component. (#8593)QueryTags component.QueryTermsTagListData component.QueryEmbeds component.QueryTerms component (#5500)QueryEmbeds.Shortcode component. #8857 [x] Create QueryShortcodes component. #8116
[x] Move "notices" to redux. #1496
QueryPreferences component. #5401PreferencesData component. #8295QueryPostCounts component.StoreConnection component.InfiniteList to redux (Needs Issue)[x] Move happiness engineers data to redux #7926
[x] Move "Comments" data to redux.
QueryComments component.connections-list module. #8991services-list module #8595[x] Move sharing buttons list to redux #7928
[ ] Create QueryThemes component.
ThemesListFetcher.[x] Convert CurrentThemeData to QueryTheme or selectors. #5361
[x] Move "plansList" data to redux and remove localStorage dependency. #5444
QuerySitePlans component. #4933[x] Create QueryPlans component. #5444
[ ] Create QueryDomains component.
StoreConnection in domain management.[ ] Remove domains flux stores.
[x] Move existing reducer in client/lib/purchases/reducer to client/state/ #6317
client/lib/purchases/actions to client/state/QueryPurchases component.StoreConnection in purchases.[x] Remove purchases flux stores.
[x] Move existing reducer in client/lib/purchases/stored-cards/reducer to client/state/ #6413
client/lib/purchases/stored-cards/actions to client/state/QueryStoredCards component.StoreConnection in purchases.[ ] Remove stored cards flux stores.
[ ] Move "People" data to redux.
QueryUsers component #14930QueryFollowers component.QueryEmailFollowers component.[ ] Create QueryViewers component
[x] Move "Plugins" data to redux. https://github.com/Automattic/wp-calypso/pull/8206
QueryJetpackPlugins component. https://github.com/Automattic/wp-calypso/pull/8275[ ] Add Plugins selectors and actions.
[x] Implement state.sites.vouchers. #5574
QuerySiteVouchers component. #5579
- [ ] Move Query components to a folder at the root of client.
what about ./client/query-components/ ?
Yes, that's probably the best candidate so far, though a bit long.
@mtias Added QueryTerms to the above, also QueryTerms should cover any need for QueryTags as well by using post_tag as the taxonomy type ( i.e. /v1.1/sites/{slug}/taxonomies/post_tag/terms )
I added QueryUsers and QueryViewers to the People section above.
@retrofox can Move "plansList" data to redux and remove localStorage dependency. be ticked off?
@retrofox can Move "plansList" data to redux and remove localStorage dependency. be ticked off?
@scruffian Although we did a PR for this I'm afraid that the issue isn't 100% done. I'll take a look and if it's done I'll close it. If not I'll work on this next week.
@mtias : thanks for the thorough list of action items in moving everything to the redux state tree. I'm trying to get a handle on all the current outstanding or in-progress issues, and make sure we have an accurate list of the remaining tasks to get to the end goal. There are a lot of issues logged (unfortunately lots of them are old or stale).
I've created a project to consolidate all the different work happening here: https://github.com/Automattic/wp-calypso/projects/45
I'll be taking a look at the remaining action items here, and likely will split them out into their own issues so they're easier to track in the project. And I'm guessing their are action items here that are either already complete or have a duplicate issues.
Let me know if you have any concerns or comments.
Closing this one as we're tracking work via the project instead of this PR.