mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-05-23 17:19:37 +02:00
Merge pull request #29289 from overleaf/rh-compile-timeout-remove-info
Support compile-timeout-remove-info split test in paywalls GitOrigin-RevId: d557417ab0bd63fce82f4ffb5d66e8e1c9b0b039
This commit is contained in:
@@ -405,6 +405,7 @@ const _ProjectController = {
|
||||
'editor-redesign-new-users',
|
||||
'writefull-frontend-migration',
|
||||
'chat-edit-delete',
|
||||
'compile-timeout-remove-info',
|
||||
].filter(Boolean)
|
||||
|
||||
const getUserValues = async userId =>
|
||||
|
||||
@@ -12,12 +12,15 @@ import {
|
||||
isNewUser,
|
||||
useIsNewEditorEnabled,
|
||||
} from '@/features/ide-redesign/utils/new-editor-utils'
|
||||
import { getSplitTestVariant } from '@/utils/splitTestUtils'
|
||||
import { getSplitTestVariant, isSplitTestEnabled } from '@/utils/splitTestUtils'
|
||||
|
||||
export const ShortCompileTimeoutErrorState = () => {
|
||||
const { t } = useTranslation()
|
||||
const { isProjectOwner } = useCompileContext()
|
||||
const newEditor = useIsNewEditorEnabled()
|
||||
const shouldHideCompileTimeoutInfo = isSplitTestEnabled(
|
||||
'compile-timeout-remove-info'
|
||||
)
|
||||
|
||||
const { compileTimeout } = getMeta('ol-compileSettings')
|
||||
const segmentation = useMemo(
|
||||
@@ -79,9 +82,11 @@ export const ShortCompileTimeoutErrorState = () => {
|
||||
}
|
||||
iconType="running_with_errors"
|
||||
extraContent={
|
||||
<div className="pdf-error-state-info-box">
|
||||
<ReasonsForTimeoutInfo />
|
||||
</div>
|
||||
!shouldHideCompileTimeoutInfo && (
|
||||
<div className="pdf-error-state-info-box">
|
||||
<ReasonsForTimeoutInfo />
|
||||
</div>
|
||||
)
|
||||
}
|
||||
actions={
|
||||
isProjectOwner && (
|
||||
|
||||
@@ -13,7 +13,7 @@ import {
|
||||
useIsNewEditorEnabled,
|
||||
useIsNewErrorLogsPositionEnabled,
|
||||
} from '@/features/ide-redesign/utils/new-editor-utils'
|
||||
import { getSplitTestVariant } from '@/utils/splitTestUtils'
|
||||
import { getSplitTestVariant, isSplitTestEnabled } from '@/utils/splitTestUtils'
|
||||
|
||||
function TimeoutUpgradePromptNew() {
|
||||
const {
|
||||
@@ -23,6 +23,9 @@ function TimeoutUpgradePromptNew() {
|
||||
isProjectOwner,
|
||||
} = useDetachCompileContext()
|
||||
const newEditor = useIsNewEditorEnabled()
|
||||
const shouldHideCompileTimeoutInfo = isSplitTestEnabled(
|
||||
'compile-timeout-remove-info'
|
||||
)
|
||||
|
||||
const { enableStopOnFirstError } = useStopOnFirstError({
|
||||
eventSource: 'timeout-new',
|
||||
@@ -55,12 +58,15 @@ function TimeoutUpgradePromptNew() {
|
||||
isProjectOwner={isProjectOwner}
|
||||
segmentation={sharedSegmentation}
|
||||
/>
|
||||
{getMeta('ol-ExposedSettings').enableSubscriptions && (
|
||||
<PreventTimeoutHelpMessage
|
||||
handleEnableStopOnFirstErrorClick={handleEnableStopOnFirstErrorClick}
|
||||
lastCompileOptions={lastCompileOptions}
|
||||
/>
|
||||
)}
|
||||
{getMeta('ol-ExposedSettings').enableSubscriptions &&
|
||||
!shouldHideCompileTimeoutInfo && (
|
||||
<PreventTimeoutHelpMessage
|
||||
handleEnableStopOnFirstErrorClick={
|
||||
handleEnableStopOnFirstErrorClick
|
||||
}
|
||||
lastCompileOptions={lastCompileOptions}
|
||||
/>
|
||||
)}
|
||||
</>
|
||||
)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user