From fd29dc9c1784028fadd73eb3128907a6b4c4eed9 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Mon, 12 Aug 2019 10:58:30 +0200 Subject: [PATCH 01/26] fix modal dialog for provider --- src/app/tabs/runTab/settings.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/tabs/runTab/settings.js b/src/app/tabs/runTab/settings.js index 2762657819..df7ebca5d9 100644 --- a/src/app/tabs/runTab/settings.js +++ b/src/app/tabs/runTab/settings.js @@ -178,7 +178,8 @@ class SettingsUI { selectExEnv.addEventListener('change', (event) => { let context = selectExEnv.options[selectExEnv.selectedIndex].value this.settings.changeExecutionContext(context, () => { - modalDialogCustom.confirm('External node request', 'Are you sure you want to connect to an ethereum node?', () => { + const modal = modalDialogCustom.confirm('External node request', 'Are you sure you want to connect to an ethereum node?', () => { + modal.hide() modalDialogCustom.prompt('External node request', 'Web3 Provider Endpoint', 'http://localhost:8545', (target) => { this.settings.setProviderFromEndpoint(target, context, (alertMsg) => { if (alertMsg) { From 5e40bbdf36d5a79bc1021c052d8e5799ada48104 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Wed, 7 Aug 2019 10:07:21 +0200 Subject: [PATCH 02/26] used flexbox for browsersolidity items. --- src/app.js | 17 +++-------------- src/app/components/side-panel.js | 1 + src/lib/panels-resize.js | 5 +---- 3 files changed, 5 insertions(+), 18 deletions(-) diff --git a/src/app.js b/src/app.js index cecb13aa1c..58fdc3071c 100644 --- a/src/app.js +++ b/src/app.js @@ -62,38 +62,27 @@ var css = csjs` overflow-x: auto; } .browsersolidity { - position : relative; width : 100vw; height : 100vh; overflow : hidden; + flex-direction : row; + display : flex; } .mainpanel { display : flex; flex-direction : column; - position : absolute; - top : 0; - bottom : 0; overflow : hidden; } .iconpanel { display : flex; flex-direction : column; - position : absolute; - top : 0; - bottom : 0; - left : 0; overflow : hidden; width : 50px; user-select : none; - /* border-right : 1px solid var(--primary); */ } .sidepanel { display : flex; - flex-direction : column; - position : absolute; - top : 0; - left : 50px; - bottom : 0; + flex-direction : row-reverse; } .highlightcode { position:absolute; diff --git a/src/app/components/side-panel.js b/src/app/components/side-panel.js index e478f35a6c..bfb41eeeb4 100644 --- a/src/app/components/side-panel.js +++ b/src/app/components/side-panel.js @@ -8,6 +8,7 @@ const css = csjs` height: 100%; display: flex; flex-direction: column; + flex: auto; } .swapitTitle { margin: 0; diff --git a/src/lib/panels-resize.js b/src/lib/panels-resize.js index c041c48121..1f4040ca3a 100644 --- a/src/lib/panels-resize.js +++ b/src/lib/panels-resize.js @@ -3,11 +3,8 @@ const csjs = require('csjs-inject') const css = csjs` .dragbar { - position : absolute; - top : 0px; width : 0.5em; - right : 0; - bottom : 0; + height : 100%; cursor : col-resize; z-index : 999; /* border-right : 2px solid var(--primary); */ From 2aa0ff90e8658f9a6b5fc2ed273bea521ce757d1 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 8 Aug 2019 15:39:12 +0200 Subject: [PATCH 03/26] fixed some sizes --- src/app.js | 2 ++ src/app/components/side-panel.js | 12 +++++------- src/app/components/vertical-icons.js | 8 ++++---- src/app/tabs/styles/run-tab-styles.js | 1 - src/app/udapp/run-tab.js | 2 +- src/lib/panels-resize.js | 2 +- 6 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/app.js b/src/app.js index 58fdc3071c..a77f3b7e54 100644 --- a/src/app.js +++ b/src/app.js @@ -72,6 +72,7 @@ var css = csjs` display : flex; flex-direction : column; overflow : hidden; + flex : 1; } .iconpanel { display : flex; @@ -83,6 +84,7 @@ var css = csjs` .sidepanel { display : flex; flex-direction : row-reverse; + width : 320px; } .highlightcode { position:absolute; diff --git a/src/app/components/side-panel.js b/src/app/components/side-panel.js index bfb41eeeb4..69764218d0 100644 --- a/src/app/components/side-panel.js +++ b/src/app/components/side-panel.js @@ -23,7 +23,6 @@ const css = csjs` } .swapitHeader { height: 35px; - padding: 15px 20px; display: flex; align-items: center; } @@ -33,7 +32,6 @@ const css = csjs` } .pluginsContainer { height: 100%; - flex: 1; overflow-y: auto; } .titleInfo { @@ -132,10 +130,10 @@ export class SidePanel extends AbstractPanel { } return yo` -
-
${name}
- ${docLink} - ${versionWarning} +
+
${name}
+ ${docLink} + ${versionWarning}
` } @@ -144,7 +142,7 @@ export class SidePanel extends AbstractPanel { return yo`
${this.header} -
+
${this.view}
` diff --git a/src/app/components/vertical-icons.js b/src/app/components/vertical-icons.js index f458e7afeb..5012e68006 100644 --- a/src/app/components/vertical-icons.js +++ b/src/app/components/vertical-icons.js @@ -160,9 +160,9 @@ export class VerticalIcons extends Plugin { }) // remove active - const currentActive = this.view.querySelector(`.${css.active}`) + const currentActive = this.view.querySelector(`.active`) if (currentActive) { - currentActive.classList.remove(css.active) + currentActive.classList.remove(`active`) } } @@ -176,7 +176,7 @@ export class VerticalIcons extends Plugin { const nextActive = this.view.querySelector(`[plugin="${name}"]`) if (nextActive) { let image = nextActive.querySelector('.image') - nextActive.classList.add(css.active) + nextActive.classList.add(`active`) image.style.setProperty('filter', `invert(${invert}) grayscale(1) brightness(0%)`) } } @@ -210,7 +210,7 @@ export class VerticalIcons extends Plugin { onThemeChanged (themeType) { const invert = themeType === 'dark' ? 1 : 0 - const active = this.view.querySelector(`.${css.active}`) + const active = this.view.querySelector(`.active`) if (active) { let image = active.querySelector('.image') image.style.setProperty('filter', `invert(${invert})`) diff --git a/src/app/tabs/styles/run-tab-styles.js b/src/app/tabs/styles/run-tab-styles.js index ed1db69455..69fc8b2c9a 100644 --- a/src/app/tabs/styles/run-tab-styles.js +++ b/src/app/tabs/styles/run-tab-styles.js @@ -2,7 +2,6 @@ var csjs = require('csjs-inject') var css = csjs` .runTabView { - padding: 2%; display: flex; flex-direction: column; } diff --git a/src/app/udapp/run-tab.js b/src/app/udapp/run-tab.js index 47c3d1a4d4..6856a94753 100644 --- a/src/app/udapp/run-tab.js +++ b/src/app/udapp/run-tab.js @@ -74,7 +74,7 @@ export class RunTab extends LibraryPlugin { } renderContainer () { - this.container = yo`
` + this.container = yo`
` var el = yo`
diff --git a/src/lib/panels-resize.js b/src/lib/panels-resize.js index 1f4040ca3a..9edd232f1d 100644 --- a/src/lib/panels-resize.js +++ b/src/lib/panels-resize.js @@ -3,7 +3,7 @@ const csjs = require('csjs-inject') const css = csjs` .dragbar { - width : 0.5em; + width : 4px; height : 100%; cursor : col-resize; z-index : 999; From 7c039a7eca01c499923a32293962f5d8e14b3f03 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Thu, 8 Aug 2019 16:06:39 +0200 Subject: [PATCH 04/26] remove manual resiing of panels --- src/app.js | 2 +- src/lib/panels-resize.js | 14 ++------------ 2 files changed, 3 insertions(+), 13 deletions(-) diff --git a/src/app.js b/src/app.js index a77f3b7e54..a63821319b 100644 --- a/src/app.js +++ b/src/app.js @@ -141,7 +141,7 @@ class App { init () { var self = this - self._components.resizeFeature = new PanelsResize('#side-panel', '#editor-container', { 'minWidth': 300, x: 450 }) + self._components.resizeFeature = new PanelsResize('#side-panel', '#editor-container', { 'minWidth': 330, x: 450 }) run.apply(self) } diff --git a/src/lib/panels-resize.js b/src/lib/panels-resize.js index 9edd232f1d..a32006866f 100644 --- a/src/lib/panels-resize.js +++ b/src/lib/panels-resize.js @@ -99,20 +99,10 @@ export default class PanelsResize { } minimize () { - let panel1Width = 0 - let panel2left = this.panel1.offsetLeft + panel1Width - let panel2Width = this.panel2.parentElement.clientWidth - this.panel1.offsetLeft - panel1Width - this.panel1.style.width = panel1Width + 'px' - this.panel2.style.left = panel2left + 'px' - this.panel2.style.width = panel2Width + 'px' + this.panel1.style.display = 'none' } maximise () { - let panel1Width = this.opt.minWidth - let panel2left = this.panel1.offsetLeft + panel1Width - let panel2Width = this.panel2.parentElement.clientWidth - this.panel1.offsetLeft - panel1Width - this.panel1.style.width = panel1Width + 'px' - this.panel2.style.left = panel2left + 'px' - this.panel2.style.width = panel2Width + 'px' + this.panel1.style.display = 'flex' } } From f5e832eb739c96dec2315696f0b81bace7740845 Mon Sep 17 00:00:00 2001 From: Grandschtroumpf Date: Tue, 13 Aug 2019 11:38:42 +0200 Subject: [PATCH 05/26] change "3box" to "box" --- src/remixAppManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remixAppManager.js b/src/remixAppManager.js index fcb0e1ed15..46bed5588f 100644 --- a/src/remixAppManager.js +++ b/src/remixAppManager.js @@ -158,7 +158,7 @@ export class RemixAppManager extends PluginEngine { location: 'sidePanel' } const threeBox = { - name: '3box', + name: 'box', displayName: '3Box Spaces', description: 'A decentralized storage for everything that happen on Remix', methods: ['login', 'isEnabled', 'getUserAddress', 'openSpace', 'closeSpace', 'isSpaceOpened', 'getSpacePrivateValue', 'setSpacePrivateValue', 'getSpacePublicValue', 'setSpacePublicValue', 'getSpacePublicData'], From d4d88040a6eb78d60c26cb957d4e29d920447e4e Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 13 Aug 2019 11:49:15 +0200 Subject: [PATCH 06/26] Use addTooltip instead of alert --- src/app/tabs/runTab/settings.js | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/app/tabs/runTab/settings.js b/src/app/tabs/runTab/settings.js index df7ebca5d9..b667614fb0 100644 --- a/src/app/tabs/runTab/settings.js +++ b/src/app/tabs/runTab/settings.js @@ -182,15 +182,13 @@ class SettingsUI { modal.hide() modalDialogCustom.prompt('External node request', 'Web3 Provider Endpoint', 'http://localhost:8545', (target) => { this.settings.setProviderFromEndpoint(target, context, (alertMsg) => { - if (alertMsg) { - modalDialogCustom.alert(alertMsg) - } + if (alertMsg) addTooltip(alertMsg) this.setFinalContext() }) }, this.setFinalContext.bind(this)) }, this.setFinalContext.bind(this)) }, (alertMsg) => { - modalDialogCustom.alert(alertMsg) + addTooltip(alertMsg) }, this.setFinalContext.bind(this)) }) From 7706731821d48883f8f6127132a29232de68418f Mon Sep 17 00:00:00 2001 From: LianaHus Date: Tue, 13 Aug 2019 12:28:00 +0200 Subject: [PATCH 07/26] removed second item of deployed contract at address --- src/app/tabs/runTab/model/dropdownlogic.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/app/tabs/runTab/model/dropdownlogic.js b/src/app/tabs/runTab/model/dropdownlogic.js index f60ab0dd49..2c90db2920 100644 --- a/src/app/tabs/runTab/model/dropdownlogic.js +++ b/src/app/tabs/runTab/model/dropdownlogic.js @@ -54,8 +54,9 @@ class DropdownLogic { } cb(null, 'abi', abi) }) + } else { + cb(null, 'instance') } - cb(null, 'instance') } getCompiledContracts (compiler, compilerFullName) { From db55f8f3a00b9eccac8dec9db9d225288bdab611 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Tue, 13 Aug 2019 12:29:36 +0200 Subject: [PATCH 08/26] fixed the title of deployed to address --- src/app/udapp/run-tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/udapp/run-tab.js b/src/app/udapp/run-tab.js index 6856a94753..2dd196146d 100644 --- a/src/app/udapp/run-tab.js +++ b/src/app/udapp/run-tab.js @@ -133,7 +133,7 @@ export class RunTab extends LibraryPlugin { if (noInstancesText.parentNode) { noInstancesText.parentNode.removeChild(noInstancesText) } }) this.contractDropdownUI.event.register('newContractABIAdded', (abi, address) => { - this.instanceContainer.appendChild(udappUI.renderInstanceFromABI(abi, address, address)) + this.instanceContainer.appendChild(udappUI.renderInstanceFromABI(abi, address, '')) }) this.contractDropdownUI.event.register('newContractInstanceAdded', (contractObject, address, value) => { this.instanceContainer.appendChild(udappUI.renderInstance(contractObject, address, value)) From 45279e8aa35859db70a663b24f585b83e8d7b960 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Tue, 13 Aug 2019 12:51:48 +0200 Subject: [PATCH 09/26] remove events and notifications from local plugin create page --- src/app/components/local-plugin.js | 73 +----------------------------- 1 file changed, 1 insertion(+), 72 deletions(-) diff --git a/src/app/components/local-plugin.js b/src/app/components/local-plugin.js index 660a54eff8..3f9f28f16d 100644 --- a/src/app/components/local-plugin.js +++ b/src/app/components/local-plugin.js @@ -2,8 +2,6 @@ const yo = require('yo-yo') const modalDialog = require('../ui/modaldialog') -const unexposedEvents = ['statusChanged'] - module.exports = class LocalPlugin { /** @@ -40,8 +38,6 @@ module.exports = class LocalPlugin { ...this.profile, hash: `local-${this.profile.name}` } - profile.events = (profile.events || []).filter(item => item !== '') - if (!profile.location) throw new Error('Plugin should have a location') if (!profile.name) throw new Error('Plugin should have a name') if (!profile.url) throw new Error('Plugin should have an URL') @@ -49,23 +45,6 @@ module.exports = class LocalPlugin { return profile } - /** - * Add or remove a notification to/from the profile - * @param {Event} e The event when checkbox changes - * @param {string} pluginName The name of the plugin - * @param {string} eventName The name of the event to listen on - */ - toggleNotification (e, pluginName, eventName) { - const {checked} = e.target - if (checked) { - if (!this.profile.notifications[pluginName]) this.profile.notifications[pluginName] = [] - this.profile.notifications[pluginName].push(eventName) - } else { - this.profile.notifications[pluginName].splice(this.profile.notifications[pluginName].indexOf(eventName), 1) - if (this.profile.notifications[pluginName].length === 0) delete this.profile.notifications[pluginName] - } - } - updateName ({target}) { this.profile.name = target.value } @@ -78,32 +57,10 @@ module.exports = class LocalPlugin { this.profile.displayName = target.value } - updateEvents ({target}, index) { - if (this.profile.events[index] !== undefined) { - this.profile.events[index] = target.value - } - } - updateLoc ({target}) { this.profile.location = target.value } - /** - * The checkbox for a couple module / event - * @param {string} plugin The name of the plugin - * @param {string} event The name of the event exposed by the plugin - */ - notificationCheckbox (plugin, event) { - const notifications = this.profile.notifications || {} - const checkbox = notifications[plugin] && notifications[plugin].includes(event) - ? yo`` - : yo`` - return yo`
- ${checkbox} - -
` - } - /** * The form to create a local plugin * @param {ProfileApi[]} plugins Liste of profile of the plugins @@ -112,15 +69,7 @@ module.exports = class LocalPlugin { const name = this.profile.name || '' const url = this.profile.url || '' const displayName = this.profile.displayName || '' - const profiles = plugins - .filter(({profile}) => profile.events && profile.events.length > 0) - .map(({profile}) => profile) - - const eventsForm = (events) => { - return yo`
${events.map((event, i) => { - return yo`` - })}
` - } + const radioLocations = (label, displayN) => { const radioButton = (this.profile.location === label) ? yo`
@@ -135,14 +84,6 @@ module.exports = class LocalPlugin { ${radioButton}
` } - const eventsEl = eventsForm(this.profile.events || []) - const pushEvent = () => { - if (!this.profile.events) this.profile.events = [] - this.profile.events.push('') - yo.update(eventsEl, eventsForm(this.profile.events)) - } - const addEvent = yo`` - return yo`
@@ -157,18 +98,6 @@ module.exports = class LocalPlugin {
-
- - ${eventsEl}${addEvent} -
-
- - ${profiles.map(({name, events}) => { - return events - .filter(event => !unexposedEvents.includes(event)) - .map(event => this.notificationCheckbox(name, event)) - })} -
Location in remix (required)
${radioLocations('sidePanel', 'Side Panel')} From b2e777226a7e70296699f8fc13014b2068f4d87b Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Tue, 13 Aug 2019 13:08:13 +0200 Subject: [PATCH 10/26] standart --- src/app/components/local-plugin.js | 1 - 1 file changed, 1 deletion(-) diff --git a/src/app/components/local-plugin.js b/src/app/components/local-plugin.js index 3f9f28f16d..06dc32baef 100644 --- a/src/app/components/local-plugin.js +++ b/src/app/components/local-plugin.js @@ -69,7 +69,6 @@ module.exports = class LocalPlugin { const name = this.profile.name || '' const url = this.profile.url || '' const displayName = this.profile.displayName || '' - const radioLocations = (label, displayN) => { const radioButton = (this.profile.location === label) ? yo`
From f97d023a39e4299a33f01694d417d67312d777ce Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Tue, 13 Aug 2019 14:04:15 +0200 Subject: [PATCH 11/26] fixed the move on hover and the color --- src/app/components/plugin-manager-component.js | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/src/app/components/plugin-manager-component.js b/src/app/components/plugin-manager-component.js index 7e2b47d0c2..bd22846de9 100644 --- a/src/app/components/plugin-manager-component.js +++ b/src/app/components/plugin-manager-component.js @@ -19,9 +19,6 @@ const css = csjs` z-index: 2; margin-bottom: 0px; } - .localPluginBtn { - margin-top: 15px; - } .displayName { text-transform: capitalize; display: flex; @@ -186,7 +183,7 @@ class PluginManagerComponent extends ViewPlugin {
-
From e0fdb94b3903bf0515911a3aa3dd5b21bda658ba Mon Sep 17 00:00:00 2001 From: yann300 Date: Wed, 14 Aug 2019 15:35:44 +0200 Subject: [PATCH 12/26] plural for workshops and change description --- src/app/ui/landing-page/landing-page.js | 2 +- src/remixAppManager.js | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/app/ui/landing-page/landing-page.js b/src/app/ui/landing-page/landing-page.js index 185857ad8a..a5a5112177 100644 --- a/src/app/ui/landing-page/landing-page.js +++ b/src/app/ui/landing-page/landing-page.js @@ -200,7 +200,7 @@ export class LandingPage extends ViewPlugin {
- +
diff --git a/src/remixAppManager.js b/src/remixAppManager.js index 2cede17580..3b96994e21 100644 --- a/src/remixAppManager.js +++ b/src/remixAppManager.js @@ -169,9 +169,9 @@ export class RemixAppManager extends PluginEngine { location: 'sidePanel' } const remixWorkshop = { - name: 'workshop', - displayName: 'Remix Workshop', - description: 'Learn Solidity with Remix !', + name: 'workshops', + displayName: 'Remix Workshops', + description: 'Learn Ethereum with Remix !', methods: [], events: [], version: '0.1.0-alpha', From 8bbaa600f2896fb9e957053109fdf03cd7bb18b8 Mon Sep 17 00:00:00 2001 From: Edson Alcala Date: Wed, 14 Aug 2019 16:38:57 +0100 Subject: [PATCH 13/26] added gas profiler --- src/remixAppManager.js | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/src/remixAppManager.js b/src/remixAppManager.js index 29b006606d..14d9dc6713 100644 --- a/src/remixAppManager.js +++ b/src/remixAppManager.js @@ -200,6 +200,17 @@ export class RemixAppManager extends PluginEngine { icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9Im5vIj8+CjwhLS0gQ3JlYXRlZCB3aXRoIElua3NjYXBlIChodHRwOi8vd3d3Lmlua3NjYXBlLm9yZy8pIC0tPgoKPHN2ZwogIC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3IDkyLjQzMDk4LDI5LjYwMjA3IDI5LjYwMjA4LDAgNDcuNzI1NzksLTM4LjY2Mzk0IDQ3LjcyNTc5LC0zOC42NjM5NCIKICAgICAgICAgaWQ9InVzZTk1MSIKICAgICAgICAgaW5rc2NhcGU6Y29ubmVjdG9yLWN1cnZhdHVyZT0iMCIKICAgICAgICAgc29kaXBvZGk6bm9kZXR5cGVzPSJjc3NjIiAvPgogICAgICA8cGF0aAogICAgICAgICBzb2RpcG9kaTpub2RldHlwZXM9ImNzc2MiCiAgICAgICAgIGlua3NjYXBlOmNvbm5lY3Rvci1jdXJ2YXR1cmU9IjAiCiAgICAgICAgIGlkPSJ1c2U5NTUiCiAgICAgICAgIGQ9Im0gNDAuNzg2NDQzLDI2MC41Nzk1NSBjIDAsMCAxOS4zMjgzMDYsLTM2Ljg0OTgzIDQ4LjkzMDM4NywtMzYuODQ5ODMgMjkuNjAyMDgsMCA2Mi44Mjg5LDI5LjYwMjA3IDkyLjQzMDk4LDI5LjYwMjA3IDI5LjYwMjA4LDAgNDcuNzI1NzksLTM4LjY2MzkzIDQ3LjcyNTc5LC0zOC42NjM5MyIKICAgICAgICAgc3R5bGU9Im9wYWNpdHk6MTtmaWxsOm5vbmU7ZmlsbC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlOiMwMDAwMDA7c3Ryb2tlLXdpZHRoOjI3LjQ4NzY0MjI5O3N0cm9rZS1saW5lY2FwOmJ1dHQ7c3Ryb2tlLWxpbmVqb2luOm1pdGVyO3N0cm9rZS1taXRlcmxpbWl0OjQ7c3Ryb2tlLWRhc2hhcnJheTpub25lO3N0cm9rZS1vcGFjaXR5OjEiIC8+CiAgICA8L2c+CiAgPC9nPgo8L3N2Zz4K', location: 'sidePanel' } + const gasProfiler = { + name: 'gasProfiler', + displayName: 'Gas Profiler', + events: [], + methods: [], + version: '0.1.0-alpha', + url: 'https://remix-gas-profiler.surge.sh', + description: 'Profile gas costs', + icon: 'https://res.cloudinary.com/key-solutions/image/upload/v1565781702/gas-profiler_nxmsal.png', + location: 'sidePanel' + } return [ new IframePlugin(pipeline), new IframePlugin(vyper), @@ -210,7 +221,8 @@ export class RemixAppManager extends PluginEngine { new IframePlugin(threeBox), new IframePlugin(remixWorkshop), new IframePlugin(debugPlugin), - new IframePlugin(libraTools) + new IframePlugin(libraTools), + new IframePlugin(gasProfiler) ] } } From d486e2f179fad6ed9e70d68bd7b7f8b47fc7cfa7 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 15 Aug 2019 11:41:51 +0200 Subject: [PATCH 14/26] Update landing-page.js --- src/app/ui/landing-page/landing-page.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/ui/landing-page/landing-page.js b/src/app/ui/landing-page/landing-page.js index a5a5112177..b96227ef9c 100644 --- a/src/app/ui/landing-page/landing-page.js +++ b/src/app/ui/landing-page/landing-page.js @@ -138,8 +138,8 @@ export class LandingPage extends ViewPlugin { const startWorkshop = () => { this.appManager.ensureActivated('solidity') this.appManager.ensureActivated('solidityUnitTesting') - this.appManager.ensureActivated('workshop') - this.verticalIcons.select('workshop') + this.appManager.ensureActivated('workshops') + this.verticalIcons.select('workshops') } const startPipeline = () => { From 5be1c98221f76073098bfa6aea81d160a73df410 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Mon, 19 Aug 2019 14:17:18 +0200 Subject: [PATCH 15/26] refactor panel-resize --- src/app.js | 8 ++-- src/framingService.js | 6 +-- src/lib/panels-resize.js | 87 +++++++++++++++++----------------------- 3 files changed, 44 insertions(+), 57 deletions(-) diff --git a/src/app.js b/src/app.js index a63821319b..54e14404eb 100644 --- a/src/app.js +++ b/src/app.js @@ -81,7 +81,7 @@ var css = csjs` width : 50px; user-select : none; } - .sidepanel { + .sidepanel { display : flex; flex-direction : row-reverse; width : 320px; @@ -141,7 +141,6 @@ class App { init () { var self = this - self._components.resizeFeature = new PanelsResize('#side-panel', '#editor-container', { 'minWidth': 330, x: 450 }) run.apply(self) } @@ -157,7 +156,7 @@ class App { // center panel, resizable self._view.sidepanel = yo` -
+
${''}
` @@ -169,10 +168,13 @@ class App {
` + self._components.resizeFeature = new PanelsResize(self._view.sidepanel) + self._view.el = yo`
${self._view.iconpanel} ${self._view.sidepanel} + ${self._components.resizeFeature.render()} ${self._view.mainpanel}
` diff --git a/src/framingService.js b/src/framingService.js index fe326b52dd..fa8a0d3237 100644 --- a/src/framingService.js +++ b/src/framingService.js @@ -10,13 +10,13 @@ export class FramingService { start () { this.sidePanel.events.on('toggle', () => { - this.resizeFeature.panel1.clientWidth !== 0 ? this.resizeFeature.minimize() : this.resizeFeature.maximise() + this.resizeFeature.panel.clientWidth !== 0 ? this.resizeFeature.hidePanel() : this.resizeFeature.showPanel() }) this.sidePanel.events.on('showing', () => { - this.resizeFeature.panel1.clientWidth === 0 ? this.resizeFeature.maximise() : '' + this.resizeFeature.panel.clientWidth === 0 ? this.resizeFeature.showPanel() : '' }) this.mainPanel.events.on('toggle', () => { - this.resizeFeature.maximise() + this.resizeFeature.showPanel() }) this.verticalIcon.select('fileExplorers') diff --git a/src/lib/panels-resize.js b/src/lib/panels-resize.js index a32006866f..0602e6134c 100644 --- a/src/lib/panels-resize.js +++ b/src/lib/panels-resize.js @@ -3,11 +3,10 @@ const csjs = require('csjs-inject') const css = csjs` .dragbar { - width : 4px; + width : 1px; height : 100%; cursor : col-resize; z-index : 999; - /* border-right : 2px solid var(--primary); */ } .ghostbar { width : 3px; @@ -21,88 +20,74 @@ const css = csjs` } ` -/* -* opt: -* minWidth : minimn width for panels -* x : position of gutter at load -* -* -*/ export default class PanelsResize { - constructor (idpanel1, idpanel2, opt) { - var panel1 = document.querySelector(idpanel1) - var panel2 = document.querySelector(idpanel2) - this.panel1 = panel1 - this.panel2 = panel2 - this.opt = opt + constructor (panel) { + this.panel = panel + let self = this; + const string = panel.style.minWidth + this.minWidth = string.length > 2 ? parseInt(string.substring(0, string.length - 2)) : 0 + window.addEventListener('resize', function (event) { + self.setPosition(event) + }) + } - var ghostbar = yo`
` + render () { + this.ghostbar = yo`
` let mousedown = (event) => { event.preventDefault() if (event.which === 1) { moveGhostbar(event) - document.body.appendChild(ghostbar) + document.body.appendChild(this.ghostbar) document.addEventListener('mousemove', moveGhostbar) document.addEventListener('mouseup', removeGhostbar) document.addEventListener('keydown', cancelGhostbar) } } - + let cancelGhostbar = (event) => { if (event.keyCode === 27) { - document.body.removeChild(ghostbar) + document.body.removeChild(this.ghostbar) document.removeEventListener('mousemove', moveGhostbar) document.removeEventListener('mouseup', removeGhostbar) document.removeEventListener('keydown', cancelGhostbar) } } - let moveGhostbar = (event) => { // @NOTE VERTICAL ghostbar - let p = processPositions(event) - if (p.panel1Width <= opt.minWidth || p.panel2Width <= opt.minWidth) return - ghostbar.style.left = event.x + 'px' - } - - let setPosition = (event) => { - let p = processPositions(event) - panel1.style.width = p.panel1Width + 'px' - panel2.style.left = p.panel2left + 'px' - panel2.style.width = p.panel2Width + 'px' + let moveGhostbar = (event) => { + this.ghostbar.style.left = event.x + 'px' } let removeGhostbar = (event) => { - document.body.removeChild(ghostbar) + document.body.removeChild(this.ghostbar) document.removeEventListener('mousemove', moveGhostbar) document.removeEventListener('mouseup', removeGhostbar) document.removeEventListener('keydown', cancelGhostbar) - setPosition(event) + this.setPosition(event) } - let processPositions = (event) => { - let panel1Width = event.x - panel1.offsetLeft - panel1Width = panel1Width < opt.minWidth ? opt.minWidth : panel1Width - let panel2left = panel1.offsetLeft + panel1Width - let panel2Width = panel2.parentElement.clientWidth - panel1.offsetLeft - panel1Width - panel2Width = panel2Width < opt.minWidth ? opt.minWidth : panel2Width - return { panel1Width, panel2left, panel2Width } - } - - window.addEventListener('resize', function (event) { - setPosition({ x: panel1.offsetLeft + panel1.clientWidth }) - }) + return yo`
` + } - var dragbar = yo`
` - panel1.appendChild(dragbar) + calculatePanelWidth (event) { + return event.x - this.panel.offsetLeft + } - setPosition(opt) + setPosition (event) { + let panelWidth = this.calculatePanelWidth(event) + // close the panel if the width is less than a minWidth + if (panelWidth > this.minWidth - 10 || this.panel.style.display == 'none') { + this.panel.style.width = panelWidth + 'px' + this.showPanel() + } else this.hidePanel() } - minimize () { - this.panel1.style.display = 'none' + hidePanel () { + this.panel.style.display = 'none' } - maximise () { - this.panel1.style.display = 'flex' + showPanel () { + this.panel.style.display = 'flex' } } + From 50927371167f2db15c99a9c9babb0d7d25bbcff3 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 19 Aug 2019 14:32:29 +0200 Subject: [PATCH 16/26] add API for returning a setting key --- src/app/tabs/settings-tab.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/app/tabs/settings-tab.js b/src/app/tabs/settings-tab.js index 9b2a1e6444..e4872e6aaf 100644 --- a/src/app/tabs/settings-tab.js +++ b/src/app/tabs/settings-tab.js @@ -10,7 +10,7 @@ import * as packageJson from '../../../package.json' const profile = { name: 'settings', displayName: 'Settings', - methods: [], + methods: ['getConfigByKey'], events: [], icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMTUyIDg5NnEwLTEwNi03NS0xODF0LTE4MS03NS0xODEgNzUtNzUgMTgxIDc1IDE4MSAxODEgNzUgMTgxLTc1IDc1LTE4MXptNTEyLTEwOXYyMjJxMCAxMi04IDIzdC0yMCAxM2wtMTg1IDI4cS0xOSA1NC0zOSA5MSAzNSA1MCAxMDcgMTM4IDEwIDEyIDEwIDI1dC05IDIzcS0yNyAzNy05OSAxMDh0LTk0IDcxcS0xMiAwLTI2LTlsLTEzOC0xMDhxLTQ0IDIzLTkxIDM4LTE2IDEzNi0yOSAxODYtNyAyOC0zNiAyOGgtMjIycS0xNCAwLTI0LjUtOC41dC0xMS41LTIxLjVsLTI4LTE4NHEtNDktMTYtOTAtMzdsLTE0MSAxMDdxLTEwIDktMjUgOS0xNCAwLTI1LTExLTEyNi0xMTQtMTY1LTE2OC03LTEwLTctMjMgMC0xMiA4LTIzIDE1LTIxIDUxLTY2LjV0NTQtNzAuNXEtMjctNTAtNDEtOTlsLTE4My0yN3EtMTMtMi0yMS0xMi41dC04LTIzLjV2LTIyMnEwLTEyIDgtMjN0MTktMTNsMTg2LTI4cTE0LTQ2IDM5LTkyLTQwLTU3LTEwNy0xMzgtMTAtMTItMTAtMjQgMC0xMCA5LTIzIDI2LTM2IDk4LjUtMTA3LjV0OTQuNS03MS41cTEzIDAgMjYgMTBsMTM4IDEwN3E0NC0yMyA5MS0zOCAxNi0xMzYgMjktMTg2IDctMjggMzYtMjhoMjIycTE0IDAgMjQuNSA4LjV0MTEuNSAyMS41bDI4IDE4NHE0OSAxNiA5MCAzN2wxNDItMTA3cTktOSAyNC05IDEzIDAgMjUgMTAgMTI5IDExOSAxNjUgMTcwIDcgOCA3IDIyIDAgMTItOCAyMy0xNSAyMS01MSA2Ni41dC01NCA3MC41cTI2IDUwIDQxIDk4bDE4MyAyOHExMyAyIDIxIDEyLjV0OCAyMy41eiIvPjwvc3ZnPg==', description: 'Remix-IDE settings', @@ -162,4 +162,8 @@ module.exports = class SettingsTab extends ViewPlugin { this._deps.themeModule.switchTheme() return this._view.el } + + configByKey (key) { + return new Promise((resolve, reject) => resolve(this.config.get(`settings/${key}`))) + } } From 7fc26ecd152e9fde186aa98d5e1ea45e5c80c8b9 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Mon, 19 Aug 2019 14:38:25 +0200 Subject: [PATCH 17/26] renamed editor-container id to main-panel --- src/app.js | 2 +- test-browser/commands/checkTerminalFilter.js | 4 ++-- test-browser/commands/testFunction.js | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/app.js b/src/app.js index 54e14404eb..3684485629 100644 --- a/src/app.js +++ b/src/app.js @@ -163,7 +163,7 @@ class App { // handle the editor + terminal self._view.mainpanel = yo` -
+
${''}
` diff --git a/test-browser/commands/checkTerminalFilter.js b/test-browser/commands/checkTerminalFilter.js index 8cc90327da..810cb2b2ac 100644 --- a/test-browser/commands/checkTerminalFilter.js +++ b/test-browser/commands/checkTerminalFilter.js @@ -17,10 +17,10 @@ function checkFilter (browser, filter, test, done) { done() return } - var filterClass = '#editor-container div[class^="search"] input[class^="filter"]' + var filterClass = '#main-panel div[class^="search"] input[class^="filter"]' browser.setValue(filterClass, filter, function () { browser.execute(function () { - return document.querySelector('#editor-container div[class^="journal"]').innerHTML === test + return document.querySelector('#main-panel div[class^="journal"]').innerHTML === test }, [], function (result) { browser.clearValue(filterClass).setValue(filterClass, '', function () { if (!result.value) { diff --git a/test-browser/commands/testFunction.js b/test-browser/commands/testFunction.js index 18f72b88a5..b201158331 100644 --- a/test-browser/commands/testFunction.js +++ b/test-browser/commands/testFunction.js @@ -16,12 +16,12 @@ class TestFunction extends EventEmitter { }) .click('.instance button[title="' + fnFullName + '"]') .pause(500) - .waitForElementPresent('#editor-container div[class^="terminal"] span[id="tx' + txHash + '"]') - .assert.containsText('#editor-container div[class^="terminal"] span[id="tx' + txHash + '"] span', log) - .click('#editor-container div[class^="terminal"] span[id="tx' + txHash + '"] div[class^="log"]') + .waitForElementPresent('#main-panel div[class^="terminal"] span[id="tx' + txHash + '"]') + .assert.containsText('#main-panel div[class^="terminal"] span[id="tx' + txHash + '"] span', log) + .click('#main-panel div[class^="terminal"] span[id="tx' + txHash + '"] div[class^="log"]') .perform(function (client, done) { if (expectedReturn) { - client.getText('#editor-container div[class^="terminal"] span[id="tx' + txHash + '"] table[class^="txTable"] #decodedoutput', (result) => { + client.getText('#main-panel div[class^="terminal"] span[id="tx' + txHash + '"] table[class^="txTable"] #decodedoutput', (result) => { console.log(result) var equal = deepequal(JSON.parse(result.value), JSON.parse(expectedReturn)) if (!equal) { @@ -33,7 +33,7 @@ class TestFunction extends EventEmitter { }) .perform((client, done) => { if (expectedEvent) { - client.getText('#editor-container div[class^="terminal"] span[id="tx' + txHash + '"] table[class^="txTable"] #logs', (result) => { + client.getText('#main-panel div[class^="terminal"] span[id="tx' + txHash + '"] table[class^="txTable"] #logs', (result) => { console.log(result) var equal = deepequal(JSON.parse(result.value), JSON.parse(expectedEvent)) if (!equal) { From 26d93f3386649e71ff5c492805f4253f8e122399 Mon Sep 17 00:00:00 2001 From: LianaHus Date: Mon, 19 Aug 2019 14:40:31 +0200 Subject: [PATCH 18/26] standard --- src/lib/panels-resize.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lib/panels-resize.js b/src/lib/panels-resize.js index 0602e6134c..6d9fa57053 100644 --- a/src/lib/panels-resize.js +++ b/src/lib/panels-resize.js @@ -23,7 +23,7 @@ const css = csjs` export default class PanelsResize { constructor (panel) { this.panel = panel - let self = this; + let self = this const string = panel.style.minWidth this.minWidth = string.length > 2 ? parseInt(string.substring(0, string.length - 2)) : 0 window.addEventListener('resize', function (event) { @@ -44,7 +44,7 @@ export default class PanelsResize { document.addEventListener('keydown', cancelGhostbar) } } - + let cancelGhostbar = (event) => { if (event.keyCode === 27) { document.body.removeChild(this.ghostbar) @@ -76,7 +76,7 @@ export default class PanelsResize { setPosition (event) { let panelWidth = this.calculatePanelWidth(event) // close the panel if the width is less than a minWidth - if (panelWidth > this.minWidth - 10 || this.panel.style.display == 'none') { + if (panelWidth > this.minWidth - 10 || this.panel.style.display === 'none') { this.panel.style.width = panelWidth + 'px' this.showPanel() } else this.hidePanel() From 78ded40599b82b6c398b3296f8b0f80b29e4a303 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 19 Aug 2019 15:54:34 +0200 Subject: [PATCH 19/26] getGithubAccessToken API --- src/app/tabs/settings-tab.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/app/tabs/settings-tab.js b/src/app/tabs/settings-tab.js index e4872e6aaf..2038c5f137 100644 --- a/src/app/tabs/settings-tab.js +++ b/src/app/tabs/settings-tab.js @@ -10,14 +10,15 @@ import * as packageJson from '../../../package.json' const profile = { name: 'settings', displayName: 'Settings', - methods: ['getConfigByKey'], + methods: ['getGithubAccessToken'], events: [], icon: 'data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4KPHN2ZyB3aWR0aD0iMTc5MiIgaGVpZ2h0PSIxNzkyIiB2aWV3Qm94PSIwIDAgMTc5MiAxNzkyIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciPjxwYXRoIGQ9Ik0xMTUyIDg5NnEwLTEwNi03NS0xODF0LTE4MS03NS0xODEgNzUtNzUgMTgxIDc1IDE4MSAxODEgNzUgMTgxLTc1IDc1LTE4MXptNTEyLTEwOXYyMjJxMCAxMi04IDIzdC0yMCAxM2wtMTg1IDI4cS0xOSA1NC0zOSA5MSAzNSA1MCAxMDcgMTM4IDEwIDEyIDEwIDI1dC05IDIzcS0yNyAzNy05OSAxMDh0LTk0IDcxcS0xMiAwLTI2LTlsLTEzOC0xMDhxLTQ0IDIzLTkxIDM4LTE2IDEzNi0yOSAxODYtNyAyOC0zNiAyOGgtMjIycS0xNCAwLTI0LjUtOC41dC0xMS41LTIxLjVsLTI4LTE4NHEtNDktMTYtOTAtMzdsLTE0MSAxMDdxLTEwIDktMjUgOS0xNCAwLTI1LTExLTEyNi0xMTQtMTY1LTE2OC03LTEwLTctMjMgMC0xMiA4LTIzIDE1LTIxIDUxLTY2LjV0NTQtNzAuNXEtMjctNTAtNDEtOTlsLTE4My0yN3EtMTMtMi0yMS0xMi41dC04LTIzLjV2LTIyMnEwLTEyIDgtMjN0MTktMTNsMTg2LTI4cTE0LTQ2IDM5LTkyLTQwLTU3LTEwNy0xMzgtMTAtMTItMTAtMjQgMC0xMCA5LTIzIDI2LTM2IDk4LjUtMTA3LjV0OTQuNS03MS41cTEzIDAgMjYgMTBsMTM4IDEwN3E0NC0yMyA5MS0zOCAxNi0xMzYgMjktMTg2IDctMjggMzYtMjhoMjIycTE0IDAgMjQuNSA4LjV0MTEuNSAyMS41bDI4IDE4NHE0OSAxNiA5MCAzN2wxNDItMTA3cTktOSAyNC05IDEzIDAgMjUgMTAgMTI5IDExOSAxNjUgMTcwIDcgOCA3IDIyIDAgMTItOCAyMy0xNSAyMS01MSA2Ni41dC01NCA3MC41cTI2IDUwIDQxIDk4bDE4MyAyOHExMyAyIDIxIDEyLjV0OCAyMy41eiIvPjwvc3ZnPg==', description: 'Remix-IDE settings', kind: 'settings', location: 'sidePanel', documentation: 'https://remix-ide.readthedocs.io/en/latest/settings.html', - version: packageJson.version + version: packageJson.version, + permission: true } module.exports = class SettingsTab extends ViewPlugin { @@ -162,8 +163,8 @@ module.exports = class SettingsTab extends ViewPlugin { this._deps.themeModule.switchTheme() return this._view.el } - - configByKey (key) { - return new Promise((resolve, reject) => resolve(this.config.get(`settings/${key}`))) + + getGithubAccessToken () { + return this.config.get('settings/gist-access-token') } } From f3ac51d620ad61eabbaec76ede2cfc18e0c9e092 Mon Sep 17 00:00:00 2001 From: yann300 Date: Mon, 19 Aug 2019 16:22:21 +0200 Subject: [PATCH 20/26] mythx url --- src/remixAppManager.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/remixAppManager.js b/src/remixAppManager.js index 69e65c8ad2..8687c0883a 100644 --- a/src/remixAppManager.js +++ b/src/remixAppManager.js @@ -136,7 +136,7 @@ export class RemixAppManager extends PluginEngine { 'solidity': ['compilationFinished'] }, version: '0.1.0-beta', - url: 'https://remix-mythx-plugin.surge.sh', + url: 'https://remythx.xyz', description: 'Perform Static and Dynamic Security Analysis using the MythX Cloud Service', icon: 'https://remix-mythx-plugin.surge.sh/logo.png', location: 'sidePanel', From a879a09f83ece870698a5a4222844ab46f6e707f Mon Sep 17 00:00:00 2001 From: LianaHus Date: Tue, 20 Aug 2019 10:21:50 +0200 Subject: [PATCH 21/26] let => const --- src/lib/panels-resize.js | 14 +++++--------- test-browser/commands/checkTerminalFilter.js | 2 +- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/lib/panels-resize.js b/src/lib/panels-resize.js index 6d9fa57053..2ec2447f28 100644 --- a/src/lib/panels-resize.js +++ b/src/lib/panels-resize.js @@ -23,18 +23,14 @@ const css = csjs` export default class PanelsResize { constructor (panel) { this.panel = panel - let self = this const string = panel.style.minWidth this.minWidth = string.length > 2 ? parseInt(string.substring(0, string.length - 2)) : 0 - window.addEventListener('resize', function (event) { - self.setPosition(event) - }) } render () { this.ghostbar = yo`
` - let mousedown = (event) => { + const mousedown = (event) => { event.preventDefault() if (event.which === 1) { moveGhostbar(event) @@ -45,7 +41,7 @@ export default class PanelsResize { } } - let cancelGhostbar = (event) => { + const cancelGhostbar = (event) => { if (event.keyCode === 27) { document.body.removeChild(this.ghostbar) document.removeEventListener('mousemove', moveGhostbar) @@ -54,11 +50,11 @@ export default class PanelsResize { } } - let moveGhostbar = (event) => { + const moveGhostbar = (event) => { this.ghostbar.style.left = event.x + 'px' } - let removeGhostbar = (event) => { + const removeGhostbar = (event) => { document.body.removeChild(this.ghostbar) document.removeEventListener('mousemove', moveGhostbar) document.removeEventListener('mouseup', removeGhostbar) @@ -74,7 +70,7 @@ export default class PanelsResize { } setPosition (event) { - let panelWidth = this.calculatePanelWidth(event) + const panelWidth = this.calculatePanelWidth(event) // close the panel if the width is less than a minWidth if (panelWidth > this.minWidth - 10 || this.panel.style.display === 'none') { this.panel.style.width = panelWidth + 'px' diff --git a/test-browser/commands/checkTerminalFilter.js b/test-browser/commands/checkTerminalFilter.js index 810cb2b2ac..e448599bbb 100644 --- a/test-browser/commands/checkTerminalFilter.js +++ b/test-browser/commands/checkTerminalFilter.js @@ -17,7 +17,7 @@ function checkFilter (browser, filter, test, done) { done() return } - var filterClass = '#main-panel div[class^="search"] input[class^="filter"]' + const filterClass = '#main-panel div[class^="search"] input[class^="filter"]' browser.setValue(filterClass, filter, function () { browser.execute(function () { return document.querySelector('#main-panel div[class^="journal"]').innerHTML === test From e3ff5a4f353b5c5b3e090971d22c8dbb8102a4e6 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Tue, 20 Aug 2019 11:08:21 +0200 Subject: [PATCH 22/26] fixed the width of error messages --- src/app/tabs/styles/compile-tab-styles.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/tabs/styles/compile-tab-styles.js b/src/app/tabs/styles/compile-tab-styles.js index c6033d3d33..1c64be56a5 100644 --- a/src/app/tabs/styles/compile-tab-styles.js +++ b/src/app/tabs/styles/compile-tab-styles.js @@ -147,6 +147,7 @@ const css = csjs` .errorBlobs { padding-left: 5px; padding-right: 5px; + word-break: break-all; } .spinningIcon { From a88d4de8b5b5d45edf67e9fca9c108513aa3985a Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Tue, 20 Aug 2019 14:02:22 +0200 Subject: [PATCH 23/26] Update side-panel.js --- src/app/components/side-panel.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/components/side-panel.js b/src/app/components/side-panel.js index 69764218d0..874e5ddc56 100644 --- a/src/app/components/side-panel.js +++ b/src/app/components/side-panel.js @@ -5,6 +5,7 @@ const yo = require('yo-yo') const css = csjs` .panel { + width: 100%; height: 100%; display: flex; flex-direction: column; From 50bea595609c9b2cbaeeba6e55ba7c9f795af4a1 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Tue, 20 Aug 2019 14:03:35 +0200 Subject: [PATCH 24/26] Update run-tab.js --- src/app/udapp/run-tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/udapp/run-tab.js b/src/app/udapp/run-tab.js index 2dd196146d..bf31dc14b0 100644 --- a/src/app/udapp/run-tab.js +++ b/src/app/udapp/run-tab.js @@ -74,7 +74,7 @@ export class RunTab extends LibraryPlugin { } renderContainer () { - this.container = yo`
` + this.container = yo`
` var el = yo`
From 663b6ed0a421dc969cfc2367590d4c9986b21c17 Mon Sep 17 00:00:00 2001 From: Liana Husikyan Date: Tue, 20 Aug 2019 14:05:41 +0200 Subject: [PATCH 25/26] Update run-tab.js --- src/app/udapp/run-tab.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/app/udapp/run-tab.js b/src/app/udapp/run-tab.js index bf31dc14b0..68b6d7d1b4 100644 --- a/src/app/udapp/run-tab.js +++ b/src/app/udapp/run-tab.js @@ -74,7 +74,7 @@ export class RunTab extends LibraryPlugin { } renderContainer () { - this.container = yo`
` + this.container = yo`
` var el = yo`
From e38c8e593ce80704382259c0987e9eaf6fc5467c Mon Sep 17 00:00:00 2001 From: yann300 Date: Tue, 20 Aug 2019 17:51:32 +0200 Subject: [PATCH 26/26] activate 3box during workshop activation --- src/app/ui/landing-page/landing-page.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/app/ui/landing-page/landing-page.js b/src/app/ui/landing-page/landing-page.js index b96227ef9c..c7043935ec 100644 --- a/src/app/ui/landing-page/landing-page.js +++ b/src/app/ui/landing-page/landing-page.js @@ -136,6 +136,7 @@ export class LandingPage extends ViewPlugin { this.verticalIcons.select('vyper') } const startWorkshop = () => { + this.appManager.ensureActivated('box') this.appManager.ensureActivated('solidity') this.appManager.ensureActivated('solidityUnitTesting') this.appManager.ensureActivated('workshops')