mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-15 06:33:55 +01: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',
|
'editor-redesign-new-users',
|
||||||
'writefull-frontend-migration',
|
'writefull-frontend-migration',
|
||||||
'chat-edit-delete',
|
'chat-edit-delete',
|
||||||
|
'compile-timeout-remove-info',
|
||||||
].filter(Boolean)
|
].filter(Boolean)
|
||||||
|
|
||||||
const getUserValues = async userId =>
|
const getUserValues = async userId =>
|
||||||
|
|||||||
+9
-4
@@ -12,12 +12,15 @@ import {
|
|||||||
isNewUser,
|
isNewUser,
|
||||||
useIsNewEditorEnabled,
|
useIsNewEditorEnabled,
|
||||||
} from '@/features/ide-redesign/utils/new-editor-utils'
|
} from '@/features/ide-redesign/utils/new-editor-utils'
|
||||||
import { getSplitTestVariant } from '@/utils/splitTestUtils'
|
import { getSplitTestVariant, isSplitTestEnabled } from '@/utils/splitTestUtils'
|
||||||
|
|
||||||
export const ShortCompileTimeoutErrorState = () => {
|
export const ShortCompileTimeoutErrorState = () => {
|
||||||
const { t } = useTranslation()
|
const { t } = useTranslation()
|
||||||
const { isProjectOwner } = useCompileContext()
|
const { isProjectOwner } = useCompileContext()
|
||||||
const newEditor = useIsNewEditorEnabled()
|
const newEditor = useIsNewEditorEnabled()
|
||||||
|
const shouldHideCompileTimeoutInfo = isSplitTestEnabled(
|
||||||
|
'compile-timeout-remove-info'
|
||||||
|
)
|
||||||
|
|
||||||
const { compileTimeout } = getMeta('ol-compileSettings')
|
const { compileTimeout } = getMeta('ol-compileSettings')
|
||||||
const segmentation = useMemo(
|
const segmentation = useMemo(
|
||||||
@@ -79,9 +82,11 @@ export const ShortCompileTimeoutErrorState = () => {
|
|||||||
}
|
}
|
||||||
iconType="running_with_errors"
|
iconType="running_with_errors"
|
||||||
extraContent={
|
extraContent={
|
||||||
<div className="pdf-error-state-info-box">
|
!shouldHideCompileTimeoutInfo && (
|
||||||
<ReasonsForTimeoutInfo />
|
<div className="pdf-error-state-info-box">
|
||||||
</div>
|
<ReasonsForTimeoutInfo />
|
||||||
|
</div>
|
||||||
|
)
|
||||||
}
|
}
|
||||||
actions={
|
actions={
|
||||||
isProjectOwner && (
|
isProjectOwner && (
|
||||||
|
|||||||
+13
-7
@@ -13,7 +13,7 @@ import {
|
|||||||
useIsNewEditorEnabled,
|
useIsNewEditorEnabled,
|
||||||
useIsNewErrorLogsPositionEnabled,
|
useIsNewErrorLogsPositionEnabled,
|
||||||
} from '@/features/ide-redesign/utils/new-editor-utils'
|
} from '@/features/ide-redesign/utils/new-editor-utils'
|
||||||
import { getSplitTestVariant } from '@/utils/splitTestUtils'
|
import { getSplitTestVariant, isSplitTestEnabled } from '@/utils/splitTestUtils'
|
||||||
|
|
||||||
function TimeoutUpgradePromptNew() {
|
function TimeoutUpgradePromptNew() {
|
||||||
const {
|
const {
|
||||||
@@ -23,6 +23,9 @@ function TimeoutUpgradePromptNew() {
|
|||||||
isProjectOwner,
|
isProjectOwner,
|
||||||
} = useDetachCompileContext()
|
} = useDetachCompileContext()
|
||||||
const newEditor = useIsNewEditorEnabled()
|
const newEditor = useIsNewEditorEnabled()
|
||||||
|
const shouldHideCompileTimeoutInfo = isSplitTestEnabled(
|
||||||
|
'compile-timeout-remove-info'
|
||||||
|
)
|
||||||
|
|
||||||
const { enableStopOnFirstError } = useStopOnFirstError({
|
const { enableStopOnFirstError } = useStopOnFirstError({
|
||||||
eventSource: 'timeout-new',
|
eventSource: 'timeout-new',
|
||||||
@@ -55,12 +58,15 @@ function TimeoutUpgradePromptNew() {
|
|||||||
isProjectOwner={isProjectOwner}
|
isProjectOwner={isProjectOwner}
|
||||||
segmentation={sharedSegmentation}
|
segmentation={sharedSegmentation}
|
||||||
/>
|
/>
|
||||||
{getMeta('ol-ExposedSettings').enableSubscriptions && (
|
{getMeta('ol-ExposedSettings').enableSubscriptions &&
|
||||||
<PreventTimeoutHelpMessage
|
!shouldHideCompileTimeoutInfo && (
|
||||||
handleEnableStopOnFirstErrorClick={handleEnableStopOnFirstErrorClick}
|
<PreventTimeoutHelpMessage
|
||||||
lastCompileOptions={lastCompileOptions}
|
handleEnableStopOnFirstErrorClick={
|
||||||
/>
|
handleEnableStopOnFirstErrorClick
|
||||||
)}
|
}
|
||||||
|
lastCompileOptions={lastCompileOptions}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</>
|
</>
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user