Manage telemetry opt-in via a dedicated document#22268
Manage telemetry opt-in via a dedicated document#22268legrego merged 20 commits intoelastic:masterfrom
Conversation
|
@pickypg @chrisronline @kobelb @cchaos @gchaps |
|
My opinion on the design matters very little, but I think it's looks awesome. |
72d8e7f to
9037097
Compare
9037097 to
9bc393f
Compare
|
jenkins, test this |
cchaos
left a comment
There was a problem hiding this comment.
Just had a couple UI suggestions. Other than those. my one concern would be naming it "Telemetry" as I don't think most users will understand what that term means. I'd definitely get with @gchaps to come up with a better name.
Oh and I noticed you didn't touch this file, but the flyout in opt_in_details_component.js is way too small. Can you just remove the size="s" so it defaults to the medium size? And add the maxWidth prop so it doesn't get too wide on large screens.
| /> | ||
| </EuiFormRow> | ||
| <EuiFormRow hasEmptyLabelSpace={true}> | ||
| <EuiLink onClick={this.toggleExample}>See an example of what we collect</EuiLink> |
There was a problem hiding this comment.
Move this link to be part of the form group description.
<Fragment>
<p>{CONFIG_TELEMETRY_DESC}</p>
<p><EuiLink>...</EuiLink></p>
</Fragment>
|
|
||
| return ( | ||
| <EuiPage className="manageTelemetryPage"> | ||
| <EuiPageBody> |
There was a problem hiding this comment.
Add restrictWidth prop to EuiPageBody
| @@ -0,0 +1,4 @@ | |||
| .manageTelemetryPage { | |||
| background-color: #f5f5f5; | |||
There was a problem hiding this comment.
Unnecessary background color because it's already applied via .euiPage
| @@ -0,0 +1,4 @@ | |||
| .manageTelemetryPage { | |||
| background-color: #f5f5f5; | |||
| min-height: 100vh; | |||
There was a problem hiding this comment.
Can you set the min-height to: min-height: calc(~"100vh - 70px"); This will incorporate the management tabs.
| return ( | ||
| <EuiPage className="manageTelemetryPage"> | ||
| <EuiPageBody> | ||
| <EuiTitle size="l"><h1>Manage Telemetry</h1></EuiTitle> |
There was a problem hiding this comment.
Lowercase 't' in 'telemetry'
|
Thanks for the review, @cchaos! |
💔 Build Failed |
|
My suggestion is that we name the tab "Usage Data" And then use the text shown in this screenshot. I removed the text "Opt-in" Keep the "Help us improve" paragraph the same as the text on the opening screen. Adding a link to the privacy statement is a good idea. The text for the toggle button is "Send usage data to Elastic" |
|
Following a meeting with @AlonaNadler, @kobelb, @bmcconaghy, and @cchaos, we decided to stay with the current approach of shimming the Usage Data setting into the Advanced UI Settings screen. We will also shim this setting to respond to the search bar, in a rather forceful way for now. As settings evolve, we may consider a more pluggable or holistic approach. |
💚 Build Succeeded |
jen-huang
left a comment
There was a problem hiding this comment.
I'm overall ok with this approach of including telemetry data in Advanced Settings, though I agree it would be nice to make this page extendable in the future. My main areas of concern are the following:
1) Visual difference between a regular setting and telemetry setting:
The spacing is not quite the same around the field and description. Functionally, a regular setting has "Save" and "Cancel" buttons to confirm changes, whereas the telemetry setting auto-saves on change.
This could potentially be addressed by exporting the settings' field component (/public/management/sections/settings/components/field/field.js) so it can be used in TelemetryForm. The Field component expects a certain structure for the setting prop, so some data wrangling will be needed, but it accepts a custom save function as a prop, as well as clear.
2) Visibility of telemetry setting is low, since it is at bottom of the page.
Typing a term in the search bar does work for bringing up telemetry, but Usage Data does not appear in the category filter. This could be addressed by using the settings component registry to append additional categories, which advanced_settings.js can retrieve. (I realize this isn't the intended use of the registry however, since it isn't a component! 😄)
Alternatively, PageFooter could be changed to PageHeader instead so that telemetry is the top category. I think it is an important enough setting to warrant a prime location.
I'm sure I'm repeating some thoughts which may have already been discussed, but let me know what you think! 🙂
|
Thanks, @jen-huang! I'll see what I can do to make this more visually and functionally similar to the rest of the settings on the page |
💔 Build Failed |
| @@ -462,30 +462,40 @@ export class Field extends PureComponent { | |||
| } | |||
|
|
|||
| renderDescription(setting) { | |||
There was a problem hiding this comment.
Sorry for the whitespace deltas in this file. The important change is here. The description used to always render html (dangerously, I might add), but now it will render a React element if one is provided. If not, then it falls back to the original behavior. I need this so that I can render EuiLinks within the usage data description
💚 Build Succeeded |
|
@jen-huang I updated the look-and-feel so that it's much closer to the rest of the settings screen. I'm hesitant to add this to the category dropdown right now, but I think it's certainly worthwhile to do if/when we make this page more extensible for other plugins to add entries to this page. |
|
@jen-huang are you available for another review? I'd like to merge this sooner rather than later if possible, to unblock other work for Spaces. |
| /** | ||
| * Link to the Elastic Telemetry privacy statement. | ||
| */ | ||
| export const PRIVACY_STATEMENT_URL = `https://www.elastic.co/legal/telemetry-privacy-statement`; |
There was a problem hiding this comment.
Nit: these don't need to be backticks as it's just a string.
|
retest |
💚 Build Succeeded |
|
6.x/6.5 #22877 |



This PR introduces a new
telemetrydocument to the.kibanaindex. This document replaces the existingxpack:telemetryOptInUI Setting as the authoritative source of the user's telemetry opt-in preference.The existing UI setting is marked as
readonly, so it will no longer appear in the Advanced UI Settings screen.Instead, this PR adds a new Telemetry Management screen to allow users to adjust their preference, and see an example of the type of information we collect.Instead, this PR adds a section to the bottom of the Advanced Settings screen to allow users to adjust their preference, and see an example of the type of information we collect.
Latest Screenshot
Outdated Screenshot 2
Outdated Screenshot 1
Migration Logic
This adds to the existing
handle_old_settingslogic, which previously migrated older UI settings to the currentxpack:telemetryOptInsetting. I extended this to keep most of that existing logic, but instead of migrating to the UI setting, it will now create the new telemetry document to track their preference (if set):xpack:telemetryOptInpreference has been set, then the newtelemetrydocument is created with that preference.telemetrydocument.telemetrydocument is not created by this migration process.telemetrydocument. Otherwise, thetelemetrydocument is not created by this migration process, and will instead be created the when the user first opts in.Fixes #22144