Просмотр исходного кода

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
Davinder Singh 8 месяцев назад
Родитель
Сommit
ec9d2d83d8

+ 0 - 1
services/web/app/src/Features/Project/ProjectController.mjs

@@ -452,7 +452,6 @@ const _ProjectController = {
       'editor-redesign-new-users',
       'writefull-frontend-migration',
       'chat-edit-delete',
-      'compile-timeout-remove-info',
       'ai-workbench',
       'compile-timeout-target-plans',
       'writefull-figure-generator',

+ 0 - 4
services/web/frontend/extracted-translations.json

@@ -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": "",

+ 1 - 138
services/web/frontend/js/features/pdf-preview/components/timeout-upgrade-prompt-new.tsx

@@ -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)

+ 0 - 4
services/web/locales/en.json

@@ -15,7 +15,6 @@
   "Terms": "Terms",
   "Universities": "Universities",
   "a_custom_size_has_been_used_in_the_latex_code": "A custom size has been used in the LaTeX code.",
-  "a_fatal_compile_error_that_completely_blocks_compilation": "A <0>fatal compile error</0> that completely blocks the compilation.",
   "a_file_with_that_name_already_exists_and_will_be_overriden": "A file with that name already exists. That file will be overwritten.",
   "a_more_comprehensive_list_of_keyboard_shortcuts": "A more comprehensive list of keyboard shortcuts can be found in <0>this __appName__ project template</0>",
   "a_new_reference_was_added": "A new reference was added",
@@ -382,7 +381,6 @@
   "comment_only_upgrade_for_track_changes": "Comment only. Upgrade for track changes.",
   "comment_only_upgrade_to_enable_track_changes": "Comment only. <0>Upgrade</0> to enable track changes.",
   "common": "Common",
-  "common_causes_of_compile_timeouts_include": "Common causes of compile timeouts include",
   "commons_plan_tooltip": "You’re on the __plan__ plan because of your affiliation with __institution__. Click to find out how to make the most of your Overleaf premium features.",
   "community_articles": "Community articles",
   "community_articles_lowercase": "community articles",
@@ -703,7 +701,6 @@
   "enable_managed_users": "Enable Managed Users",
   "enable_single_sign_on": "Enable single sign-on",
   "enable_sso": "Enable SSO",
-  "enable_stop_on_first_error_under_recompile_dropdown_menu": "Enable <0>“Stop on first error”</0> under the <1>Recompile</1> drop-down menu to help you find and fix errors right away.",
   "enabled": "Enabled",
   "enables_real_time_syntax_checking_in_the_editor": "Enables real-time syntax checking in the editor",
   "enabling": "Enabling",
@@ -1827,7 +1824,6 @@
   "ready_to_use_templates": "Ready-to-use templates",
   "real_time_track_changes": "Real-time track-changes",
   "realtime_track_changes": "Real-time track changes",
-  "reasons_for_compile_timeouts": "Reasons for compile timeouts",
   "reauthorize_github_account": "Reauthorize your GitHub Account",
   "recaptcha_conditions": "The site is protected by reCAPTCHA and the Google <1>Privacy Policy</1> and <2>Terms of Service</2> apply.",
   "recent": "Recent",