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

State: Filter connections by site via selector in place of reducer key #3417

Merged
merged 1 commit into from
Feb 19, 2016

Conversation

aduth
Copy link
Contributor

@aduth aduth commented Feb 19, 2016

Related: #3357

This pull request seeks to remove the state.sharing.publicize.connectionsBySiteId reducer key, replacing it with filter logic contained within getConnectionsBySiteId and getSiteUserConnections.

Testing instructions:

Repeat testing instructions from #338.

Ensure that Mocha tests continue to pass by running make test from client/state/sharing/publicize.

/cc @gwwar

@aduth aduth added Framework [Feature] Post/Page Editor The editor for editing posts and pages. [Feature] Sharing Features and settings for sharing posts across different platforms, including sharing buttons. [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. labels Feb 19, 2016
return connectionsBySiteId[ siteId ].map( ( connectionId ) => {
return connections[ connectionId ];
} );
return filter( state.sharing.publicize.connections, { site_ID: siteId } );
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Filter should be plenty speedy on small arrays.

@gwwar
Copy link
Contributor

gwwar commented Feb 19, 2016

Thanks for working on this! This should make #3357 much simpler.

@gwwar gwwar 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 added a commit that referenced this pull request Feb 19, 2016
…elector

State: Filter connections by site via selector in place of reducer key
@aduth aduth merged commit 39b7172 into master Feb 19, 2016
@aduth aduth deleted the update/sharing-redux-state-selector branch February 19, 2016 23:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Feature] Post/Page Editor The editor for editing posts and pages. [Feature] Sharing Features and settings for sharing posts across different platforms, including sharing buttons. Framework
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants