diff --git a/services/web/app/views/project/editor/file-tree-history-react.pug b/services/web/app/views/project/editor/file-tree-history-react.pug index 02dfe6ea25..234d8f1622 100644 --- a/services/web/app/views/project/editor/file-tree-history-react.pug +++ b/services/web/app/views/project/editor/file-tree-history-react.pug @@ -1,12 +1,3 @@ -aside.editor-sidebar.full-size#history-file-tree( - ng-controller="ReactFileTreeController" +aside.editor-sidebar.full-size.file-tree#history-file-tree( ng-show="history.isReact && ui.view == 'history'" ) - .history-file-tree-inner.file-tree - history-file-tree-react( - on-select="onSelect" - ref-providers="refProviders" - reindex-references="reindexReferences" - set-ref-provider-enabled="setRefProviderEnabled" - set-started-free-trial="setStartedFreeTrial" - ) diff --git a/services/web/frontend/js/features/history/components/diff-view/main.tsx b/services/web/frontend/js/features/history/components/diff-view/main.tsx index 52248eae3e..a0c8599d78 100644 --- a/services/web/frontend/js/features/history/components/diff-view/main.tsx +++ b/services/web/frontend/js/features/history/components/diff-view/main.tsx @@ -2,7 +2,7 @@ import { useHistoryContext } from '../../context/history-context' import { diffDoc } from '../../services/api' import { useEffect } from 'react' import { DocDiffResponse, Highlight } from '../../services/types/doc' -import { highlightsFromDiffResponse } from '../../util/highlights-from-diff-response' +import { highlightsFromDiffResponse } from '../../utils/highlights-from-diff-response' import DocumentDiffViewer from './document-diff-viewer' import useAsync from '../../../../shared/hooks/use-async' import { useTranslation } from 'react-i18next' diff --git a/services/web/frontend/js/features/history/components/history-root.tsx b/services/web/frontend/js/features/history/components/history-root.tsx index 09484c9dc5..f0ba4c5a1d 100644 --- a/services/web/frontend/js/features/history/components/history-root.tsx +++ b/services/web/frontend/js/features/history/components/history-root.tsx @@ -1,9 +1,14 @@ import ChangeList from './change-list/change-list' import DiffView from './diff-view/diff-view' import { useLayoutContext } from '../../../shared/context/layout-context' -import { useHistoryContext } from '../context/history-context' +import { HistoryProvider, useHistoryContext } from '../context/history-context' +import { createPortal } from 'react-dom' +import HistoryFileTree from './history-file-tree' +import getMeta from '../../../utils/meta' -export default function HistoryRoot() { +const fileTreeContainer = document.getElementById('history-file-tree') + +function Main() { const { view } = useLayoutContext() const { updates } = useHistoryContext() @@ -12,9 +17,37 @@ export default function HistoryRoot() { } return ( -