[Telemetry] Show opt-in changes for OSS users#50831
Conversation
…m/elastic/kibana into chore/oss-telemetry-banner-notice
| * under the License. | ||
| */ | ||
|
|
||
| /* eslint @elastic/eui/href-or-on-click:0 */ |
There was a problem hiding this comment.
This is a bit left-handed, but we need to call internals that they've seen this notice when they're navigating via anchor tags.
There was a problem hiding this comment.
It's not clear which line this comment setting refers to. Can this be done with an eslint-disable-line ?
…m/elastic/kibana into chore/oss-telemetry-banner-notice
|
|
||
| telemetryNotifyUserAboutOptInDefault = npStart.core.injectedMetadata.getInjectedVar( | ||
| 'telemetryNotifyUserAboutOptInDefault' | ||
| ) as boolean; |
There was a problem hiding this comment.
I'm not so sure on this naming, usually boolean variables need an is/should prefix for clarity.
Maybe telemetryNotifyUserAboutOptInDefault ?
I think we want to keep the telemetry prefix because of the way the injectedVars are not namespaced by plugin
…m/elastic/kibana into chore/oss-telemetry-banner-notice
| } as GetParams); | ||
|
|
||
| expect(telemetry.userHasSeenNotice).to.be(true); | ||
| }); |
There was a problem hiding this comment.
The only thing I think the test code is missing is a clean-up step to remove the telemetry:telemetry document after the test did its update
There was a problem hiding this comment.
Also, I didn't see an easy way to test that this API works with a non-privileged user.
💔 Build Failed |
|
@elasticmachine merge upstream |
💔 Build Failed |
💚 Build Succeeded |
pgayvallet
left a comment
There was a problem hiding this comment.
LGTM for platform changes
| interface Props { | ||
| urlBasePath: string; | ||
| onSkip: () => void; | ||
| optInSeen: () => any; |
There was a problem hiding this comment.
NIT: naming. This is an event handler. optInSeen -> onOptInSeen (like onSkip here). Same goes for propagaging from home.js
…m/elastic/kibana into chore/oss-telemetry-banner-notice
💚 Build Succeeded |
* WIP: Notice banner for OSS folks * Add telemetryNotifyUserAboutOptInDefault to injected vars * add userHasSeenNotice check * More WIP on banner notice component * Text changes on screens * make userHasSeenNotice flag work * Finalzed splash text + checking new flag * Consolidating banner calls and saving status of opt-in notice * Conditionally remove the banner and add some code docs * Fixing prior welcome tests * api integration test for user has seen opt in * change post method to put in ui * unit test for get_telemetry_notify_user_about_optin_default * Ignore TS woes * Adding new tests and snapshots for opt-in banner component * Notice banner test * Translation miss * More opt-in tests * increase types usage * roll back core server api change * update snapshot * Prop name change + snapshot updates
* WIP: Notice banner for OSS folks * Add telemetryNotifyUserAboutOptInDefault to injected vars * add userHasSeenNotice check * More WIP on banner notice component * Text changes on screens * make userHasSeenNotice flag work * Finalzed splash text + checking new flag * Consolidating banner calls and saving status of opt-in notice * Conditionally remove the banner and add some code docs * Fixing prior welcome tests * api integration test for user has seen opt in * change post method to put in ui * unit test for get_telemetry_notify_user_about_optin_default * Ignore TS woes * Adding new tests and snapshots for opt-in banner component * Notice banner test * Translation miss * More opt-in tests * increase types usage * roll back core server api change * update snapshot * Prop name change + snapshot updates
…-fallback * 'master' of github.com:elastic/kibana: (116 commits) [Maps] move apply global filter settting from layer to source (elastic#50523) [SIEM] Fix: Empty `Source` / `Destination` shown when only ports are populated (elastic#50843) [Maps] Delay vector tile layer syncing until spritesheet is loaded (elastic#48955) [Maps] prevent users from overflowing URL when filtering by shape (elastic#50747) [DOCS] Mark Beats central management as discontinued (elastic#49423) [page_objects/common_page] convert to ts (elastic#50771) [NP Kibana Migrations ] kibana plugin home (elastic#50444) [DOCS] Shareables naming convention (elastic#50497) [ML] DF Analytics - auto-populate model_memory_limit (elastic#50714) Increase alerting test stability and reduce flakiness (elastic#50246) [ML] Remaning new_job_new folder (elastic#50917) [Telemetry] Show opt-in changes for OSS users (elastic#50831) [ML] Fix lat_long anomalies table links menu and value formatting (elastic#50916) [Dev] Fix serialising a really big string (elastic#50915) Better explanation about the Prettier recommendation (extension vs. NPM module) (elastic#50629) [Monitoring] Use a basic monitoring user for tests (elastic#47865) [Monitoring] Gracefully handle issue with filebeat indices (elastic#48929) [Monitoring] Improve permissions required around setup mode (elastic#50421) Additional validation for elasticsearch username (elastic#48247) Revert changes to use_kibana_ui_setting (elastic#50877) ... # Conflicts: # src/legacy/core_plugins/console/server/request.test.ts
Summary
Fixes #50773.
This ensure that we always show telemetry changes in 7.5, and saves the fact that we've served notice in our index.
Still pending are a tests and some final tweaks, but functionality is there.
Checklist
Use
strikethroughsto remove checklist items you don't feel are applicable to this PR.