From 186c76ba9ec9028572cc9e4dc295b5c4e448feb8 Mon Sep 17 00:00:00 2001 From: Jakob Ackermann Date: Thu, 31 Jul 2025 12:36:38 +0200 Subject: [PATCH] [web] remove jump-to-location event (#27490) * [web] remove jump-to-location event * [web] remove unused imports GitOrigin-RevId: 2be9405b6c2d3d589184c7c913294b2cbe828250 --- .../js/features/pdf-preview/components/pdf-js-viewer.tsx | 6 ------ .../pdf-preview/components/pdf-synctex-controls.tsx | 5 ----- .../frontend/js/features/pdf-preview/hooks/use-synctex.ts | 6 ------ 3 files changed, 17 deletions(-) diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-js-viewer.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-js-viewer.tsx index ff6363ea08..e237ca3877 100644 --- a/services/web/frontend/js/features/pdf-preview/components/pdf-js-viewer.tsx +++ b/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 { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context' import { captureException } from '../../../infrastructure/error-reporter' -import * as eventTracking from '../../../infrastructure/event-tracking' import { getPdfCachingMetrics } from '../util/metrics' import { debugConsole } from '@/utils/debugging' import { usePdfPreviewContext } from '@/features/pdf-preview/components/pdf-preview-provider' @@ -261,11 +260,6 @@ function PdfJsViewer({ url, pdfFile }: PdfJsViewerProps) { ) if (clickPosition) { - eventTracking.sendMB('jump-to-location', { - direction: 'pdf-location-in-code', - method: 'double-click', - }) - window.dispatchEvent( new CustomEvent('synctex:sync-to-position', { detail: { diff --git a/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.tsx b/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.tsx index aee9a12549..f6a9229a51 100644 --- a/services/web/frontend/js/features/pdf-preview/components/pdf-synctex-controls.tsx +++ b/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 { useLayoutContext } from '../../../shared/context/layout-context' import { useTranslation } from 'react-i18next' -import * as eventTracking from '../../../infrastructure/event-tracking' import OLTooltip from '@/features/ui/components/ol/ol-tooltip' import OLButton from '@/features/ui/components/ol/ol-button' import MaterialIcon from '@/shared/components/material-icon' @@ -38,10 +37,6 @@ const GoToCodeButton = memo(function GoToCodeButton({ } const syncToCodeWithButton = useCallback(() => { - eventTracking.sendMB('jump-to-location', { - direction: 'pdf-location-in-code', - method: 'arrow', - }) syncToCode({ visualOffset: 72 }) }, [syncToCode]) diff --git a/services/web/frontend/js/features/pdf-preview/hooks/use-synctex.ts b/services/web/frontend/js/features/pdf-preview/hooks/use-synctex.ts index 328c9bfe37..0a0a9f64f6 100644 --- a/services/web/frontend/js/features/pdf-preview/hooks/use-synctex.ts +++ b/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 { useFileTreeData } from '../../../shared/context/file-tree-data-context' import useScopeEventListener from '../../../shared/hooks/use-scope-event-listener' -import * as eventTracking from '../../../infrastructure/event-tracking' import { debugConsole } from '@/utils/debugging' import { useFileTreePathContext } from '@/features/file-tree/contexts/file-tree-path' import { useEditorManagerContext } from '@/features/ide-react/context/editor-manager-context' @@ -163,11 +162,6 @@ export default function useSynctex(): { column: String(column), }).toString() - eventTracking.sendMB('jump-to-location', { - direction: 'code-location-in-pdf', - method: 'arrow', - }) - goToPdfLocation(params) } }, [getCurrentFilePath, goToPdfLocation])