mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-31 04:41:32 +02:00
Merge pull request #29349 from overleaf/rh-compile-timeout-info-tracking
Add missing tracking to compile timeout info for default variant GitOrigin-RevId: 4dfea0f55a1887b64e9c41d417c4a1cc0510453d
This commit is contained in:
@@ -3,6 +3,7 @@ import MaterialIcon from '@/shared/components/material-icon'
|
||||
import { Trans, useTranslation } from 'react-i18next'
|
||||
import { useDetachCompileContext as useCompileContext } from '@/shared/context/detach-compile-context'
|
||||
import { useStopOnFirstError } from '@/shared/hooks/use-stop-on-first-error'
|
||||
import { sendMB } from '@/infrastructure/event-tracking'
|
||||
import { useCallback, useMemo } from 'react'
|
||||
import ErrorState from './error-state'
|
||||
import StartFreeTrialButton from '@/shared/components/start-free-trial-button'
|
||||
@@ -149,7 +150,16 @@ const ReasonsForTimeoutInfo = () => {
|
||||
i18nKey="project_timed_out_optimize_images"
|
||||
components={[
|
||||
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
|
||||
<a href="https://www.overleaf.com/learn/how-to/Optimising_very_large_image_files" />,
|
||||
<a
|
||||
href="https://www.overleaf.com/learn/how-to/Optimising_very_large_image_files"
|
||||
onClick={() => {
|
||||
sendMB('paywall-info-click', {
|
||||
'paywall-type': 'compile-timeout',
|
||||
content: 'docs',
|
||||
type: 'optimize',
|
||||
})
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
</li>
|
||||
@@ -158,7 +168,16 @@ const ReasonsForTimeoutInfo = () => {
|
||||
i18nKey="a_fatal_compile_error_that_completely_blocks_compilation"
|
||||
components={[
|
||||
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
|
||||
<a href="https://www.overleaf.com/learn/how-to/Why_do_I_keep_getting_the_compile_timeout_error_message%3F#Fatal_compile_errors_blocking_the_compilation" />,
|
||||
<a
|
||||
href="https://www.overleaf.com/learn/how-to/Why_do_I_keep_getting_the_compile_timeout_error_message%3F#Fatal_compile_errors_blocking_the_compilation"
|
||||
onClick={() => {
|
||||
sendMB('paywall-info-click', {
|
||||
'paywall-type': 'compile-timeout',
|
||||
content: 'docs',
|
||||
type: 'fatal-error',
|
||||
})
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
{!lastCompileOptions.stopOnFirstError && (
|
||||
@@ -191,6 +210,13 @@ const ReasonsForTimeoutInfo = () => {
|
||||
href="/learn/how-to/Fixing_and_preventing_compile_timeouts"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
onClick={() => {
|
||||
sendMB('paywall-info-click', {
|
||||
'paywall-type': 'compile-timeout',
|
||||
content: 'docs',
|
||||
type: 'learn-more',
|
||||
})
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
|
||||
@@ -5,6 +5,7 @@ import PdfLogEntry from './pdf-log-entry'
|
||||
import { useDetachCompileContext as useCompileContext } from '../../../shared/context/detach-compile-context'
|
||||
import { useStopOnFirstError } from '../../../shared/hooks/use-stop-on-first-error'
|
||||
import getMeta from '../../../utils/meta'
|
||||
import { sendMB } from '@/infrastructure/event-tracking'
|
||||
|
||||
function PdfPreviewError({
|
||||
error,
|
||||
@@ -300,7 +301,16 @@ function TimedOutLogEntry() {
|
||||
i18nKey="project_timed_out_optimize_images"
|
||||
components={[
|
||||
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
|
||||
<a href="https://www.overleaf.com/learn/how-to/Optimising_very_large_image_files" />,
|
||||
<a
|
||||
href="https://www.overleaf.com/learn/how-to/Optimising_very_large_image_files"
|
||||
onClick={() => {
|
||||
sendMB('paywall-info-click', {
|
||||
'paywall-type': 'compile-timeout',
|
||||
content: 'docs',
|
||||
type: 'optimize',
|
||||
})
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
</li>
|
||||
@@ -309,7 +319,16 @@ function TimedOutLogEntry() {
|
||||
i18nKey="project_timed_out_fatal_error"
|
||||
components={[
|
||||
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
|
||||
<a href="https://www.overleaf.com/learn/how-to/Why_do_I_keep_getting_the_compile_timeout_error_message%3F#Fatal_compile_errors_blocking_the_compilation" />,
|
||||
<a
|
||||
href="https://www.overleaf.com/learn/how-to/Why_do_I_keep_getting_the_compile_timeout_error_message%3F#Fatal_compile_errors_blocking_the_compilation"
|
||||
onClick={() => {
|
||||
sendMB('paywall-info-click', {
|
||||
'paywall-type': 'compile-timeout',
|
||||
content: 'docs',
|
||||
type: 'fatal-error',
|
||||
})
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
{!lastCompileOptions.stopOnFirstError && (
|
||||
@@ -335,7 +354,16 @@ function TimedOutLogEntry() {
|
||||
i18nKey="project_timed_out_learn_more"
|
||||
components={[
|
||||
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
|
||||
<a href="https://www.overleaf.com/learn/how-to/Why_do_I_keep_getting_the_compile_timeout_error_message%3F" />,
|
||||
<a
|
||||
href="https://www.overleaf.com/learn/how-to/Why_do_I_keep_getting_the_compile_timeout_error_message%3F"
|
||||
onClick={() => {
|
||||
sendMB('paywall-info-click', {
|
||||
'paywall-type': 'compile-timeout',
|
||||
content: 'docs',
|
||||
type: 'learn-more',
|
||||
})
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
</p>
|
||||
|
||||
@@ -179,6 +179,13 @@ const PreventTimeoutHelpMessage = memo(function PreventTimeoutHelpMessage({
|
||||
href="/learn/how-to/Optimising_very_large_image_files"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
onClick={() => {
|
||||
eventTracking.sendMB('paywall-info-click', {
|
||||
'paywall-type': 'compile-timeout',
|
||||
content: 'docs',
|
||||
type: 'optimize',
|
||||
})
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
@@ -192,6 +199,13 @@ const PreventTimeoutHelpMessage = memo(function PreventTimeoutHelpMessage({
|
||||
href="/learn/how-to/Fixing_and_preventing_compile_timeouts#Step_3:_Assess_your_project_for_time-consuming_tasks_and_fatal_errors"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
onClick={() => {
|
||||
eventTracking.sendMB('paywall-info-click', {
|
||||
'paywall-type': 'compile-timeout',
|
||||
content: 'docs',
|
||||
type: 'fatal-error',
|
||||
})
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
@@ -225,6 +239,13 @@ const PreventTimeoutHelpMessage = memo(function PreventTimeoutHelpMessage({
|
||||
href="/learn/how-to/Fixing_and_preventing_compile_timeouts"
|
||||
rel="noopener noreferrer"
|
||||
target="_blank"
|
||||
onClick={() => {
|
||||
eventTracking.sendMB('paywall-info-click', {
|
||||
'paywall-type': 'compile-timeout',
|
||||
content: 'docs',
|
||||
type: 'learn-more',
|
||||
})
|
||||
}}
|
||||
/>,
|
||||
]}
|
||||
/>
|
||||
|
||||
Reference in New Issue
Block a user