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: Move keyring data to redux. #8729

Merged
merged 10 commits into from
Oct 14, 2016
Merged

Conversation

obenland
Copy link
Member

First step in redux-ifying the rest of the sharing module, including connections-list and all components that use it.

Stores keyring connections in its own redux store (previously ConnectionsList.keyringData), in parallel to sharing.publicize (previously ConnectionsList.siteData). It adds action creators to create, update, and delete a connection, with corresponding reducers in both sharing.keyring and sharing.publicize, as well as the infrastructure to manage keyring connections.

See #5046.

@matticbot
Copy link
Contributor

@obenland
Copy link
Member Author

The diff is a little messy so I tried to describe the changes in the description. The easiest way to review this might be to start at client/state/action-types.js go from there?

@gwwar @aduth

@@ -0,0 +1,29 @@
export const itemSchema = {
type: 'object',
Copy link
Contributor

Choose a reason for hiding this comment

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

Could we maybe put additionalProperties at the top, so it's easier to match with patternProperties?

type: { type: 'string' },
user_ID: { type: 'integer' },
},
additionalProperties: false
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't believe we need to be so strict here. We might have an additive change to the api that isn't yet used by the client. In that case this would throw out the persisted data needlessly.

@@ -0,0 +1,103 @@
Keyring Connections
===================
Copy link
Contributor

Choose a reason for hiding this comment

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

👍 Nice examples

@obenland obenland added [Status] Needs Review The PR is ready for review. This also triggers e2e canary tests and wp-desktop tests automatically. and removed [Status] In Progress labels Oct 13, 2016
}
}

render() { return null; }
Copy link
Contributor

Choose a reason for hiding this comment

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

eslint warning for statements inside of curly braces needing to be on the next line.

@gwwar
Copy link
Contributor

gwwar commented Oct 13, 2016

Alright I tested out QueryKeyringConnections and it works well. The code for the new actions looks good, but if I missed anything in this huge diff, we can fix the issues as we see them as we wire up items in the follow up PRs

I left a few minor notes, but should be good to 🚢

@obenland
Copy link
Member Author

Thanks for your feedback @gwwar, should be fixed now! Should I wait with merging until someone sets it to "Ready to merge"?

@gwwar
Copy link
Contributor

gwwar commented Oct 14, 2016

LGTM! If it's a riskier PR, you can ask for more 👀 on additional changes. Otherwise if the last reviewer just requested a few minor things with a 👍, it's usually ok to 🚢

@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 Oct 14, 2016
@obenland obenland merged commit d691d5d into master Oct 14, 2016
@obenland obenland deleted the add/connections-list-redux branch October 14, 2016 17:15
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.

3 participants