diff --git a/services/web/frontend/extracted-translations.json b/services/web/frontend/extracted-translations.json index 8cbc1839e7..0d3d4d1d52 100644 --- a/services/web/frontend/extracted-translations.json +++ b/services/web/frontend/extracted-translations.json @@ -295,8 +295,6 @@ "compile_error_entry_description": "", "compile_error_handling": "", "compile_larger_projects": "", - "compile_limit_reached": "", - "compile_limit_upgrade_prompt": "", "compile_mode": "", "compile_terminated_by_user": "", "compiler": "", @@ -906,7 +904,6 @@ "labels_help_you_to_reference_your_tables": "", "language": "", "language_suggestions": "", - "large_or_high-resolution_images_taking_too_long": "", "last_active": "", "last_active_description": "", "last_edit": "", @@ -931,7 +928,6 @@ "learn_more_about_email_reconfirmation": "", "learn_more_about_link_sharing": "", "learn_more_about_managed_users": "", - "learn_more_about_other_causes_of_compile_timeouts": "", "leave": "", "leave_any_group_subscriptions": "", "leave_group": "", @@ -1331,7 +1327,6 @@ "project_search_result_count": "", "project_search_result_count_plural": "", "project_synchronisation": "", - "project_timed_out_common_causes": "", "project_timed_out_enable_stop_on_first_error": "", "project_timed_out_fatal_error": "", "project_timed_out_intro": "", diff --git a/services/web/frontend/js/features/ide-redesign/components/pdf-preview/pdf-error-state/compile-timeout-error-state.tsx b/services/web/frontend/js/features/ide-redesign/components/pdf-preview/pdf-error-state/compile-timeout-error-state.tsx index 5269e0fbb8..8a21187145 100644 --- a/services/web/frontend/js/features/ide-redesign/components/pdf-preview/pdf-error-state/compile-timeout-error-state.tsx +++ b/services/web/frontend/js/features/ide-redesign/components/pdf-preview/pdf-error-state/compile-timeout-error-state.tsx @@ -2,27 +2,97 @@ import OLButton from '@/shared/components/ol/ol-button' import MaterialIcon from '@/shared/components/material-icon' import { Trans, useTranslation } from 'react-i18next' import { useDetachCompileContext as useCompileContext } from '@/shared/context/detach-compile-context' -import { upgradePlan } from '@/main/account-upgrade' import { useStopOnFirstError } from '@/shared/hooks/use-stop-on-first-error' -import { useCallback } from 'react' +import { useCallback, useMemo } from 'react' import ErrorState from './error-state' +import StartFreeTrialButton from '@/shared/components/start-free-trial-button' +import getMeta from '@/utils/meta' +import { sendMB } from '@/infrastructure/event-tracking' export const ShortCompileTimeoutErrorState = () => { const { t } = useTranslation() + const { isProjectOwner } = useCompileContext() + + const { compileTimeout } = getMeta('ol-compileSettings') + const segmentation = useMemo( + () => ({ + 'is-owner': isProjectOwner, + compileTime: compileTimeout, + }), + [isProjectOwner, compileTimeout] + ) + + const sendInfoClickEvent = useCallback(() => { + sendMB('paywall-info-click', { + ...segmentation, + 'paywall-type': 'compile-timeout', + content: 'blog', + }) + }, [segmentation]) return ( +

+ {isProjectOwner + ? t('your_project_exceeded_compile_timeout_limit_on_free_plan') + : t('this_project_exceeded_compile_timeout_limit_on_free_plan')} +

+ {isProjectOwner ? ( +

+ {t('upgrade_for_more_compile_time')}{' '} + {t( + 'plus_additional_collaborators_document_history_track_changes_and_more' + )} +

+ ) : ( + , + ]} + /> + )} + + } iconType="running_with_errors" + extraContent={ +
+

+ + , + ]} + /> + +

+ +
+ } actions={ - upgradePlan('compile-timeout')} - > - {t('upgrade')} - + isProjectOwner && ( + + {t('start_a_free_trial')} + + ) } /> ) @@ -31,6 +101,23 @@ export const ShortCompileTimeoutErrorState = () => { export const LongCompileTimeoutErrorState = () => { const { t } = useTranslation() + return ( + + + + } + /> + ) +} + +const ReasonsForTimeoutInfo = () => { + const { t } = useTranslation() + const { enableStopOnFirstError } = useStopOnFirstError({ eventSource: 'timeout', }) @@ -44,65 +131,65 @@ export const LongCompileTimeoutErrorState = () => { }, [enableStopOnFirstError, startCompile, setAnimateCompileDropdownArrow]) return ( - -
- - {t('project_timed_out_common_causes')} -
-
-
    -
  • + <> +
    + + {t('common_causes_of_compile_timeouts_include')}: +
    +
    +
      +
    • + , + ]} + /> +
    • +
    • + , + ]} + /> + {!lastCompileOptions.stopOnFirstError && ( + <> + {' '} , + // eslint-disable-next-line react/jsx-key + , + // eslint-disable-next-line react/jsx-key + , ]} /> -
    • -
    • - , - ]} - /> - {!lastCompileOptions.stopOnFirstError && ( - <> - {' '} - , - ]} - /> - - )} -
    • -
    -

    - , - ]} - /> -

    -
    -
- } - /> + + )} + + +

+ , + ]} + /> +

+ + ) } 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 bf58d6ad12..7247534c1d 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 @@ -162,7 +162,7 @@ const PreventTimeoutHelpMessage = memo(function PreventTimeoutHelpMessage({
  • optimize them.", "last_active": "Last Active", "last_active_description": "Last time a project was opened.", "last_edit": "Last edit", @@ -1212,7 +1209,6 @@ "learn_more_about_emails": "<0>Learn more about managing your __appName__ emails.", "learn_more_about_link_sharing": "Learn more about Link Sharing", "learn_more_about_managed_users": "Learn more about Managed Users.", - "learn_more_about_other_causes_of_compile_timeouts": "<0>Learn more about other causes of compile timeouts and how to fix them.", "leave": "Leave", "leave_any_group_subscriptions": "Leave any group subscriptions other than the one that will be managing your account. <0>Leave them from the Subscription page.", "leave_group": "Leave group", @@ -1747,7 +1743,6 @@ "project_search_result_count": "__count__ result", "project_search_result_count_plural": "__count__ results", "project_synchronisation": "Project synchronisation", - "project_timed_out_common_causes": "Most common causes of timeouts are:", "project_timed_out_enable_stop_on_first_error": "<0>Enable “Stop on first error” to help you find and fix errors right away.", "project_timed_out_fatal_error": "A <0>fatal compile error may be completely blocking compilation.", "project_timed_out_intro": "Sorry, your compile took too long to run and timed out. The most common causes of timeouts are:",