mirror of
https://github.com/yu-i-i/overleaf-cep.git
synced 2026-11-14 14:13:43 +01:00
Merge pull request #35393 from overleaf/ds-adding-paused-banner
[WEB] Add "Editing Paused" banner when we lock the editor due to network stall GitOrigin-RevId: 6e8d984f03afb6a29ed900cd342a8a8a655e20d0
This commit is contained in:
committed by
Copybot
parent
6f06df61a6
commit
e562fc97f1
@@ -35,6 +35,7 @@ import { useDebugDiffTracker } from '../hooks/use-debug-diff-tracker'
|
||||
import { convertFileRefToBinaryFile } from '@/features/ide-react/util/file-view'
|
||||
import { useEditorOpenDocContext } from '@/features/ide-react/context/editor-open-doc-context'
|
||||
import { useEditorPropertiesContext } from '@/features/ide-react/context/editor-properties-context'
|
||||
import { useFeatureFlag } from '@/shared/context/split-test-context'
|
||||
|
||||
export interface GotoOffsetOptions {
|
||||
gotoOffset: number
|
||||
@@ -118,6 +119,9 @@ export const EditorManagerProvider: FC<React.PropsWithChildren> = ({
|
||||
projectId,
|
||||
currentDocument
|
||||
)
|
||||
const improvedFlakyConnections = useFeatureFlag(
|
||||
'intermittent-connection-improvements'
|
||||
)
|
||||
|
||||
const [globalEditorWatchdogManager] = useState(
|
||||
() =>
|
||||
@@ -573,7 +577,9 @@ export const EditorManagerProvider: FC<React.PropsWithChildren> = ({
|
||||
// Ensure that the editor is locked
|
||||
setOutOfSync(true)
|
||||
// Display the "out of sync" modal
|
||||
showOutOfSyncModal(editorContent || '')
|
||||
if (!improvedFlakyConnections) {
|
||||
showOutOfSyncModal(editorContent || '')
|
||||
}
|
||||
|
||||
// Do not forceReopen the document.
|
||||
return
|
||||
@@ -601,6 +607,7 @@ export const EditorManagerProvider: FC<React.PropsWithChildren> = ({
|
||||
showOutOfSyncModal,
|
||||
setOutOfSync,
|
||||
t,
|
||||
improvedFlakyConnections,
|
||||
])
|
||||
|
||||
useEventListener(
|
||||
|
||||
Reference in New Issue
Block a user