{"action":"created","issue":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5046","repository_url":"https://api.github.com/repos/Automattic/wp-calypso","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5046/labels{/name}","comments_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5046/comments","events_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5046/events","html_url":"https://github.com/Automattic/wp-calypso/issues/5046","id":151348865,"number":5046,"title":"State: single data tree and query components","user":{"login":"mtias","id":548849,"avatar_url":"https://avatars.githubusercontent.com/u/548849?v=3","gravatar_id":"","url":"https://api.github.com/users/mtias","html_url":"https://github.com/mtias","followers_url":"https://api.github.com/users/mtias/followers","following_url":"https://api.github.com/users/mtias/following{/other_user}","gists_url":"https://api.github.com/users/mtias/gists{/gist_id}","starred_url":"https://api.github.com/users/mtias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtias/subscriptions","organizations_url":"https://api.github.com/users/mtias/orgs","repos_url":"https://api.github.com/users/mtias/repos","events_url":"https://api.github.com/users/mtias/events{/privacy}","received_events_url":"https://api.github.com/users/mtias/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/Framework","name":"Framework","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/State","name":"State","color":"006b75"},{"url":"https://api.github.com/repos/Automattic/wp-calypso/labels/[Type]%20Task","name":"[Type] Task","color":"0052cc"}],"state":"open","locked":false,"assignee":null,"milestone":{"url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/70","html_url":"https://github.com/Automattic/wp-calypso/milestones/Offline%20i1:%20State%20tree%20consolidation","labels_url":"https://api.github.com/repos/Automattic/wp-calypso/milestones/70/labels","id":1664615,"number":70,"title":"Offline i1: State tree consolidation","description":"Move all the disparate pieces of data we have into the single redux state tree.","creator":{"login":"mtias","id":548849,"avatar_url":"https://avatars.githubusercontent.com/u/548849?v=3","gravatar_id":"","url":"https://api.github.com/users/mtias","html_url":"https://github.com/mtias","followers_url":"https://api.github.com/users/mtias/followers","following_url":"https://api.github.com/users/mtias/following{/other_user}","gists_url":"https://api.github.com/users/mtias/gists{/gist_id}","starred_url":"https://api.github.com/users/mtias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtias/subscriptions","organizations_url":"https://api.github.com/users/mtias/orgs","repos_url":"https://api.github.com/users/mtias/repos","events_url":"https://api.github.com/users/mtias/events{/privacy}","received_events_url":"https://api.github.com/users/mtias/received_events","type":"User","site_admin":false},"open_issues":7,"closed_issues":2,"state":"open","created_at":"2016-03-24T19:44:24Z","updated_at":"2016-04-27T10:24:29Z","due_on":null,"closed_at":null},"comments":2,"created_at":"2016-04-27T10:08:54Z","updated_at":"2016-04-28T12:22:07Z","closed_at":null,"body":"To make further progress in offline support it's imperative we consolidate our historical data approaches under the same redux state tree.\r\n\r\n### Action items\r\n\r\nIn 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. \r\n\r\n* [ ] Remove `store` module dependency.\r\n* [ ] Move `Query` components to a folder at the root of client.\r\n\r\n#### Sites\r\n* [ ] Add actions for fetching and receiving whole list of sites.\r\n* [x] Add schema for sites.\r\n* [ ] Move \"recentlySelected\" sites to state tree.\r\n* [ ] Move selectors.\r\n* [ ] Create `QuerySites`.\r\n* [ ] Remove `sitesList.fetch()` instances.\r\n* [ ] Move cases of `sitesList.getSelectedSite()` to `getSelectedSite( state )`.\r\n* [ ] Switch to querying via state actions in controllers.\r\n\r\n#### User\r\n* [ ] Move \"user\" data to redux and remove localStorage dependency.\r\n* [x] Add schema for current user. <a href=\"https://github.com/Automattic/wp-calypso/pull/3356\">#3356</a>\r\n\r\n#### Posts\r\n* [ ] Move \"posts\" data to redux. <a href=\"https://github.com/Automattic/wp-calypso/pull/2248\">#2248</a> <a href=\"https://github.com/Automattic/wp-calypso/pull/2350\">#2350</a> <a href=\"https://github.com/Automattic/wp-calypso/pull/3487\">#3487</a>\r\n* [ ] Add all-posts selectors and actions.\r\n* [ ] Figure out normalization of post images.\r\n* [ ] Implement `QueryPosts` in \"/posts\" section.\r\n* [ ] Implement `QueryPosts` in \"Drafts list\".\r\n\r\n#### Stats\r\n* [ ] Move \"stats\" data to redux and remove localStorage dependency.\r\n\r\n#### Editor\r\n* [ ] Move \"editor\" to redux. <a href=\"https://github.com/Automattic/wp-calypso/issues/2993\">#2993</a>\r\n* [ ] Move \"media list\" data to redux.\r\n* [ ] Move embed data to redux.\r\n* [ ] Move shortcode data to redux.\r\n* [ ] Create `QueryMedia` component.\r\n* [ ] Remove `MediaListData` component.\r\n* [ ] Create `QueryPageTemplates` component.\r\n* [ ] Remove `PageTemplatesData` component.\r\n* [ ] Create `QueryPostFormats` component.\r\n* [ ] Remove `PostFormatsData` component.\r\n* [ ] Create `QueryTags` component.\r\n* [ ] Remove `TagListData` component.\r\n* [ ] Create `QueryEmbeds` component.\r\n- [ ] Update TinyMCE embed view to use `QueryEmbeds`.\r\n- [ ] Remove or update `Shortcode` component.\r\n* [ ] Create `QueryShortcodes` component.\r\n\r\n#### General\r\n* [x] Move \"notices\" to redux. <a href=\"https://github.com/Automattic/wp-calypso/pull/1496\">#1496</a>\r\n* [ ] Move \"preferencesData\" data to redux and remove localStorage dependency.\r\n* [ ] Create `QueryPreferences` component.\r\n* [ ] Remove `PreferencesData` component.\r\n* [x] Move \"postCounts\" to redux. <a href=\"https://github.com/Automattic/wp-calypso/pull/4217\">#4217</a>\r\n* [x] Create `QueryPostCounts` component.\r\n* [ ] Remove `StoreConnection` component.\r\n- [ ] Move screen title to redux. #3796\r\n\r\n#### Reader\r\n* [ ] Move \"Comments\" data to redux.\r\n* [ ] Create `QueryComments` component.\r\n* [ ] Move \"Stream\" data to redux.\r\n\r\n#### Sharing\r\n* [x] Move \"publicize\" data to redux. <a href=\"https://github.com/Automattic/wp-calypso/pull/338\">#338</a> <a href=\"https://github.com/Automattic/wp-calypso/pull/2317\">#2317</a> <a href=\"https://github.com/Automattic/wp-calypso/pull/3417\">#3417</a> <a href=\"https://github.com/Automattic/wp-calypso/pull/736\">#736</a> <a href=\"https://github.com/Automattic/wp-calypso/pull/756\">#756</a>\r\n* [ ] Move keyring data to redux.\r\n* [ ] Remove `connections-list` module.\r\n\r\n#### Themes\r\n\r\n* [ ] Create `QueryThemes` component.\r\n* [ ] Remove `ThemesListFetcher`.\r\n* [ ] Convert `CurrentThemeData` to `QueryTheme` or selectors.\r\n\r\n#### Plans\r\n* [ ] Move \"plansList\" data to redux and remove localStorage dependency.\r\n* [x] Add `QueryPlans` component. https://github.com/Automattic/wp-calypso/pull/4933\r\n* [ ] Remove plans flux stores.\r\n\r\n#### Domains\r\n* [ ] Create `QueryDomains` component.\r\n* [ ] Stop using `StoreConnection` in domain management.\r\n* [ ] Remove domains flux stores.\r\n\r\n#### Purchases\r\n* [ ] Create `QueryPurchases` component.\r\n* [ ] Stop using `StoreConnection` in purchases.\r\n* [ ] Remove purchases flux stores.\r\n\r\n#### People\r\n* [ ] Move \"People\" data to redux.\r\n* [ ] Create `QueryFollowers` component.\r\n* [ ] Create `QueryEmailFollowers` component.\r\n"},"comment":{"url":"https://api.github.com/repos/Automattic/wp-calypso/issues/comments/215407137","html_url":"https://github.com/Automattic/wp-calypso/issues/5046#issuecomment-215407137","issue_url":"https://api.github.com/repos/Automattic/wp-calypso/issues/5046","id":215407137,"user":{"login":"mtias","id":548849,"avatar_url":"https://avatars.githubusercontent.com/u/548849?v=3","gravatar_id":"","url":"https://api.github.com/users/mtias","html_url":"https://github.com/mtias","followers_url":"https://api.github.com/users/mtias/followers","following_url":"https://api.github.com/users/mtias/following{/other_user}","gists_url":"https://api.github.com/users/mtias/gists{/gist_id}","starred_url":"https://api.github.com/users/mtias/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mtias/subscriptions","organizations_url":"https://api.github.com/users/mtias/orgs","repos_url":"https://api.github.com/users/mtias/repos","events_url":"https://api.github.com/users/mtias/events{/privacy}","received_events_url":"https://api.github.com/users/mtias/received_events","type":"User","site_admin":false},"created_at":"2016-04-28T12:22:07Z","updated_at":"2016-04-28T12:22:07Z","body":"Yes, that's probably the best candidate so far."}}