-
Notifications
You must be signed in to change notification settings - Fork 843
Add new settings route and page for Privacy settings #8993
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
Conversation
|
In 805141f, I added smooth scroll that will take user to the height of the navigation bar when the Privacy link is clicked. |
71b60ed to
805141f
Compare
| /** | ||
| * External dependencies | ||
| */ | ||
| import React from 'react'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing PropTypes import
_inc/client/privacy/index.jsx
Outdated
| import SettingsGroup from 'components/settings-group'; | ||
| import { ModuleToggle } from 'components/module-toggle'; | ||
| import { updateSettings } from 'state/settings'; | ||
| import { getSettings } from 'state/settings'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These two lines import selectors from the same place. The linter should throw an error ( cc @oskosk ) because we should have a single line importing everything needed from a particular bundle of selectors.
|
|
||
| class Privacy extends React.Component { | ||
| static displayName = 'PrivacySettings'; | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Missing propTypes and defaultProps
| togglePrivacy = () => { | ||
| const isTracksEnabled = this.props.getOptionValue( 'disable_tracking' ); | ||
| this.props.toggleTracking( isTracksEnabled ); | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This can be reduced to
togglePrivacy = () => this.props.toggleTracking( this.props.getOptionValue( 'disable_tracking' ) );| render() { | ||
| // eslint-disable-next-line | ||
| console.log( this.props ); | ||
|
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe there should be a destructuring sentence assigning this.props
_inc/client/privacy/index.jsx
Outdated
| <SettingsGroup hasChild support="https://jetpack.com/support/privacy"> | ||
| <ModuleToggle | ||
| compact | ||
| activated={ false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs this.props.getOptionValue to reflect the correct state
_inc/client/privacy/index.jsx
Outdated
| <ModuleToggle | ||
| compact | ||
| activated={ false } | ||
| toggling={ false } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Needs this.props.isSavingAnyOption to toggle optimistically.
_inc/client/privacy/index.jsx
Outdated
| toggleTracking: ( isEnabled ) => { | ||
| return dispatch( updateSettings( { disable_tracking: isEnabled ? false : true } ) ); | ||
| } | ||
| } ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both mapStateToProps and mapDispatchToProps can be reduced using shorthands.
_inc/client/privacy/index.jsx
Outdated
| return dispatch( updateSettings( { disable_tracking: isEnabled ? false : true } ) ); | ||
| } | ||
| } ) | ||
| )( Privacy ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Privacy needs to be wrapped in moduleSettingsForm
| $updated = get_option( $option ) !== $value ? update_option( $option, (bool) $value ) : true; | ||
| break; | ||
|
|
||
| case 'disable_tracking': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the same than above (and similar to the one below except for the !== ) so I think it's unnecessary to repeat all the code.
|
Added links to privacy policy and privacy blog. @pesieminski @nicoleckohler can you articulate some text for the two lines that have a link? It can have any length. |
|
We need a page talking about privacy at https://jetpack.com/support/privacy |
|
Just to confirm - I assume this is a page that will inform folks on updating their privacy settings in the UI, correct? I want to make sure we get the context correct. |
|
@bubel yes, that's the general idea. I guess @pesieminski can give you more details. |
|
Yes, we're creating some new privacy options in Jetpack (opt out for tracking) and more transparency/privacy docs. This is a place for them to live - both info and functionality. |
| break; | ||
|
|
||
| case 'jetpack_event_tracking': | ||
| jetpack_require_lib( 'class.jetpack-user-event-tracking' ); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is throwing a fatal, can't find the lib
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Oh, because of #9003
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. While coding this today, I extracted the class to make the updates so it works with it. We will merge this after Enej and Miguel merge the other.
|
For the beginning: We are committed to your privacy and security. For the end: |
|
I've started working on the jetpack.com support page. |
|
👋 No idea if you're still using |
| onClick={ this.trackPrivacyClick } | ||
| href="https://automattic.com/privacy/" | ||
| target="_blank" | ||
| href="#/privacy" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch @jaswrks!
Since this is the JS-version of Jetpack settings page, I think we'll want to add a new JS-free admin page that contains the texts and links plus a checkbox and submit button to disable tracking.
I'm inclined to leave this PR specifically for the JS settings page and address the issue in a new PR. We still need to have #9003 merged. Thoughts @dereksmart?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, let's take that on in another PR
|
@bperson writes...
What if a user lost that cookie? The Tracks library from JS would then be out of sync with their preference in usermeta, no? What if, in addition to the cookie, we set a JS global opt-out flag that is based on the user's current preference. 38-gh-analytics could then be updated to check for that too. |
The main point is that it will block pixels requests to ever be fired, thus saving bandwidth both for the users and us :) ( + the user doesn't have to take our word for it that we aren't tracking him if there is no tracking pixels being fired ;) ). I still expect us to have a "last resort" opt-out filter in the back-end.
You mean including something like: I'd rather we keep with the current "usage" of |
I see. Makes sense. Thank you. |
|
I'm working to hook this new privacy option up to the |
…same path. Introduce ModuleSettingsForm to use getOptionValue and isSavingAnyOption so ththe toggle now works. Simplify mapStateToProps and mapDispatchToProps. Simplify other minor code.
|
Rebased #9003 on this branch now that it's merged. |
|
So this all works well, but I think we could also put some checks here in the client code from preventing these events from sending at all. We could do something like And still sync the meta value back to .com to do whatever blocks we need there. |
|
[edit] : I see this w.js is already being discussed above Could also block from enqueuing w.js here https://github.com/Automattic/jetpack/blob/branch-5.9/_inc/lib/admin-pages/class.jetpack-react-page.php#L202 |
|
WRT to my last comments, let's do that in a separate PR. We can block these events from the server as it is. |
oskosk
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
* Changelog 6.0: create base for changelog. * Add #8938 to changelog * Add #8962 to changelog * Add #8974 to changelog * Add #8975 to changelog * Add #8978 to changelog * Add #8867 to changelog * Add #8937 to changelog * Add #8961 to changelog * Add #8855 to changelog * Add #8944 to changelog * Add #8973 to changelog * Add #8977 to changelog * Add #8979 to changelog * Add #8980 to changelog * Add #8982 to changelog * Add #8983 to changelog * Add #8984 to changelog * Add #8986 to changelog * Add #9005 to changelog * Add #9010 to changelog * Add #9012 to changelog * Add #9021 to changelog * Add #9022 to changelog * Add #9056 to changelog * Add #9061 to changelog * Add #9079 to changelog * Add #9080 to changelog * Add #9088 to changelog * Add #9096 to changelog * Add #9097 to changelog * Add #9100 to changelog * Add #9107 to changelog * Add #8969 to changelog * Add #8993 to changelog * Add #9003 to changelog * Add #9031 to changelog * Add #8945 to changelog * Add #9052 to changelog * Add #9058 to changelog * Add #9066 to changelog * Add #9076 to changelog * Add #9053 to changelog * Add #9108 to changelog * Add #9135 to changelog * Add #9148 to changelog * Add #9125 to changelog * Add #9137 to changelog * Added testing instructions for 6.0. * Added IS testing instructions, huge props to @tiagonoronha. * Added #8498 to changelog. * Added #8954 to changelog. * Added #8985 to changelog. * add #9027 * add #9112 to changelog * add #9136 to changelog * add #9102 to changelog * add #9093 to changelog * add #9062 to changelog * add #9172 to changelog
|
A few minor tweaks please: Note the language changes, there are a few of them. I also moved the final paragraph above the setting so it was easier to see it. I also removed the end margin from the setting toggle as well as the period at the end of the label. Text: |




Must be merged after #9003 is merged.It's mergedThis PR introduces a new page accessible through the Privacy link at the bottom of the Jetpack dashboard.
The page features links to the Automattic privacy policy and to the upcoming privacy.blog. The support link goes through what data does Jetpack sync.
The page also introduces a toggle so users can opt-out of information tracking that Automattic collects for its own purpose.
Changelog entry
Introduced a new Privacy admin page linked at the bottom of the Jetpack dashboard.