Merge pull request #15592 from overleaf/td-ide-page-more-modals

React IDE page: add out-of-sync modal and project deleted modal

GitOrigin-RevId: 6081a40c3009e8ebc5b3f9752c4059af3d52966d
This commit is contained in:
Tim Down
2023-11-07 09:04:44 +00:00
committed by Copybot
parent ecf7befe88
commit c3afce73c1
13 changed files with 257 additions and 25 deletions
@@ -115,7 +115,8 @@ export const EditorManagerProvider: FC = ({ children }) => {
const { reportError, eventEmitter, eventLog } = useIdeReactContext()
const { socket, disconnect } = useConnectionContext()
const { view, setView } = useLayoutContext()
const { showGenericMessageModal, genericModalVisible } = useModalsContext()
const { showGenericMessageModal, genericModalVisible, showOutOfSyncModal } =
useModalsContext()
const [showSymbolPalette, setShowSymbolPalette] = useScopeValue<boolean>(
'editor.showSymbolPalette'
@@ -550,13 +551,7 @@ export const EditorManagerProvider: FC = ({ children }) => {
// Tell the user about the error state.
setIsInErrorState(true)
// TODO: MIGRATION: Show out-of-sync modal
// this.ide.showOutOfSyncModal(
// 'Out of sync',
// "Sorry, this file has gone out of sync and we need to do a full refresh. <br> <a target='_blank' rel='noopener noreferrer' href='/learn/Kb/Editor_out_of_sync_problems'>Please see this help guide for more information</a>",
// editorContent
// )
showOutOfSyncModal(editorContent || '')
// Do not forceReopen the document.
return
@@ -581,6 +576,7 @@ export const EditorManagerProvider: FC = ({ children }) => {
reportError,
setIsInErrorState,
showGenericMessageModal,
showOutOfSyncModal,
t,
])