From efa1eab88954f0ba6a7bc3ef85ed137e7b360172 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Mon, 17 Jun 2019 14:06:22 +0200 Subject: [PATCH 1/7] fixed layout for resize --- src/app/ui/landing-page/landing-page.js | 29 +++++++++++++++---------- 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/src/app/ui/landing-page/landing-page.js b/src/app/ui/landing-page/landing-page.js index c92f49efb9..91e123e7de 100644 --- a/src/app/ui/landing-page/landing-page.js +++ b/src/app/ui/landing-page/landing-page.js @@ -38,6 +38,8 @@ let css = csjs` .jumboBtnContainer { float: left; padding-top: 15px; + display: flex; + white-space: nowrap; } .headlineContainer { float: left; @@ -45,16 +47,15 @@ let css = csjs` margin: 0 50px 0 70px; } .hpSections { + min-width: 620px; margin: 0 60px; } - .solidityBtn { - margin-right: 40px; - } .labelIt { margin-bottom: 0; } .seeAll { margin-top: 7px; + white-space: nowrap; } .importFrom p { margin-right: 10px; @@ -66,10 +67,9 @@ let css = csjs` .logoContainer img{ height: 65px; } - .learnmore { - margin-right: 20px; + .enviroments { + display: flex; } - } ` @@ -193,18 +193,18 @@ export class LandingPage extends BaseApi {

The new layout has arrived

-
- +
+
-
+

Environments

-
- +
+
@@ -240,7 +240,12 @@ export class LandingPage extends BaseApi {

Featured Plugins

{ startPipeline() }}>Pipeline

{ startDebugger() }}>Debugger

-

+

+ +

Resources

From f80ec30db85e61bd75a6774100a83816e3a445d5 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Mon, 17 Jun 2019 14:07:12 +0200 Subject: [PATCH 2/7] fixed disabel for deploy and run and debugger tabs --- src/app/debugger/debuggerUI/TxBrowser.js | 67 ++++++++++++++++------ src/app/files/file-explorer.js | 8 +-- src/app/panels/file-panel.js | 2 +- src/app/panels/styles/file-panel-styles.js | 3 + src/app/tabs/runTab/contractDropdown.js | 19 +++++- 5 files changed, 72 insertions(+), 27 deletions(-) diff --git a/src/app/debugger/debuggerUI/TxBrowser.js b/src/app/debugger/debuggerUI/TxBrowser.js index 12abb5137a..e656dbecc6 100644 --- a/src/app/debugger/debuggerUI/TxBrowser.js +++ b/src/app/debugger/debuggerUI/TxBrowser.js @@ -84,30 +84,47 @@ TxBrowser.prototype.setState = function (state) { TxBrowser.prototype.render = function () { var self = this - let action = yo`` - var view = yo`
-
-
- -
-
- ${action} -
+ this.state.txNumberInput = yo` + + ` + let txButton = yo` + + ` + var view = yo` +
+
+
+ ${this.state.txNumberInput}
- -
` +
+ ${txButton} +
+
+ +
+ ` if (this.state.debugging) { view.querySelectorAll('input').forEach(element => { element.setAttribute('disabled', '') }) } if (!this.state.txNumber) { - action.setAttribute('disabled', 'disabled') + view.querySelector("button[id='load']").setAttribute('disabled', '') + } else { + this.state.txNumberInput.removeAttribute('diabled', '') } if (!this.view) { this.view = view @@ -116,4 +133,16 @@ TxBrowser.prototype.render = function () { return view } +TxBrowser.prototype.txInputChanged = function (event) { + + // todo check validation of txnumber + //required + //oninvalid="setCustomValidity('Please provide a valid transaction number, must start with 0x and have length of 22')" + //pattern="^0[x,X]+[0-9a-fA-F]{22}" + //this.state.txNumberInput.setCustomValidity('') + + this.state.txNumber = event.target.value + yo.update(this.view, this.render()) +} + module.exports = TxBrowser diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index b4b24f2841..0e113b6e8b 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -157,7 +157,7 @@ function fileExplorer (localRegistry, files, menuItems) { var isRoot = data.path === self.files.type return yo`
- + ${isRoot ? self.renderMenuItems() : ''}
` @@ -522,12 +522,12 @@ fileExplorer.prototype.renderMenuItems = function () { items = this.menuItems.map(({action, title, icon}) => { if (action === 'uploadFile') { return yo` - + + ` } else { return yo` diff --git a/src/app/panels/file-panel.js b/src/app/panels/file-panel.js index 2c8d844611..c63117ba95 100644 --- a/src/app/panels/file-panel.js +++ b/src/app/panels/file-panel.js @@ -83,7 +83,7 @@ module.exports = class Filepanel extends BaseApi { return yo`
-
+
${fileExplorer.init()}
${fileSystemExplorer.init()}
${swarmExplorer.init()}
diff --git a/src/app/panels/styles/file-panel-styles.js b/src/app/panels/styles/file-panel-styles.js index 6effb8a4f1..a2fc6a7c67 100644 --- a/src/app/panels/styles/file-panel-styles.js +++ b/src/app/panels/styles/file-panel-styles.js @@ -16,6 +16,9 @@ var css = csjs` padding-left : 6px; padding-top : 6px; } + .fileExplorerTree { + cursor : default; + } .gist { padding : 10px; } diff --git a/src/app/tabs/runTab/contractDropdown.js b/src/app/tabs/runTab/contractDropdown.js index f32a7bad35..51f974c191 100644 --- a/src/app/tabs/runTab/contractDropdown.js +++ b/src/app/tabs/runTab/contractDropdown.js @@ -47,12 +47,13 @@ class ContractDropdownUI { this.compFails = yo`` var info = yo`` - this.atAddressButtonInput = yo`` + this.atAddress = yo`` + this.atAddressButtonInput = yo`` this.selectContractNames = yo`` this.createPanel = yo`
` this.orLabel = yo`
or
` - var el = yo` + let el = yo`
${this.selectContractNames} ${this.compFails} ${info} @@ -61,17 +62,29 @@ class ContractDropdownUI { ${this.createPanel} ${this.orLabel}
-
At Address
+ ${this.atAddress} ${this.atAddressButtonInput}
` + if (!this.atAddressButtonInput.value) { + this.atAddress.setAttribute('disabled', 'true') + } else { + this.atAddress.removeAttribute('disabled') + } this.selectContractNames.addEventListener('change', this.setInputParamsPlaceHolder.bind(this)) this.setInputParamsPlaceHolder() + if (!this.el) { + this.el = el + } return el } + atAddressChanged(event) { + yo.update(this.el, this.render()) + } + changeCurrentFile (currentFile) { if (!document.querySelector(`.${css.contractNames}`)) return document.querySelector(`.${css.contractNames}`).classList.remove(css.contractNamesError) From 6c954f4d6b8835fbc1834d98ca919c4d96a80887 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Mon, 17 Jun 2019 21:07:18 +0200 Subject: [PATCH 3/7] standard:wq --- src/app/debugger/debuggerUI/TxBrowser.js | 9 ++++----- src/app/tabs/runTab/contractDropdown.js | 2 +- 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/debugger/debuggerUI/TxBrowser.js b/src/app/debugger/debuggerUI/TxBrowser.js index e656dbecc6..d5d717ea07 100644 --- a/src/app/debugger/debuggerUI/TxBrowser.js +++ b/src/app/debugger/debuggerUI/TxBrowser.js @@ -134,12 +134,11 @@ TxBrowser.prototype.render = function () { } TxBrowser.prototype.txInputChanged = function (event) { - // todo check validation of txnumber - //required - //oninvalid="setCustomValidity('Please provide a valid transaction number, must start with 0x and have length of 22')" - //pattern="^0[x,X]+[0-9a-fA-F]{22}" - //this.state.txNumberInput.setCustomValidity('') + // required + // oninvalid="setCustomValidity('Please provide a valid transaction number, must start with 0x and have length of 22')" + // pattern="^0[x,X]+[0-9a-fA-F]{22}" + // this.state.txNumberInput.setCustomValidity('') this.state.txNumber = event.target.value yo.update(this.view, this.render()) diff --git a/src/app/tabs/runTab/contractDropdown.js b/src/app/tabs/runTab/contractDropdown.js index 51f974c191..79d737dab2 100644 --- a/src/app/tabs/runTab/contractDropdown.js +++ b/src/app/tabs/runTab/contractDropdown.js @@ -81,7 +81,7 @@ class ContractDropdownUI { return el } - atAddressChanged(event) { + atAddressChanged (event) { yo.update(this.el, this.render()) } From cdd9223fd93370046feaddd16e014942f1b40dea Mon Sep 17 00:00:00 2001 From: LianaHus Date: Fri, 21 Jun 2019 11:42:13 +0200 Subject: [PATCH 4/7] remove update with yo. needs refactoring later1 --- src/app/tabs/runTab/contractDropdown.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/app/tabs/runTab/contractDropdown.js b/src/app/tabs/runTab/contractDropdown.js index 79d737dab2..0b4dde64fe 100644 --- a/src/app/tabs/runTab/contractDropdown.js +++ b/src/app/tabs/runTab/contractDropdown.js @@ -68,11 +68,6 @@ class ContractDropdownUI {
` - if (!this.atAddressButtonInput.value) { - this.atAddress.setAttribute('disabled', 'true') - } else { - this.atAddress.removeAttribute('disabled') - } this.selectContractNames.addEventListener('change', this.setInputParamsPlaceHolder.bind(this)) this.setInputParamsPlaceHolder() if (!this.el) { @@ -82,7 +77,11 @@ class ContractDropdownUI { } atAddressChanged (event) { - yo.update(this.el, this.render()) + if (!this.atAddressButtonInput.value) { + this.atAddress.setAttribute('disabled', 'true') + } else { + this.atAddress.removeAttribute('disabled') + } } changeCurrentFile (currentFile) { From 43da29f996b2c7a58dadb5b9d67bfe169040725c Mon Sep 17 00:00:00 2001 From: LianaHus Date: Mon, 24 Jun 2019 10:32:39 +0200 Subject: [PATCH 5/7] At Address is initially disabled fix the test --- src/app/tabs/runTab/contractDropdown.js | 4 ++-- test-browser/commands/addAtAddressInstance.js | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/app/tabs/runTab/contractDropdown.js b/src/app/tabs/runTab/contractDropdown.js index 0b4dde64fe..3405f121d9 100644 --- a/src/app/tabs/runTab/contractDropdown.js +++ b/src/app/tabs/runTab/contractDropdown.js @@ -47,8 +47,8 @@ class ContractDropdownUI { this.compFails = yo`` var info = yo`` - this.atAddress = yo`` - this.atAddressButtonInput = yo`` + this.atAddress = yo`` + this.atAddressButtonInput = yo`` this.selectContractNames = yo`` this.createPanel = yo`
` diff --git a/test-browser/commands/addAtAddressInstance.js b/test-browser/commands/addAtAddressInstance.js index 31879a6601..a612c3f229 100644 --- a/test-browser/commands/addAtAddressInstance.js +++ b/test-browser/commands/addAtAddressInstance.js @@ -14,7 +14,7 @@ class addAtAddressInstance extends EventEmitter { function addInstance (browser, address, isValidFormat, isValidChecksum, callback) { browser.clickLaunchIcon('run').clearValue('.ataddressinput').setValue('.ataddressinput', address, function () { - browser.click('div[class^="atAddress"]') + browser.click('button[id^="runAndDeployAtAdressButton"]') .execute(function () { var ret = document.querySelector('div[class^="modal-body"] div').innerHTML document.querySelector('#modal-footer-ok').click() From 841335923c1af5436f66117267c84260be032ae0 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Mon, 24 Jun 2019 17:29:35 +0200 Subject: [PATCH 6/7] Update file-explorer.js --- src/app/files/file-explorer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index 0e113b6e8b..56dbaf0f55 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -164,7 +164,8 @@ function fileExplorer (localRegistry, files, menuItems) { style="${isRoot ? 'font-weight:bold;' : ''}" onkeydown=${editModeOff} onblur=${editModeOff} - >${key.split('/').pop()} + > + ${key.split('/').pop()} ${isRoot ? self.renderMenuItems() : ''}
From 29856f2bd1a1f74a83c33d2f405338af70c637bd Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 26 Jun 2019 16:15:41 +0200 Subject: [PATCH 7/7] fixed test --- src/app/debugger/debuggerUI/TxBrowser.js | 2 +- src/app/files/file-explorer.js | 4 ++-- src/app/ui/landing-page/landing-page.js | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/debugger/debuggerUI/TxBrowser.js b/src/app/debugger/debuggerUI/TxBrowser.js index d5d717ea07..81b1a431be 100644 --- a/src/app/debugger/debuggerUI/TxBrowser.js +++ b/src/app/debugger/debuggerUI/TxBrowser.js @@ -134,7 +134,7 @@ TxBrowser.prototype.render = function () { } TxBrowser.prototype.txInputChanged = function (event) { - // todo check validation of txnumber + // todo check validation of txnumber in the input element, use // required // oninvalid="setCustomValidity('Please provide a valid transaction number, must start with 0x and have length of 22')" // pattern="^0[x,X]+[0-9a-fA-F]{22}" diff --git a/src/app/files/file-explorer.js b/src/app/files/file-explorer.js index 56dbaf0f55..2d0c33ada1 100644 --- a/src/app/files/file-explorer.js +++ b/src/app/files/file-explorer.js @@ -180,7 +180,7 @@ function fileExplorer (localRegistry, files, menuItems) { MENU_HANDLE = contextMenu(event, { 'Rename': () => { if (self.files.readonly) { return tooltip('cannot rename folder. ' + self.files.type + ' is a read only explorer') } - var name = label.querySelector('label[data-path="' + key + '"]') + var name = label.querySelector('span[data-path="' + key + '"]') if (name) editModeOn(name) }, 'Delete': () => { @@ -197,7 +197,7 @@ function fileExplorer (localRegistry, files, menuItems) { if (!self.files.readonly) { actions['Rename'] = () => { if (self.files.readonly) { return tooltip('cannot rename file. ' + self.files.type + ' is a read only explorer') } - var name = label.querySelector('label[data-path="' + key + '"]') + var name = label.querySelector('span[data-path="' + key + '"]') if (name) editModeOn(name) } actions['Delete'] = () => { diff --git a/src/app/ui/landing-page/landing-page.js b/src/app/ui/landing-page/landing-page.js index 91e123e7de..e0f6c37f30 100644 --- a/src/app/ui/landing-page/landing-page.js +++ b/src/app/ui/landing-page/landing-page.js @@ -47,7 +47,7 @@ let css = csjs` margin: 0 50px 0 70px; } .hpSections { - min-width: 620px; + min-width: 640px; margin: 0 60px; } .labelIt {