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

adding opt in for telemetry to start trial and upload license #22925

Merged

Conversation

bmcconaghy
Copy link
Contributor

This changeset adds an opt in to telemetry for the start trial acknowledge modal and upload license screens for license management. It leverages code from the xpack_main plugin (this dependency is hidden from the code via a local lib file).

image
image

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

Mostly spacing and alignment fixes.
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

cchaos and others added 3 commits September 12, 2018 16:03
…agement' into bmcconaghy-telemetry_opt_in_license_management

# Conflicts:
#	x-pack/plugins/license_management/__jest__/__snapshots__/upload_license.test.js.snap
@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@elasticmachine
Copy link
Contributor

💔 Build Failed

@bmcconaghy
Copy link
Contributor Author

retest

@elasticmachine
Copy link
Contributor

💔 Build Failed

Copy link
Contributor

@cjcenizal cjcenizal left a comment

Choose a reason for hiding this comment

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

Code LGTM, just had some small suggestions. Checked UI locally but didn't verify that opt-in works.

}

const readMoreButton = (
<EuiLink onClick={() => { this.setState({ showMoreTelemetryInfo: !showMoreTelemetryInfo });}}>
Copy link
Contributor

Choose a reason for hiding this comment

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

For better readability, how about extracting this into a onClickReadMore method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

button={readMoreButton}
isOpen={showMoreTelemetryInfo}
closePopover={this.closeReadMorePopover}
style={{ verticalAlign: 'baseline' }}
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 see this style being applied in the DOM. Is it necessary?

image

Copy link
Contributor

Choose a reason for hiding this comment

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

@cjcenizal That's applied to the trigger (button) wrapper, not the popover itself.

Copy link
Contributor

Choose a reason for hiding this comment

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

Ah, of course... I should know this! :D

closePopover={this.closeReadMorePopover}
style={{ verticalAlign: 'baseline' }}
>
<EuiText style={{ width: 240 }} >
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we extract this into a CSS class? If we keep all our styles in LESS/SCSS files it will be easier to integrate them with EUI vars/mixins and to identify cases for common components/styles.

Copy link
Contributor

Choose a reason for hiding this comment

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

This is how we've been handling sizing the width's of popovers (see first example). Just usually it's a div that contains the content, I just skipped the extra div and put it directly on the text container.

Copy link
Contributor

Choose a reason for hiding this comment

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

I think originally we were using styles in the EUI examples to make it clearer that custom styles were in use (otherwise it would seem like the classes were something provided by EUI).

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

<p>
This feature periodically sends basic feature usage statistics.
This information will not be shared outside of Elastic.
See an <EuiLink onClick={() => { this.setState({ showExample: true }); this.closeReadMorePopover(); }}>example</EuiLink>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we extract this into an onClickExample method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

label={<span>Send basic feature usage statistics to Elastic periodically. {popover}</span>}
id="isOptingInToTelemetry"
checked={isOptingInToTelemetry}
onChange={event => {
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we extract this into an onChangeOptIn method?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

</EuiTitle>
</EuiFlexItem>
</EuiFlexGroup>
<React.Fragment>
Copy link
Contributor

Choose a reason for hiding this comment

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

Can we use a named import instead?

import React, { Fragment } from 'react';

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@elasticmachine
Copy link
Contributor

💚 Build Succeeded

@bmcconaghy bmcconaghy merged commit e0c0e8d into elastic:master Sep 18, 2018
bmcconaghy added a commit to bmcconaghy/kibana that referenced this pull request Sep 18, 2018
…c#22925)

* adding opt in for telemetry to start trial and upload license

* fixing scrolling issue with start basic modal in small browser window and improving a11y for read more

* Design cleanup

Mostly spacing and alignment fixes.

* updating jest snapshots

* IE Fixes

* PR feedback
@bmcconaghy bmcconaghy deleted the telemetry_opt_in_license_management branch September 18, 2018 14:59
bmcconaghy added a commit that referenced this pull request Sep 18, 2018
#23273)

* adding opt in for telemetry to start trial and upload license

* fixing scrolling issue with start basic modal in small browser window and improving a11y for read more

* Design cleanup

Mostly spacing and alignment fixes.

* updating jest snapshots

* IE Fixes

* PR feedback
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants