From e80c4fadea7cc60488bf4a17e9b34ea70ef4914a Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 1 Dec 2017 18:18:48 +0000 Subject: [PATCH 01/11] Linting --- src/components/structures/RoomSubList.js | 29 +++++++++++------------- 1 file changed, 13 insertions(+), 16 deletions(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index e1b2f96e..9ad265dc 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -327,40 +327,37 @@ var RoomSubList = React.createClass({ }, calcManualOrderTagData: function(room) { - var index = this.state.sortedList.indexOf(room); + const index = this.state.sortedList.indexOf(room); // we sort rooms by the lexicographic ordering of the 'order' metadata on their tags. // for convenience, we calculate this for now a floating point number between 0.0 and 1.0. - var orderA = 0.0; // by default we're next to the beginning of the list + let orderA = 0.0; // by default we're next to the beginning of the list if (index > 0) { - var prevTag = this.state.sortedList[index - 1].tags[this.props.tagName]; + const prevTag = this.state.sortedList[index - 1].tags[this.props.tagName]; if (!prevTag) { - console.error("Previous room in sublist is not tagged to be in this list. This should never happen.") - } - else if (prevTag.order === undefined) { + console.error("Previous room in sublist is not tagged to be in this list. This should never happen."); + } else if (prevTag.order === undefined) { console.error("Previous room in sublist has no ordering metadata. This should never happen."); - } - else { + } else { orderA = prevTag.order; } } - var orderB = 1.0; // by default we're next to the end of the list too + let orderB = 1.0; // by default we're next to the end of the list too if (index < this.state.sortedList.length - 1) { - var nextTag = this.state.sortedList[index + 1].tags[this.props.tagName]; + const nextTag = this.state.sortedList[index + 1].tags[this.props.tagName]; if (!nextTag) { - console.error("Next room in sublist is not tagged to be in this list. This should never happen.") - } - else if (nextTag.order === undefined) { + console.error("Next room in sublist is not tagged to be in this list. This should never happen."); + } else if (nextTag.order === undefined) { console.error("Next room in sublist has no ordering metadata. This should never happen."); - } - else { + } else { orderB = nextTag.order; } } - var order = (orderA + orderB) / 2.0; + const order = (orderA + orderB) / 2.0; + if (order === orderA || order === orderB) { console.error("Cannot describe new list position. This should be incredibly unlikely."); // TODO: renumber the list From b0d115a64ac35b2a87fdcc11c7d7eec4f4228836 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Fri, 1 Dec 2017 18:20:38 +0000 Subject: [PATCH 02/11] Implement renumeration of ordered tags upon collision I was being bitten by this enough for me to want to fix it. This implementation really ought to be improved such that it doesnt tend towards being broken the more it is used. --- src/components/structures/RoomSubList.js | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RoomSubList.js b/src/components/structures/RoomSubList.js index 9ad265dc..251c6522 100644 --- a/src/components/structures/RoomSubList.js +++ b/src/components/structures/RoomSubList.js @@ -360,7 +360,13 @@ var RoomSubList = React.createClass({ if (order === orderA || order === orderB) { console.error("Cannot describe new list position. This should be incredibly unlikely."); - // TODO: renumber the list + this.state.sortedList.forEach((room, index) => { + MatrixClientPeg.get().setRoomTag( + room.roomId, this.props.tagName, + {order: index / this.state.sortedList.length}, + ); + }); + return index / this.state.sortedList.length; } return order; From 1a0c0af447a908377fd526f9eacfdde84d06ccfa Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 4 Dec 2017 12:25:54 +0000 Subject: [PATCH 03/11] Bump js-sdk to 0.9.2, react-sdk to 0.11.3 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e6d3e1f2..a4ca44ad 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,8 @@ "gfm.css": "^1.1.1", "highlight.js": "^9.0.0", "linkifyjs": "^2.1.3", - "matrix-js-sdk": "0.9.1", - "matrix-react-sdk": "0.11.2", + "matrix-js-sdk": "0.9.2", + "matrix-react-sdk": "0.11.3", "modernizr": "^3.1.0", "pako": "^1.0.5", "prop-types": "^15.5.10", From c685546e9a6e6a598fd8bdd5c5318497d9f36ea8 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 4 Dec 2017 12:25:54 +0000 Subject: [PATCH 04/11] Bump js-sdk to 0.9.2, react-sdk to 0.11.3 --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index e6d3e1f2..a4ca44ad 100644 --- a/package.json +++ b/package.json @@ -68,8 +68,8 @@ "gfm.css": "^1.1.1", "highlight.js": "^9.0.0", "linkifyjs": "^2.1.3", - "matrix-js-sdk": "0.9.1", - "matrix-react-sdk": "0.11.2", + "matrix-js-sdk": "0.9.2", + "matrix-react-sdk": "0.11.3", "modernizr": "^3.1.0", "pako": "^1.0.5", "prop-types": "^15.5.10", From 5fba5b30e92edd871f3c968b4a2d399a1a0fe839 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 4 Dec 2017 12:29:32 +0000 Subject: [PATCH 05/11] v0.13.3 --- electron_app/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/electron_app/package.json b/electron_app/package.json index 85e7358b..ad237ebe 100644 --- a/electron_app/package.json +++ b/electron_app/package.json @@ -2,7 +2,7 @@ "name": "riot-web", "productName": "Riot", "main": "src/electron-main.js", - "version": "0.13.2", + "version": "0.13.3", "description": "A feature-rich client for Matrix.org", "author": "Vector Creations Ltd.", "dependencies": { From 8ec48db86ce1c70a857a9dcbf81a42e1d630ba74 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 4 Dec 2017 12:31:50 +0000 Subject: [PATCH 06/11] Prepare changelog for v0.13.3 --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1d683290..c72ea8da 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,9 @@ +Changes in [0.13.3](https://github.com/vector-im/riot-web/releases/tag/v0.13.3) (2017-12-04) +============================================================================================ +[Full Changelog](https://github.com/vector-im/riot-web/compare/v0.13.2...v0.13.3) + + * Bump js-sdk, react-sdk version to pull in fix for [setting room publicity in a group](https://github.com/matrix-org/matrix-js-sdk/commit/aa3201ebb0fff5af2fb733080aa65ed1f7213de6). + Changes in [0.13.2](https://github.com/vector-im/riot-web/releases/tag/v0.13.2) (2017-11-28) ============================================================================================ [Full Changelog](https://github.com/vector-im/riot-web/compare/v0.13.1...v0.13.2) From b73f0c7b905732a4158293eeb38a58b19be02257 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Mon, 4 Dec 2017 12:31:50 +0000 Subject: [PATCH 07/11] v0.13.3 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a4ca44ad..050c9f32 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "riot-web", "productName": "Riot", "main": "electron_app/src/electron-main.js", - "version": "0.13.2", + "version": "0.13.3", "description": "A feature-rich client for Matrix.org", "author": "Vector Creations Ltd.", "repository": { From e0ae266bb2f367aa1701b986473cf082aa6ccdf7 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Tue, 5 Dec 2017 18:07:19 +0000 Subject: [PATCH 08/11] Make cursor pointer on menubar mouseover. --- .../vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss | 1 + 1 file changed, 1 insertion(+) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss index 8376cea7..975d16f6 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss @@ -85,6 +85,7 @@ limitations under the License. flex-direction: row; align-items: center; justify-content: space-between; + cursor: pointer; } .mx_AppTileMenuBarWidgets { From c37c50e1e03e7290eb4ab371f7004aa6d902c384 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Tue, 5 Dec 2017 18:07:49 +0000 Subject: [PATCH 09/11] Add maximise and minimise icons --- src/skins/vector/img/maximize.svg | 9 +++++++++ src/skins/vector/img/minimize.svg | 8 ++++++++ 2 files changed, 17 insertions(+) create mode 100644 src/skins/vector/img/maximize.svg create mode 100644 src/skins/vector/img/minimize.svg diff --git a/src/skins/vector/img/maximize.svg b/src/skins/vector/img/maximize.svg new file mode 100644 index 00000000..4f9e1019 --- /dev/null +++ b/src/skins/vector/img/maximize.svg @@ -0,0 +1,9 @@ + + + + + + diff --git a/src/skins/vector/img/minimize.svg b/src/skins/vector/img/minimize.svg new file mode 100644 index 00000000..410b0bc0 --- /dev/null +++ b/src/skins/vector/img/minimize.svg @@ -0,0 +1,8 @@ + + + + + + From 0ff5d6118981b6a9f4f50405f7eaba65b07fdb41 Mon Sep 17 00:00:00 2001 From: Richard Lewis Date: Tue, 5 Dec 2017 18:44:24 +0000 Subject: [PATCH 10/11] Don't capture pointer events. --- .../css/matrix-react-sdk/views/rooms/_AppsDrawer.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss b/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss index 975d16f6..2d61ca77 100644 --- a/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss +++ b/src/skins/vector/css/matrix-react-sdk/views/rooms/_AppsDrawer.scss @@ -88,12 +88,20 @@ limitations under the License. cursor: pointer; } +.mx_AppTileMenuBarTitle { + display: flex; + flex-direction: row; + align-items: center; + pointer-events: none; +} + .mx_AppTileMenuBarWidgets { float: right; display: flex; flex-direction: row; align-items: center; } + .mx_AppTileMenuBarWidget { // pointer-events: none; cursor: pointer; From 608a359e0a9ca7b3798cf860c0b11ee6ede14097 Mon Sep 17 00:00:00 2001 From: Luke Barnard Date: Wed, 6 Dec 2017 14:54:35 +0000 Subject: [PATCH 11/11] Move DND wrapper to top level component --- src/components/structures/LeftPanel.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/structures/LeftPanel.js b/src/components/structures/LeftPanel.js index fa3a593c..f78835b4 100644 --- a/src/components/structures/LeftPanel.js +++ b/src/components/structures/LeftPanel.js @@ -17,8 +17,6 @@ limitations under the License. 'use strict'; import React from 'react'; -import { DragDropContext } from 'react-dnd'; -import HTML5Backend from 'react-dnd-html5-backend'; import classNames from 'classnames'; import { KeyCode } from 'matrix-react-sdk/lib/Keyboard'; import sdk from 'matrix-react-sdk'; @@ -199,4 +197,4 @@ var LeftPanel = React.createClass({ } }); -module.exports = DragDropContext(HTML5Backend)(LeftPanel); +module.exports = LeftPanel;