Browse Source

[web] remove jump-to-location event (#27490)

* [web] remove jump-to-location event

* [web] remove unused imports

GitOrigin-RevId: 2be9405b6c2d3d589184c7c913294b2cbe828250
Jakob Ackermann 1 year ago
parent
commit
386897266d

+ 0 - 6
services/web/frontend/js/features/pdf-preview/components/pdf-js-viewer.tsx

@@ -9,7 +9,6 @@ import withErrorBoundary from '../../../infrastructure/error-boundary'
 import PdfPreviewErrorBoundaryFallback from './pdf-preview-error-boundary-fallback'
 import PdfPreviewErrorBoundaryFallback from './pdf-preview-error-boundary-fallback'
 import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
 import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
 import { captureException } from '../../../infrastructure/error-reporter'
 import { captureException } from '../../../infrastructure/error-reporter'
-import * as eventTracking from '../../../infrastructure/event-tracking'
 import { getPdfCachingMetrics } from '../util/metrics'
 import { getPdfCachingMetrics } from '../util/metrics'
 import { debugConsole } from '@/utils/debugging'
 import { debugConsole } from '@/utils/debugging'
 import { usePdfPreviewContext } from '@/features/pdf-preview/components/pdf-preview-provider'
 import { usePdfPreviewContext } from '@/features/pdf-preview/components/pdf-preview-provider'
@@ -261,11 +260,6 @@ function PdfJsViewer({ url, pdfFile }: PdfJsViewerProps) {
             )
             )
 
 
             if (clickPosition) {
             if (clickPosition) {
-              eventTracking.sendMB('jump-to-location', {
-                direction: 'pdf-location-in-code',
-                method: 'double-click',
-              })
-
               window.dispatchEvent(
               window.dispatchEvent(
                 new CustomEvent('synctex:sync-to-position', {
                 new CustomEvent('synctex:sync-to-position', {
                   detail: {
                   detail: {

+ 0 - 5
services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.tsx

@@ -3,7 +3,6 @@ import { memo, useCallback, useMemo } from 'react'
 import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
 import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
 import { useLayoutContext } from '../../../shared/context/layout-context'
 import { useLayoutContext } from '../../../shared/context/layout-context'
 import { useTranslation } from 'react-i18next'
 import { useTranslation } from 'react-i18next'
-import * as eventTracking from '../../../infrastructure/event-tracking'
 import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
 import OLTooltip from '@/features/ui/components/ol/ol-tooltip'
 import OLButton from '@/features/ui/components/ol/ol-button'
 import OLButton from '@/features/ui/components/ol/ol-button'
 import MaterialIcon from '@/shared/components/material-icon'
 import MaterialIcon from '@/shared/components/material-icon'
@@ -38,10 +37,6 @@ const GoToCodeButton = memo(function GoToCodeButton({
   }
   }
 
 
   const syncToCodeWithButton = useCallback(() => {
   const syncToCodeWithButton = useCallback(() => {
-    eventTracking.sendMB('jump-to-location', {
-      direction: 'pdf-location-in-code',
-      method: 'arrow',
-    })
     syncToCode({ visualOffset: 72 })
     syncToCode({ visualOffset: 72 })
   }, [syncToCode])
   }, [syncToCode])
 
 

+ 0 - 6
services/web/frontend/js/features/pdf-preview/hooks/use-synctex.ts

@@ -9,7 +9,6 @@ import useDetachAction from '../../../shared/hooks/use-detach-action'
 import localStorage from '../../../infrastructure/local-storage'
 import localStorage from '../../../infrastructure/local-storage'
 import { useFileTreeData } from '../../../shared/context/file-tree-data-context'
 import { useFileTreeData } from '../../../shared/context/file-tree-data-context'
 import useScopeEventListener from '../../../shared/hooks/use-scope-event-listener'
 import useScopeEventListener from '../../../shared/hooks/use-scope-event-listener'
-import * as eventTracking from '../../../infrastructure/event-tracking'
 import { debugConsole } from '@/utils/debugging'
 import { debugConsole } from '@/utils/debugging'
 import { useFileTreePathContext } from '@/features/file-tree/contexts/file-tree-path'
 import { useFileTreePathContext } from '@/features/file-tree/contexts/file-tree-path'
 import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
 import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context'
@@ -163,11 +162,6 @@ export default function useSynctex(): {
         column: String(column),
         column: String(column),
       }).toString()
       }).toString()
 
 
-      eventTracking.sendMB('jump-to-location', {
-        direction: 'code-location-in-pdf',
-        method: 'arrow',
-      })
-
       goToPdfLocation(params)
       goToPdfLocation(params)
     }
     }
   }, [getCurrentFilePath, goToPdfLocation])
   }, [getCurrentFilePath, goToPdfLocation])