|
1 | | -import { isEqual, noop } from 'lodash' |
| 1 | +import { isEqual } from 'lodash' |
2 | 2 | import { |
3 | 3 | combineLatest, |
4 | 4 | concat, |
@@ -83,11 +83,6 @@ export interface HoverifierOptions<C extends object> { |
83 | 83 | */ |
84 | 84 | pushHistory: (path: string) => void |
85 | 85 |
|
86 | | - /** |
87 | | - * Called to log telemetry events |
88 | | - */ |
89 | | - logTelemetryEvent?: (event: string, data?: any) => void |
90 | | - |
91 | 86 | fetchHover: HoverFetcher<C> |
92 | 87 | fetchJumpURL: JumpURLFetcher<C> |
93 | 88 | getReferencesURL: (hoverToken: HoveredToken & C) => string | null |
@@ -196,7 +191,7 @@ export interface HoverState { |
196 | 191 | /** |
197 | 192 | * The props to pass to `HoverOverlay`, or `undefined` if it should not be rendered. |
198 | 193 | */ |
199 | | - hoverOverlayProps?: Pick<HoverOverlayProps, Exclude<keyof HoverOverlayProps, 'linkComponent' | 'logTelemetryEvent'>> |
| 194 | + hoverOverlayProps?: Pick<HoverOverlayProps, Exclude<keyof HoverOverlayProps, 'linkComponent'>> |
200 | 195 |
|
201 | 196 | /** |
202 | 197 | * The currently selected position, if any. |
@@ -300,7 +295,6 @@ export function createHoverifier<C extends object>({ |
300 | 295 | fetchHover, |
301 | 296 | fetchJumpURL, |
302 | 297 | getReferencesURL, |
303 | | - logTelemetryEvent = noop, |
304 | 298 | }: HoverifierOptions<C>): Hoverifier<C> { |
305 | 299 | // Internal state that is not exposed to the caller |
306 | 300 | // Shared between all hoverified code views |
@@ -641,18 +635,6 @@ export function createHoverifier<C extends object>({ |
641 | 635 | token.classList.add('selection-highlight') |
642 | 636 | }) |
643 | 637 | ) |
644 | | - // Telemetry for hovers |
645 | | - subscription.add( |
646 | | - zip(resolvedPositions, hoverObservables) |
647 | | - .pipe( |
648 | | - distinctUntilChanged(([positionA], [positionB]) => isEqual(positionA, positionB)), |
649 | | - switchMap(([, hoverObservable]) => hoverObservable), |
650 | | - filter(({ hoverOrError }) => HoverMerged.is(hoverOrError)) |
651 | | - ) |
652 | | - .subscribe(() => { |
653 | | - logTelemetryEvent('SymbolHovered') |
654 | | - }) |
655 | | - ) |
656 | 638 |
|
657 | 639 | /** |
658 | 640 | * For every position, emits an Observable that emits new values for the `definitionURLOrError` state. |
@@ -734,9 +716,6 @@ export function createHoverifier<C extends object>({ |
734 | 716 | // On every click on a go to definition button, reveal loader/error/not found UI |
735 | 717 | subscription.add( |
736 | 718 | goToDefinitionClicks.subscribe(event => { |
737 | | - // Telemetry |
738 | | - logTelemetryEvent('GoToDefClicked') |
739 | | - |
740 | 719 | // If we don't have a result yet that would be jumped to by the native <a> tag... |
741 | 720 | if (!isJumpURL(container.values.definitionURLOrError)) { |
742 | 721 | // Prevent default link behaviour (jump will be done programmatically once finished) |
|
0 commit comments