From e95b159edd1688c3f19ca3cfc7db2a01370d53ce Mon Sep 17 00:00:00 2001 From: MoxAmber Date: Thu, 12 Jun 2025 15:12:25 +0100 Subject: [PATCH] Merge pull request #26395 from overleaf/as-compile-timeout-event-fix [web] Rename time segmentation value to compileTime to prevent MixPanel errors GitOrigin-RevId: 70ddfd5091e3f8d98849f09dc9d09adc8c0bf2c7 --- .../compile-time-warning-upgrade-prompt.tsx | 12 ++++++------ .../components/timeout-upgrade-paywall-prompt.tsx | 2 +- .../components/timeout-upgrade-prompt-new.tsx | 2 +- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/services/web/frontend/js/features/pdf-preview/components/compile-time-warning-upgrade-prompt.tsx b/services/web/frontend/js/features/pdf-preview/components/compile-time-warning-upgrade-prompt.tsx index 76f0108ee6..164c3c3275 100644 --- a/services/web/frontend/js/features/pdf-preview/components/compile-time-warning-upgrade-prompt.tsx +++ b/services/web/frontend/js/features/pdf-preview/components/compile-time-warning-upgrade-prompt.tsx @@ -29,7 +29,7 @@ function CompileTimeWarningUpgradePrompt() { const warningSegmentation = useMemo( () => ({ content: 'warning', - time: warningThreshold, + compileTime: warningThreshold, ...sharedSegmentation, }), [sharedSegmentation, warningThreshold] @@ -38,7 +38,7 @@ function CompileTimeWarningUpgradePrompt() { const changingSoonSegmentation = useMemo( () => ({ content: 'changes', - time: 10, + compileTime: 10, ...sharedSegmentation, }), [sharedSegmentation] @@ -58,7 +58,7 @@ function CompileTimeWarningUpgradePrompt() { ) { setShowWarning(true) eventTracking.sendMB('compile-time-warning-displayed', { - time: warningThreshold, + compileTime: warningThreshold, isProjectOwner, }) } @@ -75,13 +75,13 @@ function CompileTimeWarningUpgradePrompt() { const handleDismissWarning = useCallback(() => { eventTracking.sendMB('compile-time-warning-dismissed', { - time: warningThreshold, + compileTime: warningThreshold, isProjectOwner, }) eventTracking.sendMB('paywall-dismiss', { 'paywall-type': 'compile-time-warning', content: 'warning', - time: warningThreshold, + compileTime: warningThreshold, ...sharedSegmentation, }) setShowWarning(false) @@ -98,7 +98,7 @@ function CompileTimeWarningUpgradePrompt() { const handleDismissChangingSoon = useCallback(() => { eventTracking.sendMB('paywall-dismiss', { 'paywall-type': 'compile-time-warning', - time: 10, + compileTime: 10, content: 'changes', ...sharedSegmentation, }) diff --git a/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-paywall-prompt.tsx b/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-paywall-prompt.tsx index ac5bdf8361..db01b0da7a 100644 --- a/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-paywall-prompt.tsx +++ b/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-paywall-prompt.tsx @@ -39,7 +39,7 @@ function TimeoutUpgradePaywallPrompt({ () => ({ '10s-timeout-warning': reducedTimeoutWarning, 'is-owner': isProjectOwner, - time: compileTimeout, + compileTime: compileTimeout, }), [isProjectOwner, reducedTimeoutWarning, compileTimeout] ) diff --git a/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-prompt-new.tsx b/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-prompt-new.tsx index 8ac666f78f..1c4a7089da 100644 --- a/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-prompt-new.tsx +++ b/services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-prompt-new.tsx @@ -33,7 +33,7 @@ function TimeoutUpgradePromptNew() { () => ({ '10s-timeout-warning': reducedTimeoutWarning, 'is-owner': isProjectOwner, - time: compileTimeout, + compileTime: compileTimeout, }), [isProjectOwner, reducedTimeoutWarning, compileTimeout] )