From 9e565c8298e4ede4503e61ee26ee2fd8b4489330 Mon Sep 17 00:00:00 2001 From: greenkeeperio-bot Date: Thu, 12 Jan 2017 18:42:13 +0100 Subject: [PATCH 01/13] chore(package): update syn to version 0.2.2 https://greenkeeper.io/ --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 24e693296..560df04d7 100644 --- a/package.json +++ b/package.json @@ -65,7 +65,7 @@ "grunt-vulcanize": "^0.4.2", "grunt-zip": "^0.17.0", "mocha": "^3.2.0", - "syn": "0.1.5", + "syn": "0.2.2", "yaml-include-loader": "^1.0.0" }, "scripts": { From 5479df714dd92c02e71cdc3d8bdc45eb617cc276 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Thu, 19 Jan 2017 12:18:43 +0100 Subject: [PATCH 02/13] Update webcomponents.js --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a6c7c7312..a8c2bc97e 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "noflo-strings": "~0.1.12", "rtc": "^3.4.0", "the-graph": "^0.6.0", - "webcomponents.js": "0.6.0" + "webcomponents.js": "^0.7.23" }, "devDependencies": { "chai": "^3.5.0", From 87cdb57962cbfe6588418f274674f981544795c6 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Thu, 19 Jan 2017 12:22:11 +0100 Subject: [PATCH 03/13] console.time doesn't work on mobile Safari --- app/main.js | 7 ------- 1 file changed, 7 deletions(-) diff --git a/app/main.js b/app/main.js index ef517e5b4..d6d803b4c 100644 --- a/app/main.js +++ b/app/main.js @@ -1,6 +1,3 @@ -console.time('noflo-ui-init'); -console.time('polymer-ready'); - var exported = { noflo: require('noflo'), underscore: require('underscore'), @@ -79,13 +76,9 @@ window.addEventListener('polymer-ready', function() { }); }; - console.timeEnd('polymer-ready'); document.body.classList.remove('loading'); window.nofloStarted = false; - console.time('noflo-prepare'); var load = (false) ? loadGraphsDebuggable : loadGraphs; load(function() { - console.timeEnd('noflo-prepare'); - console.timeEnd('noflo-ui-init'); }); }); From 40c24d46753d4505e6b5034ac8619880951e6ec5 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Thu, 19 Jan 2017 12:34:30 +0100 Subject: [PATCH 04/13] Pass errors to callback --- app/main.js | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/app/main.js b/app/main.js index d6d803b4c..4a1ff74ba 100644 --- a/app/main.js +++ b/app/main.js @@ -26,12 +26,14 @@ window.addEventListener('polymer-ready', function() { var loadGraphs = function(callback) { noflo.graph.loadJSON(mainGraph, function (err, g) { if (err) { - throw err; + callback(err); + return; } g.baseDir = baseDir; noflo.createNetwork(g, function (err, n) { if (err) { - throw err; + callback(err); + return; } n.on('process-error', function (err) { console.log(err); @@ -44,7 +46,8 @@ window.addEventListener('polymer-ready', function() { var secret = Math.random().toString(36).substring(7); noflo.graph.loadJSON(mainGraph, function (err, graph) { if (err) { - console.log(err); + callback(err); + return; } graph.baseDir = baseDir; var runtimeOptions = { @@ -79,6 +82,10 @@ window.addEventListener('polymer-ready', function() { document.body.classList.remove('loading'); window.nofloStarted = false; var load = (false) ? loadGraphsDebuggable : loadGraphs; - load(function() { + load(function(err) { + if (err) { + throw err; + } + window.nofloStarted = true; }); }); From f2a2815da8d0f85dfd11f3b1ea130b35f56f5ba0 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Thu, 19 Jan 2017 12:56:59 +0100 Subject: [PATCH 05/13] Make the loading indicator work again --- app/main.js | 6 +++++- css/noflo-ui.css | 31 ++++++++++++++++++++++++++----- index.dist.html | 2 +- 3 files changed, 32 insertions(+), 7 deletions(-) diff --git a/app/main.js b/app/main.js index 4a1ff74ba..dbb93b0c3 100644 --- a/app/main.js +++ b/app/main.js @@ -79,13 +79,17 @@ window.addEventListener('polymer-ready', function() { }); }; - document.body.classList.remove('loading'); window.nofloStarted = false; var load = (false) ? loadGraphsDebuggable : loadGraphs; load(function(err) { if (err) { throw err; } + document.body.classList.remove('loading'); window.nofloStarted = true; + setTimeout(function () { + var loader = document.getElementById('loading'); + document.body.removeChild(loader); + }, 400); }); }); diff --git a/css/noflo-ui.css b/css/noflo-ui.css index 4f07f3ab0..7dde229ed 100644 --- a/css/noflo-ui.css +++ b/css/noflo-ui.css @@ -15,25 +15,46 @@ body { -webkit-tap-highlight-color: transparent; /* "turn off" link highlight */ } -#loading { - display: none; +body #loading { + opacity: 0; + -webkit-transition: opacity 0.3s ease-in; + -moz-transition: opacity 0.3s ease-in; + -ms-transition: opacity 0.3s ease-in; + -o-transition: opacity 0.3s ease-in; + z-index: -1; + width: 400px; + color: white; + text-align: center; + top: calc(50% - 18px); + left: calc(50% - 200px); + font-size: 36px; + position: fixed; } body.loading #loading { display: block; - position: fixed; + opacity: 1; top: calc(50% - 18px); left: calc(50% - 200px); font-size: 36px; - color: white; animation: pulsate 2s ease-in-out; animation-iteration-count: infinite; -webkit-animation: pulsate 2s ease-in-out; -webkit-animation-iteration-count: infinite; - width: 400px; text-align: center; z-index: 10; } +body noflo-ui { + opacity: 1; + transition: opacity 0.3s ease-in; + -webkit-transition: opacity 0.3s ease-in; + -moz-transition: opacity 0.3s ease-in; + -ms-transition: opacity 0.3s ease-in; + -o-transition: opacity 0.3s ease-in; +} +body.loading noflo-ui { + opacity: 0; +} @keyframes pulsate { 0% { transform: scale(1.0, 1.0); diff --git a/index.dist.html b/index.dist.html index 68ae719f8..ea1919e11 100644 --- a/index.dist.html +++ b/index.dist.html @@ -60,7 +60,7 @@ - +
$NOFLO_APP_LOADING
From 5527f28388dc0dc2d889de4c0d1199495837f348 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Thu, 19 Jan 2017 13:12:32 +0100 Subject: [PATCH 06/13] Make IndexedDB initialization errors visible --- graphs/PrepareStorage.fbp | 1 - graphs/main.fbp | 4 ++++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/graphs/PrepareStorage.fbp b/graphs/PrepareStorage.fbp index 2e509efed..bb4bfc904 100644 --- a/graphs/PrepareStorage.fbp +++ b/graphs/PrepareStorage.fbp @@ -1,4 +1,3 @@ - INPORT=Open.NAME:NAME OUTPORT=Errors.OUT:ERROR OUTPORT=Open.DB:DB diff --git a/graphs/main.fbp b/graphs/main.fbp index 57a1d82c7..ca60adb54 100644 --- a/graphs/main.fbp +++ b/graphs/main.fbp @@ -43,3 +43,7 @@ Router ROUTE -> IN Dispatch # Handle resizes ListenWindow WIDTH -> WIDTH AppView ListenWindow HEIGHT -> HEIGHT AppView + +# Display storage errors +PrepareStorage ERROR -> ERROR ErrorToCtx(ui/ErrorToContext) OUT -> CONTEXT AppView +PrepareStorage ERROR -> IN ShowErrors From 4bec49e8ce36af60555a0db89597485ff5fdc342 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Thu, 19 Jan 2017 13:29:11 +0100 Subject: [PATCH 07/13] Use the WebComponentsReady event as that is future-compatible --- app/main.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/main.js b/app/main.js index dbb93b0c3..318c5ad58 100644 --- a/app/main.js +++ b/app/main.js @@ -16,7 +16,7 @@ window.require = function (moduleName) { throw new Error('Module ' + moduleName + ' not available'); }; -window.addEventListener('polymer-ready', function() { +window.addEventListener('WebComponentsReady', function() { var noflo = require('noflo'); var runtime = require('noflo-runtime-webrtc'); From 02fa291466b41f5b2be86bcfffa2e6bb81649592 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Thu, 19 Jan 2017 15:15:41 +0100 Subject: [PATCH 08/13] Revert webcomponents.js --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a8c2bc97e..8bd38903c 100644 --- a/package.json +++ b/package.json @@ -43,7 +43,7 @@ "noflo-strings": "~0.1.12", "rtc": "^3.4.0", "the-graph": "^0.6.0", - "webcomponents.js": "^0.7.23" + "webcomponents.js": "^0.6.0" }, "devDependencies": { "chai": "^3.5.0", From 1b2b21ba2a9ac96eed9534961f70ae2243fade4b Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Thu, 19 Jan 2017 15:20:45 +0100 Subject: [PATCH 09/13] Update C++ compiler for Travis --- .travis.yml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/.travis.yml b/.travis.yml index 0ee8c4503..42b0595c6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,11 +2,19 @@ language: node_js sudo: false node_js: - '4.2' +addons: + apt: + sources: + - ubuntu-toolchain-r-test + packages: + - g++-4.8 before_install: - if [[ `npm -v` != 3* ]]; then npm i -g npm@3; fi before_script: - npm install -g grunt-cli env: + matrix: + - CXX=g++-4.8 global: - secure: SqpDxIE0eAc0s9lvm+djIcS+y+778NeoZrRSsnF6+8b6K7pYjM9A41WdYFLhcP2fb/keVKcG9nbpwtYdTXGjhe59NFHM0gE3GjML/hpfy8Y7djEIdnt3EGjNEkXAd8pB9NCMyxNUjYgUUF6w7splOR1rViXpdyig8StGtfunM+k= - secure: MGOSVmfg+zl8lco7IYcSzYVAuS9VkhK0z2z8/bcZmCeRmPh+IaeSfEaeHka1Swcr4rO0IWj4bU9fqjp8IjA/8ntlbnSZcPM4QJ0SQaXLUGOsNnmIE8X0eLe8xKKFw682qUUdm+nowtdFiCF07+aRBzLYwAzSlevZVl3NuwALrBM= From b57e7cc13f3730c59778bdb1d3268d0cd3e9d7a4 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Fri, 20 Jan 2017 15:41:54 +0100 Subject: [PATCH 10/13] Compatibility with latest syn --- spec/runner.html | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/spec/runner.html b/spec/runner.html index 7bd40f0c8..8b85d9ef3 100644 --- a/spec/runner.html +++ b/spec/runner.html @@ -16,8 +16,13 @@ - - + + From efd50ecf7fb6c3b6efb9900a07e6178143c7ee15 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Fri, 20 Jan 2017 17:02:50 +0100 Subject: [PATCH 11/13] Give longer time to connect to runtimes --- graphs/ProjectRuntime.fbp | 1 + 1 file changed, 1 insertion(+) diff --git a/graphs/ProjectRuntime.fbp b/graphs/ProjectRuntime.fbp index 55d3d9a2f..5d39f8366 100644 --- a/graphs/ProjectRuntime.fbp +++ b/graphs/ProjectRuntime.fbp @@ -11,6 +11,7 @@ HoldConnection(ui/HoldRuntimeConnection) CONTEXT -> IN ConnectedContext(core/Mer 'runtime' -> KEY GetDefinition(objects/GetObjectKey) HoldConnection CONNECT -> IN GetDefinition GetDefinition OUT -> DEFINITION Connect(runtime/ConnectRuntime) +'10000' -> TIMEOUT Connect 'body' -> SELECTOR GetParent(dom/GetElement) ELEMENT -> ELEMENT Connect 'runtime' -> KEY AddRuntime(ui/SetToContext) GetDefinition OBJECT -> CONTEXT AddRuntime From 46ae7509d33fb2bcebcb0323c0ba7221b6ec63fb Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Fri, 20 Jan 2017 17:03:09 +0100 Subject: [PATCH 12/13] Reorganize connection cycle --- graphs/RuntimeStorage.fbp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/graphs/RuntimeStorage.fbp b/graphs/RuntimeStorage.fbp index fb27a6ee3..28ff6550a 100644 --- a/graphs/RuntimeStorage.fbp +++ b/graphs/RuntimeStorage.fbp @@ -32,11 +32,11 @@ PopulateRuntimeData OUT -> CONTEXT DirectRuntime(ui/DirectRuntime) DirectRuntime CONTEXT -> IN MergeContextPreSubscribe # Get components list when connecting to new runtime -ProjectRuntime CONNECTED -> RUNTIME ListComponents(runtime/ListComponents) -DirectRuntime RUNTIME -> RUNTIME ListComponents -ListComponents OUT -> IN UpdateLibrary(ui/UpdateComponentLibrary) -ProjectRuntime CONNECTED -> RUNTIME UpdateLibrary +ProjectRuntime RUNTIME -> RUNTIME UpdateLibrary(ui/UpdateComponentLibrary) DirectRuntime RUNTIME -> RUNTIME UpdateLibrary +ProjectRuntime RUNTIME -> RUNTIME ListComponents(runtime/ListComponents) +DirectRuntime RUNTIME -> RUNTIME ListComponents +ListComponents OUT -> IN UpdateLibrary UpdateLibrary OUT -> IN MergeContext ListComponents ERROR -> IN ShowErrors From 0346fdebad0054ebba1a63366cafae3c3a355d16 Mon Sep 17 00:00:00 2001 From: Henri Bergius Date: Fri, 20 Jan 2017 17:54:33 +0100 Subject: [PATCH 13/13] Bump noflo-runtime dep --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 84a63f1fd..70c75b2ca 100644 --- a/package.json +++ b/package.json @@ -37,7 +37,7 @@ "noflo-objects": "~0.1.13", "noflo-polymer": "~0.2.0", "noflo-routers": "~0.2.2", - "noflo-runtime": "~0.3.4", + "noflo-runtime": "~0.3.8", "noflo-runtime-base": "^0.7.3", "noflo-runtime-webrtc": "~0.7.3", "noflo-strings": "~0.1.12",