From 7823d732b039f8e51d26147d8723fb0c5ffbf6c0 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 9 May 2019 09:45:14 +0200 Subject: [PATCH 1/7] Update compile-tab.js --- src/app/tabs/compile-tab.js | 2 -- 1 file changed, 2 deletions(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 3677852430..4e3fe81b18 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -80,7 +80,6 @@ class CompileTab extends CompilerApi { this.events.emit('statusChanged', {key: 'edited', title: 'the content has changed, needs recompilation', type: 'info'}) } this.editor.event.register('contentChanged', onContentChanged) - this.editor.event.register('sessionSwitched', onContentChanged) this.compiler.event.register('loadingCompiler', () => { this.events.emit('statusChanged', {key: 'loading', title: 'loading compiler...', type: 'info'}) @@ -100,7 +99,6 @@ class CompileTab extends CompilerApi { this.fileManager.events.on('currentFileChanged', (name) => { this.compilerContainer.currentFile = name cleanupErrors() - onContentChanged() }) this.fileManager.events.on('noFileSelected', () => { From fab762ccce513a318be0f0f651ec3627f227233f Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 9 May 2019 10:22:18 +0200 Subject: [PATCH 2/7] don't init test tab when file changed --- src/app/tabs/test-tab.js | 5 ----- 1 file changed, 5 deletions(-) diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index 2b3bf72dad..7ef80ea626 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -56,11 +56,6 @@ module.exports = class TestTab extends BaseApi { yo.update(this.testList, yo`
${testsMessage}
`) if (!this.testsOutput || !this.testsSummary) return - - this.testsOutput.hidden = true - this.testsSummary.hidden = true - this.testsOutput.innerHTML = '' - this.testsSummary.innerHTML = '' }) }) } From aba1bc3825444a03da1ff58a3185e23b8cfeef02 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 9 May 2019 10:23:21 +0200 Subject: [PATCH 3/7] don't init run tab if file changed --- src/app/tabs/runTab/contractDropdown.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/tabs/runTab/contractDropdown.js b/src/app/tabs/runTab/contractDropdown.js index 58e708e963..f32a7bad35 100644 --- a/src/app/tabs/runTab/contractDropdown.js +++ b/src/app/tabs/runTab/contractDropdown.js @@ -76,7 +76,6 @@ class ContractDropdownUI { if (!document.querySelector(`.${css.contractNames}`)) return document.querySelector(`.${css.contractNames}`).classList.remove(css.contractNamesError) var contractNames = document.querySelector(`.${css.contractNames.classNames[0]}`) - contractNames.innerHTML = '' if (/.(.abi)$/.exec(currentFile)) { this.createPanel.style.display = 'none' this.orLabel.style.display = 'none' From 29c76ef515504c8bdf4e65f7d1199c4777f9f0e5 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 9 May 2019 10:24:01 +0200 Subject: [PATCH 4/7] not removing warning / error from compile tab upon file changed --- src/app/tabs/compile-tab.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 4e3fe81b18..a6acd5250a 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -98,19 +98,12 @@ class CompileTab extends CompilerApi { this.fileManager.events.on('currentFileChanged', (name) => { this.compilerContainer.currentFile = name - cleanupErrors() }) this.fileManager.events.on('noFileSelected', () => { this.compilerContainer.currentFile = '' - cleanupErrors() }) - const cleanupErrors = () => { - this._view.errorContainer.innerHTML = '' - this.events.emit('statusChanged', {key: 'none'}) - } - this.compiler.event.register('compilationFinished', (success, data, source) => { if (success) { // forwarding the event to the appManager infra From 749438cb80a78deb4362848c827ac370b7e6aae4 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 9 May 2019 10:24:44 +0200 Subject: [PATCH 5/7] display current file name for compilation result --- src/app/tabs/compile-tab.js | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index a6acd5250a..eaa102d9c3 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -131,7 +131,7 @@ class CompileTab extends CompilerApi { // Update contract Selection let contractMap = {} if (success) this.compiler.visitContracts((contract) => { contractMap[contract.name] = contract }) - let contractSelection = this.contractSelection(Object.keys(contractMap) || []) + let contractSelection = this.contractSelection(Object.keys(contractMap) || [], source.target) yo.update(this._view.contractSelection, contractSelection) if (data['error']) { @@ -180,18 +180,20 @@ class CompileTab extends CompilerApi { * Section to select the compiled contract * @param {string[]} contractList Names of the compiled contracts */ - contractSelection (contractList = []) { + contractSelection (contractList = [], sourceFile) { return contractList.length !== 0 ? yo`
- + + +
From 1256d13869af4c65e90c6ad1d96ee0e2941cba9f Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 9 May 2019 10:38:44 +0200 Subject: [PATCH 7/7] add padding to the filter input in terminal --- src/app/panels/styles/terminal-styles.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/app/panels/styles/terminal-styles.js b/src/app/panels/styles/terminal-styles.js index 61776b74e0..968411bcd6 100644 --- a/src/app/panels/styles/terminal-styles.js +++ b/src/app/panels/styles/terminal-styles.js @@ -93,6 +93,8 @@ var css = csjs` width : 330px; padding-left : 20px; height : 100%; + padding-top : 1px; + padding-bottom : 1px; } .filter { padding-right : 0px;