diff --git a/src/app.js b/src/app.js index b3a4a55070..70d7c3e947 100644 --- a/src/app.js +++ b/src/app.js @@ -170,7 +170,7 @@ class App extends ApiFactory { init () { var self = this - self._components.resizeFeature = new PanelsResize('#swap-panel', '#editor-container', { 'minWidth': 400, x: 450 }) + self._components.resizeFeature = new PanelsResize('#swap-panel', '#editor-container', { 'minWidth': 300, x: 300 }) run.apply(self) } diff --git a/src/app/panels/editor-panel.js b/src/app/panels/editor-panel.js index 7dd6652f67..91c4810042 100644 --- a/src/app/panels/editor-panel.js +++ b/src/app/panels/editor-panel.js @@ -79,10 +79,9 @@ class EditorPanel { self._view.mainPanel.style.display = 'none' }) self.data = { - _FILE_SCROLL_DELTA: 200, _layout: { top: { - offset: self._deps.config.get('terminal-top-offset') || 500, + offset: self._deps.config.get('terminal-top-offset') || 150, show: true } } @@ -104,7 +103,7 @@ class EditorPanel { var height = window.innerHeight var newpos = (event.pageY < limitUp) ? limitUp : event.pageY newpos = (newpos < height - limitDown) ? newpos : height - limitDown - return newpos + return height - newpos } }) @@ -138,11 +137,11 @@ class EditorPanel { var tmp = delta - limitDown delta = tmp > 0 ? tmp : 0 if (direction === 'top') { - var height = containerHeight - delta - height = height < 0 ? 0 : height - self._view.editor.style.height = `${delta}px` - self._view.mainPanel.style.height = `${delta}px` - self._view.terminal.style.height = `${height}px` // - menu bar height + var mainPanelHeight = containerHeight - delta + mainPanelHeight = mainPanelHeight < 0 ? 0 : mainPanelHeight + self._view.editor.style.height = `${mainPanelHeight}px` + self._view.mainPanel.style.height = `${mainPanelHeight}px` + self._view.terminal.style.height = `${delta}px` // - menu bar height self._components.editor.resize((document.querySelector('#editorWrap') || {}).checked) self._components.terminal.scroll2bottom() } diff --git a/src/app/panels/terminal.js b/src/app/panels/terminal.js index 808fd912f7..23a07de478 100644 --- a/src/app/panels/terminal.js +++ b/src/app/panels/terminal.js @@ -104,12 +104,17 @@ class Terminal { if (opts.shell) self._shell = opts.shell register(self) } + + focus () { + if (this._view.input) this._view.input.focus() + } + render () { var self = this if (self._view.el) return self._view.el self._view.journal = yo`
` self._view.input = yo` - + { this.focus() }} contenteditable="true" onpaste=${paste} onkeydown=${change}> ` self._view.input.innerText = '\n' self._view.cli = yo` diff --git a/src/app/staticanalysis/staticAnalysisView.js b/src/app/staticanalysis/staticAnalysisView.js index 699387b61a..d8ce2c2fb5 100644 --- a/src/app/staticanalysis/staticAnalysisView.js +++ b/src/app/staticanalysis/staticAnalysisView.js @@ -43,32 +43,34 @@ staticAnalysisView.prototype.render = function () { var self = this var view = yo`
-
- ${this.modulesView} -
-
- - - +
+ + + +
-
-
+
+ ${this.modulesView} +
+
+
Results:
+
` if (!this.view) { @@ -96,8 +98,8 @@ staticAnalysisView.prototype.run = function () { var selected = this.selectedModules() var warningContainer = $('#staticanalysisresult') warningContainer.empty() + var self = this if (this.lastCompilationResult) { - var self = this var warningCount = 0 this.runner.run(this.lastCompilationResult, selected, function (results) { results.map(function (result, i) { diff --git a/src/app/staticanalysis/styles/staticAnalysisView-styles.js b/src/app/staticanalysis/styles/staticAnalysisView-styles.js index 4aa5f5450a..1c38435dfc 100644 --- a/src/app/staticanalysis/styles/staticAnalysisView-styles.js +++ b/src/app/staticanalysis/styles/staticAnalysisView-styles.js @@ -7,6 +7,8 @@ var css = csjs` } .result { margin-top: 1%; + max-height: 300px; + overflow-y: auto; } .buttons { margin: 1rem 0; @@ -25,6 +27,10 @@ var css = csjs` display: flex; align-items: center; } + .container { + max-height: 300px; + overflow-y: auto; + } ` module.exports = css diff --git a/src/app/tabs/styles/test-tab-styles.js b/src/app/tabs/styles/test-tab-styles.js index 8eab2c9e0b..ca05bd7eb6 100644 --- a/src/app/tabs/styles/test-tab-styles.js +++ b/src/app/tabs/styles/test-tab-styles.js @@ -11,10 +11,15 @@ var css = csjs` display: flex; flex-direction: column; margin: 2%; + max-height: 300px; + overflow-y: auto; + } .container { margin: 2%; padding-bottom: 5%; + max-height: 300px; + overflow-y: auto; } .outputTitle { font-weight: bold; diff --git a/src/app/tabs/test-tab.js b/src/app/tabs/test-tab.js index 78b140b833..cdf1a30aa4 100644 --- a/src/app/tabs/test-tab.js +++ b/src/app/tabs/test-tab.js @@ -174,9 +174,8 @@ module.exports = class TestTab extends ApiFactory { How to test smart contracts guide in our documentation.
Generate test file
-
- ${this.testList} -
+
+
Run Tests
+ ${this.testList} +
+
Results:
${this.testsOutput} ${this.testsSummary}
diff --git a/src/app/ui/styles/renderer-styles.js b/src/app/ui/styles/renderer-styles.js index 710d7fb821..2a143a165a 100644 --- a/src/app/ui/styles/renderer-styles.js +++ b/src/app/ui/styles/renderer-styles.js @@ -49,7 +49,7 @@ var css = yo`