Privacy: use the wpcom API to centralize opt-out#9155
Closed
Privacy: use the wpcom API to centralize opt-out#9155
Conversation
This was referenced Mar 27, 2018
zinigor
suggested changes
Mar 27, 2018
Contributor
zinigor
left a comment
There was a problem hiding this comment.
Overall this looks good, thank you, but I have left a couple of comments.
| isSavingAnyOption, | ||
| } = this.props; | ||
| const isActive = ! this.props.tracking.tracks_opt_out; | ||
| const doToggle = () => { |
Contributor
There was a problem hiding this comment.
Just a nitpick, but is there any reason to keep this function as a constant inside the render method? We could have left it a method just as togglePrivacy was before, and just passed this.doToggle to onChange.
| state => ( { | ||
| settings: getSettings( state ), | ||
| tracking: getTrackingSettings( state ), | ||
| isUpdating: isUpdatingTrackingSettings( state ), |
Contributor
There was a problem hiding this comment.
Do we actually need isUpdating here? I can't find a place where we're using it.
Contributor
Author
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Update the UI to use the WPCom user tracking opt-out API.
Depends on #9142 and #9154 to be merged first to work.
Changes proposed in this Pull Request:
Testing instructions:
Toggle the setting on or off as first enabled in #8993 from the user account that connected to Jetpack and verify that it's the same while logged into WP.com as detailed in Automattic/wp-calypso#23231 - you will currently need to build Calypso locally to view the Privacy section. Setting in one place will be reflected in the other.