From 034c35b07e34668de22618bf7101e283455f24ae Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Fri, 6 Sep 2019 19:19:06 +0100
Subject: [PATCH 1/6] Switch to React 16.9
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
package.json | 6 ++--
yarn.lock | 86 +++++++++++++++++++++++++++++++++++++---------------
2 files changed, 65 insertions(+), 27 deletions(-)
diff --git a/package.json b/package.json
index b4e1af9f0a..70de250830 100644
--- a/package.json
+++ b/package.json
@@ -93,10 +93,10 @@
"qrcode-react": "^0.1.16",
"qs": "^6.6.0",
"querystring": "^0.2.0",
- "react": "^15.6.0",
- "react-addons-css-transition-group": "15.3.2",
+ "react": "^16.9.0",
+ "react-addons-css-transition-group": "15.6.2",
"react-beautiful-dnd": "^4.0.1",
- "react-dom": "^15.6.0",
+ "react-dom": "^16.9.0",
"react-gemini-scrollbar": "github:matrix-org/react-gemini-scrollbar#f644523",
"resize-observer-polyfill": "^1.5.0",
"sanitize-html": "^1.18.4",
diff --git a/yarn.lock b/yarn.lock
index 1989f4339a..9cfc36615a 100644
--- a/yarn.lock
+++ b/yarn.lock
@@ -1857,6 +1857,11 @@ ccount@^1.0.0:
resolved "https://registry.yarnpkg.com/ccount/-/ccount-1.0.4.tgz#9cf2de494ca84060a2a8d2854edd6dfb0445f386"
integrity sha512-fpZ81yYfzentuieinmGnphk0pLkOTMm6MZdVqwd77ROvhko6iujLNGrHH5E7utq3ygWklwfmwuG+A7P+NpqT6w==
+chain-function@^1.0.0:
+ version "1.0.1"
+ resolved "https://registry.yarnpkg.com/chain-function/-/chain-function-1.0.1.tgz#c63045e5b4b663fb86f1c6e186adaf1de402a1cc"
+ integrity sha512-SxltgMwL9uCko5/ZCLiyG2B7R9fY4pDZUw7hJ4MhirdjBLosoDqkWABi3XMucddHdLiFJMb7PD2MZifZriuMTg==
+
chalk@2.4.2, "chalk@^1.1.3 || 2.x", chalk@^2.0.0, chalk@^2.0.1, chalk@^2.1.0, chalk@^2.4.1, chalk@^2.4.2:
version "2.4.2"
resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424"
@@ -2562,6 +2567,13 @@ doctrine@^3.0.0:
dependencies:
esutils "^2.0.2"
+dom-helpers@^3.2.0:
+ version "3.4.0"
+ resolved "https://registry.yarnpkg.com/dom-helpers/-/dom-helpers-3.4.0.tgz#e9b369700f959f62ecde5a6babde4bccd9169af8"
+ integrity sha512-LnuPJ+dwqKDIyotW1VzmOZ5TONUN7CwkCR5hrgawTUbkBGYdeoNLZo6nNfGkCrjtE1nXXaj7iMMpDa8/d9WoIA==
+ dependencies:
+ "@babel/runtime" "^7.1.2"
+
dom-serialize@^2.2.0:
version "2.2.1"
resolved "https://registry.yarnpkg.com/dom-serialize/-/dom-serialize-2.2.1.tgz#562ae8999f44be5ea3076f5419dcd59eb43ac95b"
@@ -6165,7 +6177,7 @@ promise@^7.0.3, promise@^7.1.1:
dependencies:
asap "~2.0.3"
-prop-types@^15.5.10, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
+prop-types@^15.5.6, prop-types@^15.5.8, prop-types@^15.6.0, prop-types@^15.6.1, prop-types@^15.6.2, prop-types@^15.7.2:
version "15.7.2"
resolved "https://registry.yarnpkg.com/prop-types/-/prop-types-15.7.2.tgz#52c41e75b8c87e72b9d9360e0206b99dcbffa6c5"
integrity sha512-8QQikdH7//R2vurIJSutZ1smHYTcLpRWEOlHnzcWHmBYrOGUysKwSsrC89BCiFj3CbrfJ/nXFdJepOVrY1GCHQ==
@@ -6344,10 +6356,12 @@ rc@^1.2.7:
minimist "^1.2.0"
strip-json-comments "~2.0.1"
-react-addons-css-transition-group@15.3.2:
- version "15.3.2"
- resolved "https://registry.yarnpkg.com/react-addons-css-transition-group/-/react-addons-css-transition-group-15.3.2.tgz#d8fa52bec9bb61bdfde8b9e4652b80297cbff667"
- integrity sha1-2PpSvsm7Yb396LnkZSuAKXy/9mc=
+react-addons-css-transition-group@15.6.2:
+ version "15.6.2"
+ resolved "https://registry.yarnpkg.com/react-addons-css-transition-group/-/react-addons-css-transition-group-15.6.2.tgz#9e4376bcf40b5217d14ec68553081cee4b08a6d6"
+ integrity sha1-nkN2vPQLUhfRTsaFUwgc7ksIptY=
+ dependencies:
+ react-transition-group "^1.2.0"
react-beautiful-dnd@^4.0.1:
version "4.0.1"
@@ -6365,16 +6379,6 @@ react-beautiful-dnd@^4.0.1:
redux-thunk "^2.2.0"
reselect "^3.0.1"
-react-dom@^15.6.0:
- version "15.6.2"
- resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-15.6.2.tgz#41cfadf693b757faf2708443a1d1fd5a02bef730"
- integrity sha1-Qc+t9pO3V/rycIRDodH9WgK+9zA=
- dependencies:
- fbjs "^0.8.9"
- loose-envify "^1.1.0"
- object-assign "^4.1.0"
- prop-types "^15.5.10"
-
react-dom@^16.4.2:
version "16.8.6"
resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.8.6.tgz#71d6303f631e8b0097f56165ef608f051ff6e10f"
@@ -6385,6 +6389,16 @@ react-dom@^16.4.2:
prop-types "^15.6.2"
scheduler "^0.13.6"
+react-dom@^16.9.0:
+ version "16.9.0"
+ resolved "https://registry.yarnpkg.com/react-dom/-/react-dom-16.9.0.tgz#5e65527a5e26f22ae3701131bcccaee9fb0d3962"
+ integrity sha512-YFT2rxO9hM70ewk9jq0y6sQk8cL02xm4+IzYBz75CQGlClQQ1Bxq0nhHF6OtSbit+AIahujJgb/CPRibFkMNJQ==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+ prop-types "^15.6.2"
+ scheduler "^0.15.0"
+
"react-gemini-scrollbar@github:matrix-org/react-gemini-scrollbar#f644523":
version "2.1.5"
resolved "https://codeload.github.com/matrix-org/react-gemini-scrollbar/tar.gz/f64452388011d37d8a4427ba769153c30700ab8c"
@@ -6428,16 +6442,16 @@ react-redux@^5.0.6:
react-is "^16.6.0"
react-lifecycles-compat "^3.0.0"
-react@^15.6.0:
- version "15.6.2"
- resolved "https://registry.yarnpkg.com/react/-/react-15.6.2.tgz#dba0434ab439cfe82f108f0f511663908179aa72"
- integrity sha1-26BDSrQ5z+gvEI8PURZjkIF5qnI=
+react-transition-group@^1.2.0:
+ version "1.2.1"
+ resolved "https://registry.yarnpkg.com/react-transition-group/-/react-transition-group-1.2.1.tgz#e11f72b257f921b213229a774df46612346c7ca6"
+ integrity sha512-CWaL3laCmgAFdxdKbhhps+c0HRGF4c+hdM4H23+FI1QBNUyx/AMeIJGWorehPNSaKnQNOAxL7PQmqMu78CDj3Q==
dependencies:
- create-react-class "^15.6.0"
- fbjs "^0.8.9"
- loose-envify "^1.1.0"
- object-assign "^4.1.0"
- prop-types "^15.5.10"
+ chain-function "^1.0.0"
+ dom-helpers "^3.2.0"
+ loose-envify "^1.3.1"
+ prop-types "^15.5.6"
+ warning "^3.0.0"
react@^16.4.2:
version "16.8.6"
@@ -6449,6 +6463,15 @@ react@^16.4.2:
prop-types "^15.6.2"
scheduler "^0.13.6"
+react@^16.9.0:
+ version "16.9.0"
+ resolved "https://registry.yarnpkg.com/react/-/react-16.9.0.tgz#40ba2f9af13bc1a38d75dbf2f4359a5185c4f7aa"
+ integrity sha512-+7LQnFBwkiw+BobzOF6N//BdoNw0ouwmSJTEm9cglOOmsg/TMiFHZLe2sEoN5M7LgJTj9oHH0gxklfnQe66S1w==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+ prop-types "^15.6.2"
+
read-pkg-up@^3.0.0:
version "3.0.0"
resolved "https://registry.yarnpkg.com/read-pkg-up/-/read-pkg-up-3.0.0.tgz#3ed496685dba0f8fe118d0691dc51f4a1ff96f07"
@@ -6901,6 +6924,14 @@ scheduler@^0.13.6:
loose-envify "^1.1.0"
object-assign "^4.1.1"
+scheduler@^0.15.0:
+ version "0.15.0"
+ resolved "https://registry.yarnpkg.com/scheduler/-/scheduler-0.15.0.tgz#6bfcf80ff850b280fed4aeecc6513bc0b4f17f8e"
+ integrity sha512-xAefmSfN6jqAa7Kuq7LIJY0bwAPG3xlCj0HMEBQk1lxYiDKZscY2xJ5U/61ZTrYbmNQbXa+gc7czPkVo11tnCg==
+ dependencies:
+ loose-envify "^1.1.0"
+ object-assign "^4.1.1"
+
schema-utils@^1.0.0:
version "1.0.0"
resolved "https://registry.yarnpkg.com/schema-utils/-/schema-utils-1.0.0.tgz#0b79a93204d7b600d4b2850d1f66c2a34951c770"
@@ -8134,6 +8165,13 @@ walk@^2.3.9:
dependencies:
foreachasync "^3.0.0"
+warning@^3.0.0:
+ version "3.0.0"
+ resolved "https://registry.yarnpkg.com/warning/-/warning-3.0.0.tgz#32e5377cb572de4ab04753bdf8821c01ed605b7c"
+ integrity sha1-MuU3fLVy3kqwR1O9+IIcAe1gW3w=
+ dependencies:
+ loose-envify "^1.0.0"
+
watchpack@^1.5.0:
version "1.6.0"
resolved "https://registry.yarnpkg.com/watchpack/-/watchpack-1.6.0.tgz#4bc12c2ebe8aa277a71f1d3f14d685c7b446cd00"
From 0d28cd58404a80a828c2841c5aedf3af4eaef0bf Mon Sep 17 00:00:00 2001
From: Michael Telatynski <7t3chguy@gmail.com>
Date: Wed, 11 Sep 2019 11:52:39 +0100
Subject: [PATCH 2/6] RoomDirectory: show spinner if loading more results
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
---
src/components/structures/RoomDirectory.js | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/src/components/structures/RoomDirectory.js b/src/components/structures/RoomDirectory.js
index b85dc20b21..299216d022 100644
--- a/src/components/structures/RoomDirectory.js
+++ b/src/components/structures/RoomDirectory.js
@@ -1,6 +1,7 @@
/*
Copyright 2015, 2016 OpenMarket Ltd
Copyright 2019 Michael Telatynski <7t3chguy@gmail.com>
+Copyright 2019 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -140,6 +141,10 @@ module.exports = createReactClass({
getMoreRooms: function() {
if (!MatrixClientPeg.get()) return Promise.resolve();
+ this.setState({
+ loading: true,
+ });
+
const my_filter_string = this.state.filterString;
const my_server = this.state.roomServer;
// remember the next batch token when we sent the request
@@ -554,15 +559,21 @@ module.exports = createReactClass({
let content;
if (this.state.error) {
content = this.state.error;
- } else if (this.state.protocolsLoading || this.state.loading) {
+ } else if (this.state.protocolsLoading) {
content =