Skip to content
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

Framework: Redux single data tree and query components #5046

Closed
mtias opened this issue Apr 27, 2016 · 8 comments
Closed

Framework: Redux single data tree and query components #5046

mtias opened this issue Apr 27, 2016 · 8 comments
Labels
Framework Maintenance [Pri] High Address as soon as possible after BLOCKER issues [Type] Enhancement

Comments

@mtias
Copy link
Member

mtias commented Apr 27, 2016

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.

Action items

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.

  • Remove store module dependency.
  • Move Query components to a folder at the root of client.

Sites

Jetpack Sites

User

Posts

Stats

  • Move "stats" data to redux and remove localStorage dependency. Stats: Add stats list to redux tree #5743
  • Create post.stats state sub-tree.
    • Move Followers List ( Could we share logic with reader here ? ) to stats state sub-tree
    • Move Comments Data to stats state sub-tree
    • Move Followers Data to stats state sub-tree
    • Move Posts & Pages Data to stats state sub-tree
    • Move Countries Data to stats state sub-tree
    • Move Referrers Data to stats state sub-tree
    • Move Search Terms Data to stats state sub-tree
    • Move Clicks Data to stats state sub-tree
    • Move Authors Data to stats state sub-tree
    • Move Chart Data to stats state sub-tree
    • Move Video Data to stats state sub-tree Stats: Reduxify Video Stats Endpoint #10520

Editor (Needs Issue)

General

Reader #10984

Sharing

Themes

Plans

Domains #6144

  • Create QueryDomains component.
  • Stop using StoreConnection in domain management.
  • Remove domains flux stores.

Purchases

  • Move existing reducer in client/lib/purchases/reducer to client/state/ Purchases: Add state.purchases.items reducer #6317
  • Move existing actions in client/lib/purchases/actions to client/state/
  • Create QueryPurchases component.
  • Stop using StoreConnection in purchases.
  • Remove purchases flux stores.

Stored cards

  • Move existing reducer in client/lib/purchases/stored-cards/reducer to client/state/ Framework: Add a stored cards reducer #6413
  • Move existing actions in client/lib/purchases/stored-cards/actions to client/state/
  • Create QueryStoredCards component.
  • Stop using StoreConnection in purchases.
  • Remove stored cards flux stores.

People (Needs Issue)

Plugins #8213 #8786

SiteVouchers

@mtias mtias changed the title State: single data tree State: single data tree and query components Apr 27, 2016
@retrofox
Copy link
Contributor

retrofox commented Apr 28, 2016

  • Move Query components to a folder at the root of client.

what about ./client/query-components/ ?

@mtias
Copy link
Member Author

mtias commented Apr 28, 2016

Yes, that's probably the best candidate so far, though a bit long.

dmsnell added a commit that referenced this issue May 9, 2016
Previously, the importer subsystem was using actions to dispatch changes
and these actions were all defined inside of `client/lib/importer`

As part of #5046 (conversion to a single global Redux tree), this commit
defines new action types inside of `client/state/action-types.js` and
converts the importer to use these globally-defined actions instead of
the locally-defined actions.

There are no visual or functional changes and this code should behave
exactly the same as before.
dmsnell added a commit that referenced this issue May 11, 2016
Previously, the importer subsystem was using actions to dispatch changes
and these actions were all defined inside of `client/lib/importer`

As part of #5046 (conversion to a single global Redux tree), this commit
defines new action types inside of `client/state/action-types.js` and
converts the importer to use these globally-defined actions instead of
the locally-defined actions.

There are no visual or functional changes and this code should behave
exactly the same as before.
dmsnell added a commit that referenced this issue May 12, 2016
Previously, the importer subsystem was using actions to dispatch changes
and these actions were all defined inside of `client/lib/importer`

As part of #5046 (conversion to a single global Redux tree), this commit
defines new action types inside of `client/state/action-types.js` and
converts the importer to use these globally-defined actions instead of
the locally-defined actions.

There are no visual or functional changes and this code should behave
exactly the same as before.
dmsnell added a commit that referenced this issue May 15, 2016
Previously, the importer subsystem was using actions to dispatch changes
and these actions were all defined inside of `client/lib/importer`

As part of #5046 (conversion to a single global Redux tree), this commit
defines new action types inside of `client/state/action-types.js` and
converts the importer to use these globally-defined actions instead of
the locally-defined actions.

There are no visual or functional changes and this code should behave
exactly the same as before.
dmsnell added a commit that referenced this issue May 17, 2016
* Resolves #5299

Previously, the importer subsystem was using actions to dispatch changes
and these actions were all defined inside of `client/lib/importer`

As part of #5046 (conversion to a single global Redux tree), this commit
defines new action types inside of `client/state/action-types.js` and
converts the importer to use these globally-defined actions instead of
the locally-defined actions.

There are no visual or functional changes and this code should behave
exactly the same as before.
roundhill pushed a commit that referenced this issue May 17, 2016
* Resolves #5299

Previously, the importer subsystem was using actions to dispatch changes
and these actions were all defined inside of `client/lib/importer`

As part of #5046 (conversion to a single global Redux tree), this commit
defines new action types inside of `client/state/action-types.js` and
converts the importer to use these globally-defined actions instead of
the locally-defined actions.

There are no visual or functional changes and this code should behave
exactly the same as before.
@timmyc
Copy link
Contributor

timmyc commented May 24, 2016

@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 )

@roccotripaldi
Copy link
Member

I added QueryUsers and QueryViewers to the People section above.

@ghost
Copy link

ghost commented Sep 23, 2017

@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.

@apeatling apeatling changed the title State: single data tree and query components Framework: Redux single data tree and query components Nov 15, 2017
@apeatling apeatling added [Pri] High Address as soon as possible after BLOCKER issues Maintenance and removed [Type] Task State labels Nov 15, 2017
@blowery
Copy link
Contributor

blowery commented Jul 18, 2018

Closing this one as we're tracking work via the project instead of this PR.

@blowery blowery closed this as completed Jul 18, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Framework Maintenance [Pri] High Address as soon as possible after BLOCKER issues [Type] Enhancement
Projects
None yet
Development

No branches or pull requests

9 participants