diff --git a/apps/remix-ide/webpack.config.js b/apps/remix-ide/webpack.config.js index d5109340fb..48d2c4eda1 100644 --- a/apps/remix-ide/webpack.config.js +++ b/apps/remix-ide/webpack.config.js @@ -77,11 +77,13 @@ module.exports = composePlugins(withNx(), withReact(), (config) => { solc: 'solc' } - // set alias + // uncomment this to enable react profiling + /* config.resolve.alias = { ...config.resolve.alias, 'react-dom$': 'react-dom/profiling', } + */ // add public path diff --git a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx index 8c42e9cb71..7d54e76a4e 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-explorer.tsx @@ -13,6 +13,7 @@ import { ROOT_PATH } from '../utils/constants' import { fileKeySort } from '../utils' import { moveFileIsAllowed, moveFolderIsAllowed } from '../actions' import { RecursiveTree } from './file-recursive-tree' +import { FlatTree } from './flat-tree' export const FileExplorer = (props: FileExplorerProps) => { const intl = useIntl() @@ -37,12 +38,15 @@ export const FileExplorer = (props: FileExplorerProps) => { const treeRef = useRef(null) const [childrenKeys, setChildrenKeys] = useState([]) + useEffect(() => { if (contextMenuItems) { addMenuItems(contextMenuItems) } }, [contextMenuItems]) + + useEffect(() => { if (removedContextMenuItems) { removeMenuItems(removedContextMenuItems) @@ -390,9 +394,14 @@ export const FileExplorer = (props: FileExplorerProps) => { } + return ( -
+
  • {
    {
  • +
    -
    - -
    +
    - +
    +
    @@ -436,3 +449,14 @@ export const FileExplorer = (props: FileExplorerProps) => { } export default FileExplorer + +/* + + */ diff --git a/libs/remix-ui/workspace/src/lib/components/file-recursive-tree-item.tsx b/libs/remix-ui/workspace/src/lib/components/file-recursive-tree-item.tsx index 1cc0165f7c..f2f5082c55 100644 --- a/libs/remix-ui/workspace/src/lib/components/file-recursive-tree-item.tsx +++ b/libs/remix-ui/workspace/src/lib/components/file-recursive-tree-item.tsx @@ -44,8 +44,8 @@ export const RecursiveTreeItem = (props: RecursiveTreeItemProps) => { >
    {focusEdit && file.path && focusEdit.element === file.path ? - : - {file.name}} + : + {file.name}}