Tear down compile-timeout-remove-info (#29719)

* tearing down the test, and removing the timeout help message

* running make cleanup_unused_locales

* npm run extract:translations

GitOrigin-RevId: 54ee19d18a86a9061ff23d6dbd8375ae0bdf73c2
This commit is contained in:
Davinder Singh
2025-11-25 09:06:05 +00:00
committed by Copybot
parent e7c92b15cc
commit ec9d2d83d8
4 changed files with 1 additions and 147 deletions
@@ -14,7 +14,6 @@
"Pricing": "",
"Solutions": "",
"a_custom_size_has_been_used_in_the_latex_code": "",
"a_fatal_compile_error_that_completely_blocks_compilation": "",
"a_file_with_that_name_already_exists_and_will_be_overriden": "",
"a_more_comprehensive_list_of_keyboard_shortcuts": "",
"a_new_reference_was_added": "",
@@ -300,7 +299,6 @@
"comment_only_upgrade_for_track_changes": "",
"comment_only_upgrade_to_enable_track_changes": "",
"common": "",
"common_causes_of_compile_timeouts_include": "",
"commons_plan_tooltip": "",
"compact": "",
"company_name": "",
@@ -551,7 +549,6 @@
"enable_managed_users": "",
"enable_single_sign_on": "",
"enable_sso": "",
"enable_stop_on_first_error_under_recompile_dropdown_menu": "",
"enabled": "",
"enables_real_time_syntax_checking_in_the_editor": "",
"enabling": "",
@@ -1410,7 +1407,6 @@
"ready_to_join_x_in_group_y": "",
"ready_to_set_up": "",
"realtime_track_changes": "",
"reasons_for_compile_timeouts": "",
"reauthorize_github_account": "",
"recaptcha_conditions": "",
"recent_commits_in_github": "",
@@ -3,8 +3,6 @@ import { useDetachCompileContext } from '../../../shared/context/detach-compile-
import StartFreeTrialButton from '../../../shared/components/start-free-trial-button'
import { memo, useCallback, useMemo, useState } from 'react'
import PdfLogEntry from './pdf-log-entry'
import { useStopOnFirstError } from '../../../shared/hooks/use-stop-on-first-error'
import OLButton from '@/shared/components/ol/ol-button'
import * as eventTracking from '../../../infrastructure/event-tracking'
import getMeta from '@/utils/meta'
import { populateEditorRedesignSegmentation } from '@/shared/hooks/use-editor-analytics'
@@ -13,16 +11,8 @@ import { useIsNewEditorEnabled } from '@/features/ide-redesign/utils/new-editor-
import { isSplitTestEnabled } from '@/utils/splitTestUtils'
function TimeoutUpgradePromptNew() {
const {
startCompile,
lastCompileOptions,
setAnimateCompileDropdownArrow,
isProjectOwner,
} = useDetachCompileContext()
const { isProjectOwner } = useDetachCompileContext()
const newEditor = useIsNewEditorEnabled()
const shouldHideCompileTimeoutInfo = isSplitTestEnabled(
'compile-timeout-remove-info'
)
const isCompileTimeoutTargetPlansEnabled = isSplitTestEnabled(
'compile-timeout-target-plans'
@@ -31,16 +21,6 @@ function TimeoutUpgradePromptNew() {
const [showCompileTimeoutPaywall, setShowCompileTimeoutPaywall] =
useState(false)
const { enableStopOnFirstError } = useStopOnFirstError({
eventSource: 'timeout-new',
})
const handleEnableStopOnFirstErrorClick = useCallback(() => {
enableStopOnFirstError()
startCompile({ stopOnFirstError: true })
setAnimateCompileDropdownArrow(true)
}, [enableStopOnFirstError, startCompile, setAnimateCompileDropdownArrow])
const { compileTimeout } = getMeta('ol-compileSettings')
const sharedSegmentation = useMemo(
@@ -64,15 +44,6 @@ function TimeoutUpgradePromptNew() {
onShowPaywallModal={() => setShowCompileTimeoutPaywall(true)}
isCompileTimeoutTargetPlansEnabled={isCompileTimeoutTargetPlansEnabled}
/>
{getMeta('ol-ExposedSettings').enableSubscriptions &&
!shouldHideCompileTimeoutInfo && (
<PreventTimeoutHelpMessage
handleEnableStopOnFirstErrorClick={
handleEnableStopOnFirstErrorClick
}
lastCompileOptions={lastCompileOptions}
/>
)}
<CompileTimeoutPaywallModal
show={showCompileTimeoutPaywall}
onHide={() => setShowCompileTimeoutPaywall(false)}
@@ -165,112 +136,4 @@ const CompileTimeout = memo(function CompileTimeout({
)
})
type PreventTimeoutHelpMessageProps = {
lastCompileOptions: any
handleEnableStopOnFirstErrorClick: () => void
}
const PreventTimeoutHelpMessage = memo(function PreventTimeoutHelpMessage({
lastCompileOptions,
handleEnableStopOnFirstErrorClick,
}: PreventTimeoutHelpMessageProps) {
const { t } = useTranslation()
return (
<PdfLogEntry
autoExpand
headerTitle={t('reasons_for_compile_timeouts')}
formattedContent={
<>
<p>{t('common_causes_of_compile_timeouts_include')}:</p>
<ul>
<li>
<Trans
i18nKey="project_timed_out_optimize_images"
components={[
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
<a
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',
})
}}
/>,
]}
/>
</li>
<li>
<Trans
i18nKey="a_fatal_compile_error_that_completely_blocks_compilation"
components={[
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
<a
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',
})
}}
/>,
]}
/>
{!lastCompileOptions.stopOnFirstError && (
<>
{' '}
<Trans
i18nKey="enable_stop_on_first_error_under_recompile_dropdown_menu"
components={[
// eslint-disable-next-line react/jsx-key
<OLButton
variant="link"
className="btn-inline-link fw-bold"
size="sm"
onClick={handleEnableStopOnFirstErrorClick}
/>,
// eslint-disable-next-line react/jsx-key
<strong />,
]}
/>{' '}
</>
)}
</li>
</ul>
<p>
<Trans
i18nKey="project_timed_out_learn_more"
components={[
// eslint-disable-next-line jsx-a11y/anchor-has-content, react/jsx-key
<a
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',
})
}}
/>,
]}
/>
</p>
</>
}
// @ts-ignore
entryAriaLabel={t('reasons_for_compile_timeouts')}
level="raw"
/>
)
})
export default memo(TimeoutUpgradePromptNew)