From c5ff0b1d6b011e954958b2d00d1cf05f8b834f4c Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 11 Oct 2018 15:34:40 +0100 Subject: [PATCH 1/9] js-sdk rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index e699c0f887..67faa09420 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "linkifyjs": "^2.1.6", "lodash": "^4.13.1", "lolex": "2.3.2", - "matrix-js-sdk": "0.11.1", + "matrix-js-sdk": "0.12.0-rc.1", "optimist": "^0.6.1", "pako": "^1.0.5", "prop-types": "^15.5.8", From ab35dac6e14b80fd3863915bce0567784950b180 Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 11 Oct 2018 15:37:17 +0100 Subject: [PATCH 2/9] Prepare changelog for v0.14.0-rc.1 --- CHANGELOG.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a52034d305..191651ad36 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,64 @@ +Changes in [0.14.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.14.0-rc.1) (2018-10-11) +=============================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.13.6...v0.14.0-rc.1) + + * turn LL on by default! + [\#2209](https://github.com/matrix-org/matrix-react-sdk/pull/2209) + * Update from Weblate. + [\#2207](https://github.com/matrix-org/matrix-react-sdk/pull/2207) + * Fix quote post slate update + [\#2206](https://github.com/matrix-org/matrix-react-sdk/pull/2206) + * Handle InvalidStoreError from js-sdk + [\#2205](https://github.com/matrix-org/matrix-react-sdk/pull/2205) + * Fall back to default avatar in RR when member isn't loaded yet + [\#2204](https://github.com/matrix-org/matrix-react-sdk/pull/2204) + * Update to new version of slate + [\#2202](https://github.com/matrix-org/matrix-react-sdk/pull/2202) + * Update karma to webpack 4 + [\#2203](https://github.com/matrix-org/matrix-react-sdk/pull/2203) + * More accessible buttons - take 2 + [\#2194](https://github.com/matrix-org/matrix-react-sdk/pull/2194) + * log correct error code when opening log idb + [\#2200](https://github.com/matrix-org/matrix-react-sdk/pull/2200) + * show warning when LL is disabled but was enabled before + [\#2201](https://github.com/matrix-org/matrix-react-sdk/pull/2201) + * Fall back to another store if indexeddb start fails + [\#2195](https://github.com/matrix-org/matrix-react-sdk/pull/2195) + * Silence bluebird warnings + [\#2198](https://github.com/matrix-org/matrix-react-sdk/pull/2198) + * Use createObjectURL instead of readAsDataURL for videos + [\#2197](https://github.com/matrix-org/matrix-react-sdk/pull/2197) + * Revert "Use createObjectURL instead of readAsDataURL for videos" + [\#2196](https://github.com/matrix-org/matrix-react-sdk/pull/2196) + * Track how far the user travels before dismissing their user settings + [\#2183](https://github.com/matrix-org/matrix-react-sdk/pull/2183) + * Drop (IRC) suffix hacks + [\#2193](https://github.com/matrix-org/matrix-react-sdk/pull/2193) + * Use createObjectURL instead of readAsDataURL for videos + [\#2176](https://github.com/matrix-org/matrix-react-sdk/pull/2176) + * Remove old migration code + [\#2192](https://github.com/matrix-org/matrix-react-sdk/pull/2192) + * Fix brace style in TextForEvent.js + [\#2191](https://github.com/matrix-org/matrix-react-sdk/pull/2191) + * Fix error logging + [\#2190](https://github.com/matrix-org/matrix-react-sdk/pull/2190) + * Fix Promise.defer warning in ScalarAuthClient.js + [\#2188](https://github.com/matrix-org/matrix-react-sdk/pull/2188) + * Communicate early that a 3pid is required during registration if needed + [\#2180](https://github.com/matrix-org/matrix-react-sdk/pull/2180) + * try to encourage people to attach logs to bugs + [\#2185](https://github.com/matrix-org/matrix-react-sdk/pull/2185) + * Show the 'homeserver unavailable' warning when the first sync fails + [\#2182](https://github.com/matrix-org/matrix-react-sdk/pull/2182) + * allow passing initial is_url like hs_url in query params + [\#2083](https://github.com/matrix-org/matrix-react-sdk/pull/2083) + * Update karma + [\#2177](https://github.com/matrix-org/matrix-react-sdk/pull/2177) + * fudge hangup reasons + [\#2184](https://github.com/matrix-org/matrix-react-sdk/pull/2184) + * Provide more helpful errors when i18n generation fails + [\#2181](https://github.com/matrix-org/matrix-react-sdk/pull/2181) + Changes in [0.13.6](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.13.6) (2018-10-08) ===================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.13.5...v0.13.6) From 15f08ab0a18704a70c381c01a3154862358ec66d Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 11 Oct 2018 15:39:55 +0100 Subject: [PATCH 3/9] Prepare changelog for v0.14.0-rc.1 --- CHANGELOG.md | 61 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 61 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 191651ad36..d4f2c4efa4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -59,6 +59,67 @@ Changes in [0.14.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases * Provide more helpful errors when i18n generation fails [\#2181](https://github.com/matrix-org/matrix-react-sdk/pull/2181) +Changes in [0.14.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.14.0-rc.1) (2018-10-11) +=============================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.13.6...v0.14.0-rc.1) + + * turn LL on by default! + [\#2209](https://github.com/matrix-org/matrix-react-sdk/pull/2209) + * Update from Weblate. + [\#2207](https://github.com/matrix-org/matrix-react-sdk/pull/2207) + * Fix quote post slate update + [\#2206](https://github.com/matrix-org/matrix-react-sdk/pull/2206) + * Handle InvalidStoreError from js-sdk + [\#2205](https://github.com/matrix-org/matrix-react-sdk/pull/2205) + * Fall back to default avatar in RR when member isn't loaded yet + [\#2204](https://github.com/matrix-org/matrix-react-sdk/pull/2204) + * Update to new version of slate + [\#2202](https://github.com/matrix-org/matrix-react-sdk/pull/2202) + * Update karma to webpack 4 + [\#2203](https://github.com/matrix-org/matrix-react-sdk/pull/2203) + * More accessible buttons - take 2 + [\#2194](https://github.com/matrix-org/matrix-react-sdk/pull/2194) + * log correct error code when opening log idb + [\#2200](https://github.com/matrix-org/matrix-react-sdk/pull/2200) + * show warning when LL is disabled but was enabled before + [\#2201](https://github.com/matrix-org/matrix-react-sdk/pull/2201) + * Fall back to another store if indexeddb start fails + [\#2195](https://github.com/matrix-org/matrix-react-sdk/pull/2195) + * Silence bluebird warnings + [\#2198](https://github.com/matrix-org/matrix-react-sdk/pull/2198) + * Use createObjectURL instead of readAsDataURL for videos + [\#2197](https://github.com/matrix-org/matrix-react-sdk/pull/2197) + * Revert "Use createObjectURL instead of readAsDataURL for videos" + [\#2196](https://github.com/matrix-org/matrix-react-sdk/pull/2196) + * Track how far the user travels before dismissing their user settings + [\#2183](https://github.com/matrix-org/matrix-react-sdk/pull/2183) + * Drop (IRC) suffix hacks + [\#2193](https://github.com/matrix-org/matrix-react-sdk/pull/2193) + * Use createObjectURL instead of readAsDataURL for videos + [\#2176](https://github.com/matrix-org/matrix-react-sdk/pull/2176) + * Remove old migration code + [\#2192](https://github.com/matrix-org/matrix-react-sdk/pull/2192) + * Fix brace style in TextForEvent.js + [\#2191](https://github.com/matrix-org/matrix-react-sdk/pull/2191) + * Fix error logging + [\#2190](https://github.com/matrix-org/matrix-react-sdk/pull/2190) + * Fix Promise.defer warning in ScalarAuthClient.js + [\#2188](https://github.com/matrix-org/matrix-react-sdk/pull/2188) + * Communicate early that a 3pid is required during registration if needed + [\#2180](https://github.com/matrix-org/matrix-react-sdk/pull/2180) + * try to encourage people to attach logs to bugs + [\#2185](https://github.com/matrix-org/matrix-react-sdk/pull/2185) + * Show the 'homeserver unavailable' warning when the first sync fails + [\#2182](https://github.com/matrix-org/matrix-react-sdk/pull/2182) + * allow passing initial is_url like hs_url in query params + [\#2083](https://github.com/matrix-org/matrix-react-sdk/pull/2083) + * Update karma + [\#2177](https://github.com/matrix-org/matrix-react-sdk/pull/2177) + * fudge hangup reasons + [\#2184](https://github.com/matrix-org/matrix-react-sdk/pull/2184) + * Provide more helpful errors when i18n generation fails + [\#2181](https://github.com/matrix-org/matrix-react-sdk/pull/2181) + Changes in [0.13.6](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.13.6) (2018-10-08) ===================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.13.5...v0.13.6) From 15f3d996deff9185ad443b3f7ecc97875eed848f Mon Sep 17 00:00:00 2001 From: David Baker Date: Thu, 11 Oct 2018 15:39:56 +0100 Subject: [PATCH 4/9] v0.14.0-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 67faa09420..88d93f2e6d 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "0.13.6", + "version": "0.14.0-rc.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From 259d3608ee1cff18c866aaddb8586dc34530a440 Mon Sep 17 00:00:00 2001 From: David Baker Date: Mon, 15 Oct 2018 15:23:44 +0100 Subject: [PATCH 5/9] Make rageshake use less memory If an individual log is larger than the max size, ignore the rest of it. Also build the string as we go rather than joining it all together at the end, that way we only need the whole string + one chunk in memory at once, rather than the whole string x 2. --- src/rageshake/rageshake.js | 36 ++++++++++++++++++++---------------- 1 file changed, 20 insertions(+), 16 deletions(-) diff --git a/src/rageshake/rageshake.js b/src/rageshake/rageshake.js index 4c7d8ea6c6..29dbe4f41d 100644 --- a/src/rageshake/rageshake.js +++ b/src/rageshake/rageshake.js @@ -241,20 +241,27 @@ class IndexedDBLogStore { // Returns: a string representing the concatenated logs for this ID. function fetchLogs(id) { - const o = db.transaction("logs", "readonly").objectStore("logs"); - return selectQuery(o.index("id"), IDBKeyRange.only(id), - (cursor) => { - return { - lines: cursor.value.lines, - index: cursor.value.index, + const objectStore = db.transaction("logs", "readonly").objectStore("logs"); + + return new Promise((resolve, reject) => { + const query = objectStore.index("id").openCursor(IDBKeyRange.only(id), 'next'); + let lines = ''; + query.onerror = (event) => { + reject(new Error("Query failed: " + event.target.errorCode)); + }; + query.onsuccess = (event) => { + const cursor = event.target.result; + if (!cursor) { + resolve(lines); + return; // end of results + } + lines += cursor.value.lines; + if (lines.length >= MAX_LOG_SIZE) { + resolve(lines); + } else { + cursor.continue(); + } }; - }).then((linesArray) => { - // We have been storing logs periodically, so string them all - // together *in order of index* now - linesArray.sort((a, b) => { - return a.index - b.index; - }); - return linesArray.map((l) => l.lines).join(""); }); } @@ -322,9 +329,6 @@ class IndexedDBLogStore { if (i > 0 && size + lines.length > MAX_LOG_SIZE) { // the remaining log IDs should be removed. If we go out of // bounds this is just [] - // - // XXX: there's nothing stopping the current session exceeding - // MAX_LOG_SIZE. We ought to think about culling it. removeLogIds = allLogIds.slice(i + 1); break; } From cbe642f56969d5924bb1afd3f1b73d16931b29c9 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 16 Oct 2018 10:50:02 +0100 Subject: [PATCH 6/9] released js-sdk --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 88d93f2e6d..58fe88c1f1 100644 --- a/package.json +++ b/package.json @@ -75,7 +75,7 @@ "linkifyjs": "^2.1.6", "lodash": "^4.13.1", "lolex": "2.3.2", - "matrix-js-sdk": "0.12.0-rc.1", + "matrix-js-sdk": "0.12.0", "optimist": "^0.6.1", "pako": "^1.0.5", "prop-types": "^15.5.8", From 0e69490b6a24ad22ed62d11adf47ba53ce1b5a75 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 16 Oct 2018 10:53:43 +0100 Subject: [PATCH 7/9] Prepare changelog for v0.14.0 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index d4f2c4efa4..40cb8c5283 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Changes in [0.14.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.14.0) (2018-10-16) +===================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.14.0-rc.1...v0.14.0) + + * Phased rollout of lazy loading + [\#2218](https://github.com/matrix-org/matrix-react-sdk/pull/2218) + Changes in [0.14.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v0.14.0-rc.1) (2018-10-11) =============================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v0.13.6...v0.14.0-rc.1) From cbb117552f75f63ef9023716d57f56a57b43742b Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 16 Oct 2018 10:54:19 +0100 Subject: [PATCH 8/9] v0.14.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 58fe88c1f1..93cbcd1c67 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "0.14.0-rc.1", + "version": "0.14.0", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From 8015bdfed77bc5a33ddc9aca2760639501cf422c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 16 Oct 2018 10:57:32 +0100 Subject: [PATCH 9/9] Update deps or, apparently, mostly just add 'github' prefixes --- package.json | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/package.json b/package.json index 93cbcd1c67..5b28053256 100644 --- a/package.json +++ b/package.json @@ -67,15 +67,15 @@ "flux": "2.1.1", "focus-trap-react": "^3.0.5", "fuse.js": "^2.2.0", - "gemini-scrollbar": "matrix-org/gemini-scrollbar#b302279", + "gemini-scrollbar": "github:matrix-org/gemini-scrollbar#b302279", "gfm.css": "^1.1.1", "glob": "^5.0.14", - "highlight.js": "^9.0.0", + "highlight.js": "^9.13.0", "isomorphic-fetch": "^2.2.1", "linkifyjs": "^2.1.6", "lodash": "^4.13.1", "lolex": "2.3.2", - "matrix-js-sdk": "0.12.0", + "matrix-js-sdk": "matrix-org/matrix-js-sdk#develop", "optimist": "^0.6.1", "pako": "^1.0.5", "prop-types": "^15.5.8", @@ -85,16 +85,16 @@ "react-addons-css-transition-group": "15.3.2", "react-beautiful-dnd": "^4.0.1", "react-dom": "^15.6.0", - "react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#5e97aef", + "react-gemini-scrollbar": "github:matrix-org/react-gemini-scrollbar#5e97aef", "resize-observer-polyfill": "^1.5.0", "sanitize-html": "^1.18.4", "slate": "^0.41.2", "slate-html-serializer": "^0.6.1", - "slate-md-serializer": "matrix-org/slate-md-serializer#f7c4ad3", + "slate-md-serializer": "github:matrix-org/slate-md-serializer#f7c4ad3", "slate-react": "^0.18.10", "text-encoding-utf-8": "^1.0.1", "url": "^0.11.0", - "velocity-vector": "vector-im/velocity#059e3b2", + "velocity-vector": "github:vector-im/velocity#059e3b2", "whatwg-fetch": "^1.1.1" }, "devDependencies": {