From e89954e3e32d6c0a6753675b1ecf07dfc1ca6713 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 19 Jun 2024 15:00:22 +0200 Subject: [PATCH 1/6] increase timeout --- apps/remix-ide/src/remixEngine.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/remixEngine.js b/apps/remix-ide/src/remixEngine.js index baaf75deda..479beac7ad 100644 --- a/apps/remix-ide/src/remixEngine.js +++ b/apps/remix-ide/src/remixEngine.js @@ -10,7 +10,7 @@ export class RemixEngine extends Engine { setPluginOption ({ name, kind }) { if (kind === 'provider') return { queueTimeout: 60000 * 2 } if (name === 'LearnEth') return { queueTimeout: 60000 } - if (name === 'dGitProvider') return { queueTimeout: 60000 * 4 } + if (name === 'dGitProvider') return { queueTimeout: 60000 * 30 } if (name === 'slither') return { queueTimeout: 60000 * 4 } // Requires when a solc version is installed if (name === 'hardhat') return { queueTimeout: 60000 * 4 } if (name === 'truffle') return { queueTimeout: 60000 * 4 } From fa810dab66b0cd61406dcdfa581ff954213e4f11 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 19 Jun 2024 15:00:40 +0200 Subject: [PATCH 2/6] fix typo --- apps/remix-ide/src/app/files/fileManager.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/files/fileManager.ts b/apps/remix-ide/src/app/files/fileManager.ts index b2d0117246..bf0564d814 100644 --- a/apps/remix-ide/src/app/files/fileManager.ts +++ b/apps/remix-ide/src/app/files/fileManager.ts @@ -24,7 +24,7 @@ const profile = { methods: ['closeAllFiles', 'closeFile', 'file', 'exists', 'open', 'writeFile', 'writeMultipleFiles', 'writeFileNoRewrite', 'readFile', 'copyFile', 'copyDir', 'rename', 'mkdir', 'readdir', 'dirList', 'fileList', 'remove', 'getCurrentFile', 'getFile', 'getFolder', 'setFile', 'switchFile', 'refresh', 'getProviderOf', 'getProviderByName', 'getPathFromUrl', 'getUrlFromPath', - 'saveCurrentFile', 'setBatchFiles', 'isGitRepo', 'isFile', 'isDirectory', 'hasGitSubmodule', 'copyFolderToJson' + 'saveCurrentFile', 'setBatchFiles', 'isGitRepo', 'isFile', 'isDirectory', 'hasGitSubmodules', 'copyFolderToJson' ], kind: 'file-system' } From 9dee56776f1f42df4a3b00aa198d8b5a1f6eafe1 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 19 Jun 2024 15:00:59 +0200 Subject: [PATCH 3/6] fix params & label & warn submodule --- apps/remix-ide/src/app/files/dgitProvider.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/files/dgitProvider.ts b/apps/remix-ide/src/app/files/dgitProvider.ts index 10d2c76c7a..10154c1e5b 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.ts +++ b/apps/remix-ide/src/app/files/dgitProvider.ts @@ -436,7 +436,7 @@ class DGitProvider extends Plugin { const permission = await this.askUserPermission('clone', 'Import multiple files into your workspaces.') if (!permission) return false if (parseFloat(this.calculateLocalStorage()) > 10000) throw new Error('The local storage of the browser is full.') - if (!workspaceExists) await this.call('filePanel', 'createWorkspace', workspaceName || `workspace_${Date.now()}`, true) + if (!workspaceExists) await this.call('filePanel', 'createWorkspace', workspaceName || `workspace_${Date.now()}`, '', true) const cmd = { url: input.url, singleBranch: input.singleBranch, @@ -445,7 +445,7 @@ class DGitProvider extends Plugin { ...await this.parseInput(input), ...await this.getGitConfig() } - this.call('terminal', 'logHtml', `Cloning ${input.url}...`) + this.call('terminal', 'logHtml', `Cloning ${input.url}... please wait...`) const result = await git.clone(cmd) if (!workspaceExists) { setTimeout(async () => { @@ -453,6 +453,9 @@ class DGitProvider extends Plugin { }, 1000) } this.emit('clone') + this.call('fileManager', 'hasGitSubmodules').then((submodules) => { + if (submodules) this.call('terminal', 'log', { type: 'warn', value: 'This repository has submodules. Please update submodules to pull all the dependencies.'}) + }) return result } } From 21b79c931aafbba7ac02877bd8ca911d80501ca8 Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 19 Jun 2024 23:31:43 +0200 Subject: [PATCH 4/6] update text color --- apps/remix-ide/src/app/files/dgitProvider.ts | 5 ++++- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 8 +++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/apps/remix-ide/src/app/files/dgitProvider.ts b/apps/remix-ide/src/app/files/dgitProvider.ts index 10154c1e5b..3245820f21 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.ts +++ b/apps/remix-ide/src/app/files/dgitProvider.ts @@ -454,7 +454,10 @@ class DGitProvider extends Plugin { } this.emit('clone') this.call('fileManager', 'hasGitSubmodules').then((submodules) => { - if (submodules) this.call('terminal', 'log', { type: 'warn', value: 'This repository has submodules. Please update submodules to pull all the dependencies.'}) + if (submodules) { + this.call('terminal', 'log', { type: 'warn', value: 'This repository has submodules. Please update submodules to pull all the dependencies.'}) + this.emit('repositoryWithSubmodulesCloned') + } }) return result } diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index 2368fc6a83..baa44e9f0b 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -30,6 +30,7 @@ export function Workspace() { const [showDropdown, setShowDropdown] = useState(false) const [showIconsMenu, hideIconsMenu] = useState(false) const [showBranches, setShowBranches] = useState(false) + const [highlightUpdateSubmodules, setHighlightUpdateSubmodules] = useState(false) const [branchFilter, setBranchFilter] = useState('') const displayOzCustomRef = useRef() const mintableCheckboxRef = useRef() @@ -123,6 +124,10 @@ export function Workspace() { cloneGitRepository() } } + + global.plugin.on('dGitProvider', 'repositoryWithSubmodulesCloned', () => { + setHighlightUpdateSubmodules(true) + }) }, []) useEffect(() => { @@ -677,6 +682,7 @@ export function Workspace() { const updateSubModules = async () => { try { + setHighlightUpdateSubmodules(false) await global.dispatchUpdateGitSubmodules() } catch (e) { console.error(e) @@ -1208,7 +1214,7 @@ export function Workspace() { {selectedWorkspace.hasGitSubmodules?
{global.fs.browser.isRequestingCloning ?
updating submodules
: -
update submodules
} +
update submodules
}
: null}
From 9485494596997398181baa388a736e9cdf1d8b2b Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 20 Jun 2024 10:38:25 +0200 Subject: [PATCH 5/6] linting --- apps/remix-ide/src/app/files/dgitProvider.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apps/remix-ide/src/app/files/dgitProvider.ts b/apps/remix-ide/src/app/files/dgitProvider.ts index 3245820f21..c2928320e1 100644 --- a/apps/remix-ide/src/app/files/dgitProvider.ts +++ b/apps/remix-ide/src/app/files/dgitProvider.ts @@ -455,7 +455,7 @@ class DGitProvider extends Plugin { this.emit('clone') this.call('fileManager', 'hasGitSubmodules').then((submodules) => { if (submodules) { - this.call('terminal', 'log', { type: 'warn', value: 'This repository has submodules. Please update submodules to pull all the dependencies.'}) + this.call('terminal', 'log', { type: 'warn', value: 'This repository has submodules. Please update submodules to pull all the dependencies.' }) this.emit('repositoryWithSubmodulesCloned') } }) From a898dd8e767b4c942bc3c35234cd307e4996b5c0 Mon Sep 17 00:00:00 2001 From: ioedeveloper Date: Tue, 25 Jun 2024 17:04:40 +0100 Subject: [PATCH 6/6] Increase width --- libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx index baa44e9f0b..55f44d1763 100644 --- a/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx +++ b/libs/remix-ui/workspace/src/lib/remix-ui-workspace.tsx @@ -1210,11 +1210,11 @@ export function Workspace() { {selectedWorkspace && (
-
GIT
+
GIT
{selectedWorkspace.hasGitSubmodules?
- {global.fs.browser.isRequestingCloning ?
updating submodules
: -
update submodules
} + {global.fs.browser.isRequestingCloning ?
updating submodules
: +
update submodules
}
: null}