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

Posts: Support requesting posts for current user in Redux posts state #3261

Merged
merged 4 commits into from
Feb 19, 2016

Conversation

aduth
Copy link
Contributor

@aduth aduth commented Feb 11, 2016

This pull request seeks to update the posts Redux state handlers to offer an action creator for requesting all posts belonging to the current user.

Implementation notes:

The approach taken here was to convert the existing siteQueries and siteQueriesLastPage reducer keys to more generalized queries and queriesLastPage, incorporating the optional site designation as part of the logic for getSerializedPostsQuery. This has the added benefit of increasingly flattening the posts state structure.

Testing instructions:

Ensure that existing usage of the posts Redux state remains unaffected. Specifically, this includes the parent page selector in the Calypso page editor. Specifically, repeat testing instructions from #2350.

Verify that Mocha tests pass by running make test from the project root directory or directly from client/state/posts.

@aduth aduth added Posts [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 11, 2016
@aduth aduth self-assigned this Feb 11, 2016

/**
* Returns a function which, when invoked, triggers a network request to fetch
* posts for the specified query.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add "across sites" here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we add "across sites" here?

Clarified in dc2fbbd

@gwwar
Copy link
Contributor

gwwar commented Feb 19, 2016

👍 Tested this out on the editor parent page selector and it works great. Feel free to 🚢 after this branch has been rebased, and lodash usage is updated.

@aduth aduth force-pushed the update/redux-posts-me branch from d9ced0d to 3b722b4 Compare February 19, 2016 13:15
@aduth aduth added [Status] Ready to Merge and removed [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 19, 2016
@aduth
Copy link
Contributor Author

aduth commented Feb 19, 2016

Thanks @gwwar ! Rebased, squashed, and did some final testing. This'll be heading out the door this morning.

aduth added a commit that referenced this pull request Feb 19, 2016
Posts: Support requesting posts for current user in Redux posts state
@aduth aduth merged commit c1d623f into master Feb 19, 2016
@aduth aduth deleted the update/redux-posts-me branch February 19, 2016 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants