From ca28f5fbe6b9fcbd0d8d149a61ece3492cbd0362 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Wed, 7 Dec 2016 08:15:30 +0100 Subject: [PATCH 01/13] fix npm install command --- Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 29a7c1075..107240d6a 100644 --- a/Makefile +++ b/Makefile @@ -37,4 +37,4 @@ $(eval $(call npm_script_targets)) # These npm run scripts are available, without needing to be mentioned in `package.json` install: - npm run install + npm install From 7df6ea27e71eb879312487e62600c29110187dc5 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Wed, 7 Dec 2016 08:44:44 +0100 Subject: [PATCH 02/13] clear timeout before setting a new one --- src/plugins/Informer.js | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/src/plugins/Informer.js b/src/plugins/Informer.js index 02de2fdc8..df3ef3ff9 100644 --- a/src/plugins/Informer.js +++ b/src/plugins/Informer.js @@ -14,6 +14,7 @@ export default class Informer extends Plugin { this.type = 'progressindicator' this.id = 'Informer' this.title = 'Informer' + this.timeoutID = undefined // set default options const defaultOptions = {} @@ -30,10 +31,14 @@ export default class Informer extends Plugin { } }) - if (duration === 0) return + window.clearTimeout(this.timeoutID) + if (duration === 0) { + this.timeoutID = undefined + return + } // hide the informer after `duration` milliseconds - setTimeout(() => { + this.timeoutID = setTimeout(() => { const newInformer = Object.assign({}, this.core.getState().informer, { isHidden: true }) From 3463ee64a7dd8902eef83da31f453b08c903d6d2 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Wed, 7 Dec 2016 11:27:00 +0100 Subject: [PATCH 03/13] Reorder status bar item order "Uploading... 1/3 - 20% - (...)" feels like the first of 3 files is uploading (whereas it means that one file is completely uploaded) This commit changes it to "Uploading... 20% - 1/3 - (...)" --- src/plugins/Dashboard/StatusBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plugins/Dashboard/StatusBar.js b/src/plugins/Dashboard/StatusBar.js index 165e63828..c281fff45 100644 --- a/src/plugins/Dashboard/StatusBar.js +++ b/src/plugins/Dashboard/StatusBar.js @@ -14,7 +14,7 @@ export default (props) => {
${props.isUploadStarted && !props.isAllComplete ? !props.isAllPaused - ? html`${pauseResumeButtons(props)} Uploading... ${props.complete} / ${props.inProgress}・${props.totalProgress || 0}%・${props.totalETA}・↑ ${props.totalSpeed}/s` + ? html`${pauseResumeButtons(props)} Uploading... ${props.totalProgress || 0}%・${props.complete} / ${props.inProgress}・${props.totalETA}・↑ ${props.totalSpeed}/s` : html`${pauseResumeButtons(props)} Paused・${props.totalProgress}%` : null } From 8c4f2ca0b168dc67c94753258e0afe7e5becca36 Mon Sep 17 00:00:00 2001 From: oliverpool Date: Wed, 7 Dec 2016 11:41:24 +0100 Subject: [PATCH 04/13] correct spaces in ETA --- src/core/Utils.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/core/Utils.js b/src/core/Utils.js index 23f92813f..a6f91a69c 100644 --- a/src/core/Utils.js +++ b/src/core/Utils.js @@ -373,11 +373,11 @@ export function prettyETA (seconds) { // Only display hours and minutes if they are greater than 0 but always // display minutes if hours is being displayed - const hoursStr = time.hours ? time.hours + 'h' : '' - const minutesStr = (time.hours || time.minutes) ? time.minutes + 'm' : '' + const hoursStr = time.hours ? time.hours + 'h ' : '' + const minutesStr = (time.hours || time.minutes) ? time.minutes + 'm ' : '' const secondsStr = time.seconds + 's' - return `${hoursStr} ${minutesStr} ${secondsStr}` + return `${hoursStr}${minutesStr}${secondsStr}` } export function makeCachingFunction () { From 9eea9d10c0fa1f1585dd4020cfdda30d5fa76bad Mon Sep 17 00:00:00 2001 From: oliverpool Date: Wed, 7 Dec 2016 11:50:23 +0100 Subject: [PATCH 05/13] add leading zero to trailing units --- src/core/Utils.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/core/Utils.js b/src/core/Utils.js index a6f91a69c..a7a15a8e4 100644 --- a/src/core/Utils.js +++ b/src/core/Utils.js @@ -373,9 +373,12 @@ export function prettyETA (seconds) { // Only display hours and minutes if they are greater than 0 but always // display minutes if hours is being displayed + // Display a leading zero if the there is a preceding unit: 1m 05s, but 5s const hoursStr = time.hours ? time.hours + 'h ' : '' - const minutesStr = (time.hours || time.minutes) ? time.minutes + 'm ' : '' - const secondsStr = time.seconds + 's' + const minutesVal = time.hours ? ('0' + time.minutes).substr(-2) : time.minutes + const minutesStr = minutesVal ? minutesVal + 'm ' : '' + const secondsVal = minutesVal ? ('0' + time.seconds).substr(-2) : time.seconds + const secondsStr = secondsVal + 's' return `${hoursStr}${minutesStr}${secondsStr}` } From a0dcb21edaf649ed4050d9d1d2aab0497f1afb81 Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Mon, 12 Dec 2016 22:40:26 -0500 Subject: [PATCH 06/13] remote progress debug --- src/plugins/Tus10.js | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plugins/Tus10.js b/src/plugins/Tus10.js index f70f7f4f3..668db7a6e 100644 --- a/src/plugins/Tus10.js +++ b/src/plugins/Tus10.js @@ -178,6 +178,7 @@ export default class Tus10 extends Plugin { }) socket.on('progress', (progressData) => { + console.log(progressData) const {progress, bytesUploaded, bytesTotal} = progressData if (progress) { From c60aecd82b557990f23dc844c33697511a5b18dd Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Mon, 12 Dec 2016 23:04:58 -0500 Subject: [PATCH 07/13] more debug --- src/plugins/Tus10.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/plugins/Tus10.js b/src/plugins/Tus10.js index 668db7a6e..6de3f6e49 100644 --- a/src/plugins/Tus10.js +++ b/src/plugins/Tus10.js @@ -161,12 +161,14 @@ export default class Tus10 extends Plugin { })) }) .then((res) => { + console.log(res) if (res.status < 200 && res.status > 300) { return reject(res.statusText) } res.json() .then((data) => { + console.log(data) // get the host domain var regex = /^(?:https?:\/\/|\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^\/\n]+)/ var host = regex.exec(file.remote.host)[1] @@ -201,6 +203,9 @@ export default class Tus10 extends Plugin { }) }) }) + .catch((err) => { + console.log(err) + }) }) } From 13d54d17cac09f58c2b986515bf5a549ac28ef59 Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Tue, 13 Dec 2016 00:21:47 -0500 Subject: [PATCH 08/13] changelog --- CHANGELOG.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b7802b7c3..9e38669c3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,13 +51,17 @@ Ideas that will be planned and find their way into a release at one point ## 0.13.0 To be released: December 23, 2016. +Theme: Mobile Dashboard, Grid and List - [ ] presets: Add basic preset or plugin that mimics Transloadit’s jQuery plugin (#28) (@arturi, @kvz) -- [ ] dashboard: “list” view in addition to current “grid” view (@arturi) -- [ ] dashboard: React component (@arturi) -- [ ] dashboard: more icons for file types? (@arturi) -- [ ] core: i18n for each plugin in options (@arturi) +- [x] dashboard: use `isWide` instead of media queries, so that compact/mobile version can be used in bigger screens too (@arturi) +- [x] dashboard: basic “list” view in addition to current “grid” view (@arturi) +- [ ] dashboard: basic React component (@arturi) +- [ ] dashboard: more icons for file types (@arturi) +- [ ] dashboard: figure out where to place Informer, accounting for StatusBar (@arturi) +- [x] core: i18n for each plugin in options (@arturi) - [ ] server: investigate a pluggable uppy-server (express / koa for now) (@ifedapoolarewaju) +- [ ] tus: fix upload progress from uppy-server (@arturi) - [ ] dashboard: consider `` element for progressbar, like here https://overcast.fm/+BtuxMygVg/ (@arturi) - [ ] uploaders: return upload result in multipart? options for that? - [x] core: fix support for both ES6 module import and CommonJS requires with `add-module-exports` babel plugin (@arturi) From d2b01795b9bf20a89156a7fb5591734b335cd5f7 Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Tue, 13 Dec 2016 11:28:30 -0500 Subject: [PATCH 09/13] changelog --- CHANGELOG.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9e38669c3..eb566a1a5 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,9 +59,12 @@ Theme: Mobile Dashboard, Grid and List - [ ] dashboard: basic React component (@arturi) - [ ] dashboard: more icons for file types (@arturi) - [ ] dashboard: figure out where to place Informer, accounting for StatusBar (@arturi) +- [ ] dragdrop: show number of selected files (@arturi) - [x] core: i18n for each plugin in options (@arturi) - [ ] server: investigate a pluggable uppy-server (express / koa for now) (@ifedapoolarewaju) -- [ ] tus: fix upload progress from uppy-server (@arturi) +- [ ] server: research having less permissions, smaller auth expiration time for security ? (@ifedapoolarewaju) +- [ ] server: smooth authentication: after auth you are back in your app where you left, no page reloads (@ifedapoolarewaju) +- [ ] tus: fix upload progress from uppy-server (@arturi, @ifedapoolarewaju) - [ ] dashboard: consider `` element for progressbar, like here https://overcast.fm/+BtuxMygVg/ (@arturi) - [ ] uploaders: return upload result in multipart? options for that? - [x] core: fix support for both ES6 module import and CommonJS requires with `add-module-exports` babel plugin (@arturi) From 4bec7fd42ddd0d8e19d487e0458f896fdedf1d4e Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Tue, 13 Dec 2016 11:28:41 -0500 Subject: [PATCH 10/13] log everything in UppySocket --- src/core/UppySocket.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/core/UppySocket.js b/src/core/UppySocket.js index 53af7b09b..d3355412c 100644 --- a/src/core/UppySocket.js +++ b/src/core/UppySocket.js @@ -51,10 +51,12 @@ export default class UppySocket { } on (action, handler) { + console.log(action) this.emitter.on(action, handler) } emit (action, payload) { + console.log(action) this.emitter.emit(action, payload) } @@ -65,6 +67,7 @@ export default class UppySocket { _handleMessage (e) { try { const message = JSON.parse(e.data) + console.log(message) this.emit(message.action, message.payload) } catch (err) { console.log(err) From 8b38ffba71611729abe9d743d7e5a744d08fdf58 Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Tue, 13 Dec 2016 11:43:38 -0500 Subject: [PATCH 11/13] Update CHANGELOG.md --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index eb566a1a5..4173280c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -48,6 +48,10 @@ Ideas that will be planned and find their way into a release at one point - [ ] uppy-server: pluggable custom providers; Maybe we use a config file or make it similar to how uppy adds plugins (@ifedapoolarewaju) - [ ] uppy-server: begin to write automated tests (@ifedapoolarewaju) +## 0.14.0 + +- [ ] server: loading indicator while the GoogleDrive/Dropbox files are loading (@arturi, @ifedapoolarewaju) + ## 0.13.0 To be released: December 23, 2016. From cfe45ad59110e3d7f8c18038cb570bae5e02a100 Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Tue, 13 Dec 2016 11:48:56 -0500 Subject: [PATCH 12/13] =?UTF-8?q?fix=20remote=20upload=20progress=20?= =?UTF-8?q?=E2=80=94=20add=20`core:upload-started`=20to=20remote=20in=20tu?= =?UTF-8?q?s?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/plugins/Tus10.js | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/src/plugins/Tus10.js b/src/plugins/Tus10.js index 6de3f6e49..98830d6b6 100644 --- a/src/plugins/Tus10.js +++ b/src/plugins/Tus10.js @@ -161,14 +161,13 @@ export default class Tus10 extends Plugin { })) }) .then((res) => { - console.log(res) if (res.status < 200 && res.status > 300) { return reject(res.statusText) } - res.json() - .then((data) => { - console.log(data) + this.core.emitter.emit('core:upload-started', file.id) + + res.json().then((data) => { // get the host domain var regex = /^(?:https?:\/\/|\/\/)?(?:[^@\/\n]+@)?(?:www\.)?([^\/\n]+)/ var host = regex.exec(file.remote.host)[1] @@ -180,13 +179,12 @@ export default class Tus10 extends Plugin { }) socket.on('progress', (progressData) => { - console.log(progressData) const {progress, bytesUploaded, bytesTotal} = progressData if (progress) { this.core.log(`Upload progress: ${progress}`) + console.log(file.id) - // Dispatch progress event this.core.emitter.emit('core:upload-progress', { uploader: this, id: file.id, @@ -203,9 +201,6 @@ export default class Tus10 extends Plugin { }) }) }) - .catch((err) => { - console.log(err) - }) }) } From 11474f14dbdfa603897eff15bda7de103715523e Mon Sep 17 00:00:00 2001 From: Artur Paikin Date: Tue, 13 Dec 2016 11:51:49 -0500 Subject: [PATCH 13/13] Update CHANGELOG.md --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 4173280c9..b3fe68d2e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,7 @@ Ideas that will be planned and find their way into a release at one point ## 0.14.0 - [ ] server: loading indicator while the GoogleDrive/Dropbox files are loading (@arturi, @ifedapoolarewaju) +- [ ] server: refactor local/remote uploads in tus, allow for pause/resume with remote upload (@arturi, @ifedapoolarewaju) ## 0.13.0