Update/centralize user privacy + cookie (PR combo)#9156
Merged
Conversation
Contributor
Contributor
Can we just close that one then? |
84ad8be to
4bc7448
Compare
Maintain the `this.togglePrivacy` function for toggling `onChange` rather than an inline function Use `this.props.isUpdating()` to disable the checkbox during an update.
jaswrks
commented
Mar 27, 2018
_inc/client/privacy/index.jsx
Outdated
| toggling={ isSavingAnyOption( 'jetpack_event_tracking' ) } | ||
| toggleModule={ this.togglePrivacy }> | ||
| checked={ ! this.props.tracking.tracks_opt_out } | ||
| disabled={ this.props.isFetching || this.props.isUpdating() } |
Contributor
Author
There was a problem hiding this comment.
The isUpdating prop should be a boolean value, not a function. However, it's currently a function because there is a conflict with the isUpdating prop in ModuleSettingsForm. I'm taking a look at a fix.
- Reference tracking settings in full form; e.g., ... trackingSettings.
Contributor
Author
Thanks for the review. Yes, 9155 has been closed. |
mattwiebe
approved these changes
Mar 27, 2018
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.
Depends on #9142 and #9154
This PR is a fork of (and alternative to) #9155 (props @mattwiebe) that brings it together with the work I did previously in #9085 to implement
window._tkq.push( [ 'setOptOut', true|false ] )This PR adds the following to #9155
Implement the
setOptOutcommand; i.e., whenever the new privacy option is changed, this PR will set or unset the opt-out cookie usingwindow._tkq.push( [ 'setOptOut', true|false ] )Make
Jetpack_Tracks_Clientin PHP aware of thesetOptOutcookie too. If the opt-out cookie exists, do not record server-side events either.How to test:
tracks_opt_out#9142 and Redux ingestion for user tracking settings #9154localStorage.setItem( 'debug', 'dops:analytics' );Pushing setOptOut: true|false.Some Tests Failing at Travis
It's to be expected at this time, because this depends on #9142 and #9154