From 47bb6d0b252d4cd819b3b64becd9bd0fc25a9ef6 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Thu, 13 Aug 2020 12:12:10 +0100 Subject: [PATCH 01/13] Upgrade matrix-js-sdk to 8.1.0-rc.1 --- package.json | 2 +- yarn.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index 548b33f353..a788282ed2 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "is-ip": "^2.0.0", "linkifyjs": "^2.1.9", "lodash": "^4.17.19", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", + "matrix-js-sdk": "8.1.0-rc.1", "minimist": "^1.2.5", "pako": "^1.0.11", "parse5": "^5.1.1", diff --git a/yarn.lock b/yarn.lock index 98fe42ef13..d4d48c10c2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6470,9 +6470,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": - version "8.0.1" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/a6fe4cdf1cbf56baeb538f071c27326fe98630d0" +matrix-js-sdk@8.1.0-rc.1: + version "8.1.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-8.1.0-rc.1.tgz#e42ca8dae7f513f956457eeb46f03c445a3712e8" + integrity sha512-/qOSe0FQsbC2ITXhUbpjCIRAT78f2VHxKGqGMC2M2s5e2Mvpxcpu7lj/ONz5irUPd34Sqhj9KdIUnAqBbh3stQ== dependencies: "@babel/runtime" "^7.8.3" another-json "^0.2.0" From ee1ea4132d911dbafeaa3414aea09fb0b7d26bbc Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Thu, 13 Aug 2020 12:17:58 +0100 Subject: [PATCH 02/13] Prepare changelog for v3.2.0-rc.1 --- CHANGELOG.md | 66 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 468d7d211a..0bfd203b27 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,69 @@ +Changes in [3.2.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.2.0-rc.1) (2020-08-13) +============================================================================================================= +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.1.0...v3.2.0-rc.1) + + * Upgrade to JS SDK 8.1.0-rc.1 + * Update from Weblate + [\#5105](https://github.com/matrix-org/matrix-react-sdk/pull/5105) + * padding the timeline so that its scrollbar has its own space from the + resizer + [\#5103](https://github.com/matrix-org/matrix-react-sdk/pull/5103) + * Try to close notification on all platforms which support it, not just + electron + [\#5102](https://github.com/matrix-org/matrix-react-sdk/pull/5102) + * Fix exception when stripping replies from an event with a non-string body + [\#5101](https://github.com/matrix-org/matrix-react-sdk/pull/5101) + * Quick win session 24/07/2020 + [\#5056](https://github.com/matrix-org/matrix-react-sdk/pull/5056) + * Remove rebranding toast + [\#5100](https://github.com/matrix-org/matrix-react-sdk/pull/5100) + * Generate previews for rooms when the option changes + [\#5098](https://github.com/matrix-org/matrix-react-sdk/pull/5098) + * Fix Bridge Settings tab + [\#5095](https://github.com/matrix-org/matrix-react-sdk/pull/5095) + * get screen type from app prop + [\#5081](https://github.com/matrix-org/matrix-react-sdk/pull/5081) + * Update rageshake app name + [\#5093](https://github.com/matrix-org/matrix-react-sdk/pull/5093) + * Factor out Iconized Context menu for reusability + [\#5085](https://github.com/matrix-org/matrix-react-sdk/pull/5085) + * Decouple Audible notifications from Desktop notifications + [\#5088](https://github.com/matrix-org/matrix-react-sdk/pull/5088) + * Make the room sublist show more/less buttons treeitems + [\#5087](https://github.com/matrix-org/matrix-react-sdk/pull/5087) + * Share and debug master cross-signing key + [\#5092](https://github.com/matrix-org/matrix-react-sdk/pull/5092) + * Create Map comparison utilities and convert Hooks to Typescript + [\#5086](https://github.com/matrix-org/matrix-react-sdk/pull/5086) + * Fix room list scrolling in Safari + [\#5090](https://github.com/matrix-org/matrix-react-sdk/pull/5090) + * Replace Riot with Element in docs and comments + [\#5083](https://github.com/matrix-org/matrix-react-sdk/pull/5083) + * When the room view isn't active don't highlight it in room list + [\#5027](https://github.com/matrix-org/matrix-react-sdk/pull/5027) + * remove emoji icons in autocomplete/reply by designer request + [\#5073](https://github.com/matrix-org/matrix-react-sdk/pull/5073) + * Add title and icon to empty state of file and notification panel + [\#5079](https://github.com/matrix-org/matrix-react-sdk/pull/5079) + * Mass redact ignore room creation events + [\#5045](https://github.com/matrix-org/matrix-react-sdk/pull/5045) + * Replace all chevrons with a single icon + [\#5067](https://github.com/matrix-org/matrix-react-sdk/pull/5067) + * Replace i18n generation script with something matching our project + [\#5077](https://github.com/matrix-org/matrix-react-sdk/pull/5077) + * Handle tag changes in sticky room updates + [\#5078](https://github.com/matrix-org/matrix-react-sdk/pull/5078) + * Remove leftover bits of TSLint + [\#5075](https://github.com/matrix-org/matrix-react-sdk/pull/5075) + * Clean up documentation of Whenable + fix other code concerns + [\#5076](https://github.com/matrix-org/matrix-react-sdk/pull/5076) + * Center the jump down/up icon, looks misaligned + [\#5074](https://github.com/matrix-org/matrix-react-sdk/pull/5074) + * [WIP] Support a new settings structure + [\#5058](https://github.com/matrix-org/matrix-react-sdk/pull/5058) + * Convert SettingsStore to TypeScript + [\#5062](https://github.com/matrix-org/matrix-react-sdk/pull/5062) + Changes in [3.1.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.1.0) (2020-08-05) =================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.1.0-rc.1...v3.1.0) From 8e8a2e602b55d9b2ad3f9df6618a6f0a1d0f1ffd Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Thu, 13 Aug 2020 12:17:59 +0100 Subject: [PATCH 03/13] v3.2.0-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index a788282ed2..a4aa5b1e9c 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "3.1.0", + "version": "3.2.0-rc.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From df65d03473a12918d7d0f26f485e61f193d040eb Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Thu, 13 Aug 2020 19:24:11 +0100 Subject: [PATCH 04/13] Fix action bar safe area regression The action bar was recently moved, but the safe area was not, which left a gap between the event and the action bar, making it quite easy to trigger hover on a different event instead of reaching the action bar. Fixes https://github.com/vector-im/element-web/issues/14953 Regressed by https://github.com/matrix-org/matrix-react-sdk/pull/5056 --- res/css/views/messages/_MessageActionBar.scss | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/res/css/views/messages/_MessageActionBar.scss b/res/css/views/messages/_MessageActionBar.scss index d2ff551668..1254b496b5 100644 --- a/res/css/views/messages/_MessageActionBar.scss +++ b/res/css/views/messages/_MessageActionBar.scss @@ -41,7 +41,7 @@ limitations under the License. width: calc(10px + 48px + 100% + 8px); // safe area + action bar height: calc(20px + 100%); - top: -20px; + top: -12px; left: -58px; z-index: -1; cursor: initial; From 38701f3e715ca53cc263773048977179c860f614 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Thu, 13 Aug 2020 16:29:25 +0100 Subject: [PATCH 05/13] Fix /op slash command (cherry picked from commit 3f2c1500e54d83916625bbe4d1b7e28b692be721) --- src/SlashCommands.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/SlashCommands.tsx b/src/SlashCommands.tsx index 2063ad3149..50a49ccf1c 100644 --- a/src/SlashCommands.tsx +++ b/src/SlashCommands.tsx @@ -733,7 +733,7 @@ export const Commands = [ const cli = MatrixClientPeg.get(); const room = cli.getRoom(roomId); if (!room) return reject(_t("Command failed")); - const member = room.getMember(args); + const member = room.getMember(userId); if (!member || getEffectiveMembership(member.membership) === EffectiveMembership.Leave) { return reject(_t("Could not find user in room")); } From d34f166187bcf68fbe82754856631603f11ecacf Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 14 Aug 2020 13:22:52 +0100 Subject: [PATCH 06/13] Message Action Bar, subscribe to localEventIdReplaced events --- src/components/views/messages/MessageActionBar.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/components/views/messages/MessageActionBar.js b/src/components/views/messages/MessageActionBar.js index 513f21b8b7..fa722a1e06 100644 --- a/src/components/views/messages/MessageActionBar.js +++ b/src/components/views/messages/MessageActionBar.js @@ -116,11 +116,13 @@ export default class MessageActionBar extends React.PureComponent { componentDidMount() { this.props.mxEvent.on("Event.decrypted", this.onDecrypted); this.props.mxEvent.on("Event.beforeRedaction", this.onBeforeRedaction); + this.props.mxEvent.on("Event.localEventIdReplaced", this.onEcho); } componentWillUnmount() { this.props.mxEvent.removeListener("Event.decrypted", this.onDecrypted); this.props.mxEvent.removeListener("Event.beforeRedaction", this.onBeforeRedaction); + this.props.mxEvent.removeListener("Event.localEventIdReplaced", this.onEcho); } onDecrypted = () => { @@ -134,6 +136,11 @@ export default class MessageActionBar extends React.PureComponent { this.forceUpdate(); }; + onEcho = () => { + // When an event is sent and echoed the possible actions change. + this.forceUpdate(); + }; + onFocusChange = (focused) => { if (!this.props.onFocusChange) { return; From 1f6ec421f45eea48e9794e0348765fdd7806a589 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 14 Aug 2020 13:30:27 +0100 Subject: [PATCH 07/13] Make event subscriptions conditional when needed --- src/components/views/messages/MessageActionBar.js | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/src/components/views/messages/MessageActionBar.js b/src/components/views/messages/MessageActionBar.js index fa722a1e06..043fe1a985 100644 --- a/src/components/views/messages/MessageActionBar.js +++ b/src/components/views/messages/MessageActionBar.js @@ -114,15 +114,19 @@ export default class MessageActionBar extends React.PureComponent { static contextType = RoomContext; componentDidMount() { - this.props.mxEvent.on("Event.decrypted", this.onDecrypted); + if (this.props.mxEvent.isBeingDecrypted()) { + this.props.mxEvent.once("Event.decrypted", this.onDecrypted); + } this.props.mxEvent.on("Event.beforeRedaction", this.onBeforeRedaction); - this.props.mxEvent.on("Event.localEventIdReplaced", this.onEcho); + if (this.props.mxEvent.getId()[0] !== "!") { + this.props.mxEvent.once("Event.localEventIdReplaced", this.onEcho); + } } componentWillUnmount() { - this.props.mxEvent.removeListener("Event.decrypted", this.onDecrypted); - this.props.mxEvent.removeListener("Event.beforeRedaction", this.onBeforeRedaction); - this.props.mxEvent.removeListener("Event.localEventIdReplaced", this.onEcho); + this.props.mxEvent.off("Event.decrypted", this.onDecrypted); + this.props.mxEvent.off("Event.beforeRedaction", this.onBeforeRedaction); + this.props.mxEvent.off("Event.localEventIdReplaced", this.onEcho); } onDecrypted = () => { From cd8748008845c7d071661d19b10315a19a5b5f1b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 14 Aug 2020 13:37:11 +0100 Subject: [PATCH 08/13] Watch for Event.status instead as we can do some things in SENT --- src/components/views/messages/MessageActionBar.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/components/views/messages/MessageActionBar.js b/src/components/views/messages/MessageActionBar.js index 043fe1a985..4a6b3c39fb 100644 --- a/src/components/views/messages/MessageActionBar.js +++ b/src/components/views/messages/MessageActionBar.js @@ -18,6 +18,7 @@ limitations under the License. import React, {useEffect} from 'react'; import PropTypes from 'prop-types'; +import { EventStatus } from 'matrix-js-sdk'; import { _t } from '../../../languageHandler'; import * as sdk from '../../../index'; @@ -114,19 +115,19 @@ export default class MessageActionBar extends React.PureComponent { static contextType = RoomContext; componentDidMount() { + if (this.props.mxEvent.status && this.props.mxEvent !== EventStatus.SENT) { + this.props.mxEvent.on("Event.status", this.onSent); + } if (this.props.mxEvent.isBeingDecrypted()) { this.props.mxEvent.once("Event.decrypted", this.onDecrypted); } this.props.mxEvent.on("Event.beforeRedaction", this.onBeforeRedaction); - if (this.props.mxEvent.getId()[0] !== "!") { - this.props.mxEvent.once("Event.localEventIdReplaced", this.onEcho); - } } componentWillUnmount() { + this.props.mxEvent.off("Event.status", this.onSent); this.props.mxEvent.off("Event.decrypted", this.onDecrypted); this.props.mxEvent.off("Event.beforeRedaction", this.onBeforeRedaction); - this.props.mxEvent.off("Event.localEventIdReplaced", this.onEcho); } onDecrypted = () => { @@ -140,7 +141,7 @@ export default class MessageActionBar extends React.PureComponent { this.forceUpdate(); }; - onEcho = () => { + onSent = () => { // When an event is sent and echoed the possible actions change. this.forceUpdate(); }; From 57f15bb1dd91a761930a157e997ee9f46b62eb8d Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 14 Aug 2020 13:37:28 +0100 Subject: [PATCH 09/13] fix typo --- src/components/views/messages/MessageActionBar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/views/messages/MessageActionBar.js b/src/components/views/messages/MessageActionBar.js index 4a6b3c39fb..c94f296eac 100644 --- a/src/components/views/messages/MessageActionBar.js +++ b/src/components/views/messages/MessageActionBar.js @@ -115,7 +115,7 @@ export default class MessageActionBar extends React.PureComponent { static contextType = RoomContext; componentDidMount() { - if (this.props.mxEvent.status && this.props.mxEvent !== EventStatus.SENT) { + if (this.props.mxEvent.status && this.props.mxEvent.status !== EventStatus.SENT) { this.props.mxEvent.on("Event.status", this.onSent); } if (this.props.mxEvent.isBeingDecrypted()) { From 9a5134eff21e7d53c467e7ae568b9fd44512fa89 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Mon, 17 Aug 2020 10:55:54 +0100 Subject: [PATCH 10/13] Fix corner rounding on images not always affecting right side --- res/css/views/messages/_MImageBody.scss | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/res/css/views/messages/_MImageBody.scss b/res/css/views/messages/_MImageBody.scss index 2faea41709..1c773c2f06 100644 --- a/res/css/views/messages/_MImageBody.scss +++ b/res/css/views/messages/_MImageBody.scss @@ -25,6 +25,7 @@ limitations under the License. height: 100%; left: 0; top: 0; + border-radius: 4px; } .mx_MImageBody_thumbnail_container { @@ -34,8 +35,6 @@ limitations under the License. // Make sure the _thumbnail is positioned relative to the _container position: relative; - - border-radius: 4px; } .mx_MImageBody_thumbnail_spinner { From 32ca810809e251067704bf81fd56d1b6b2bbbcde Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 17 Aug 2020 12:53:33 +0100 Subject: [PATCH 11/13] Upgrade matrix-js-sdk to 8.1.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index a4aa5b1e9c..8932deea56 100644 --- a/package.json +++ b/package.json @@ -79,7 +79,7 @@ "is-ip": "^2.0.0", "linkifyjs": "^2.1.9", "lodash": "^4.17.19", - "matrix-js-sdk": "8.1.0-rc.1", + "matrix-js-sdk": "8.1.0", "minimist": "^1.2.5", "pako": "^1.0.11", "parse5": "^5.1.1", diff --git a/yarn.lock b/yarn.lock index d4d48c10c2..ea9d16a903 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6470,10 +6470,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.3.tgz#4ddadd67308e780cf16a47685878ee27b736a0a3" integrity sha512-APMBEanjybaPzUrfqU0IMU5I0AswKMH7k8OTLs0vvV4KZpExkTkY87nR/zpbuTPj+gARop7aGUbl11pnDfW6xg== -matrix-js-sdk@8.1.0-rc.1: - version "8.1.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-8.1.0-rc.1.tgz#e42ca8dae7f513f956457eeb46f03c445a3712e8" - integrity sha512-/qOSe0FQsbC2ITXhUbpjCIRAT78f2VHxKGqGMC2M2s5e2Mvpxcpu7lj/ONz5irUPd34Sqhj9KdIUnAqBbh3stQ== +matrix-js-sdk@8.1.0: + version "8.1.0" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-8.1.0.tgz#c4e48b03a54455dda3d3e1c539ce31dbb46790ac" + integrity sha512-id/J1rBmooQWebCNO4we5W4w816+6LR503H6N1A3jn2CZl2etg86HOScmtGmw+4qkzjKJI5QkL30tvDyAJ+lxA== dependencies: "@babel/runtime" "^7.8.3" another-json "^0.2.0" From 18ae1a95470260bce92532e43ff6b6fc4965cb68 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 17 Aug 2020 12:59:51 +0100 Subject: [PATCH 12/13] Prepare changelog for v3.2.0 --- CHANGELOG.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0bfd203b27..29cbb040f4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,17 @@ +Changes in [3.2.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.2.0) (2020-08-17) +=================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.2.0-rc.1...v3.2.0) + + * Upgrade to JS SDK 8.1.0 + * [Release] Fix corner rounding on images not always affecting right side + [\#5122](https://github.com/matrix-org/matrix-react-sdk/pull/5122) + * [Release] Message Action Bar watch for event send changes + [\#5116](https://github.com/matrix-org/matrix-react-sdk/pull/5116) + * Fix /op slash command to release + [\#5114](https://github.com/matrix-org/matrix-react-sdk/pull/5114) + * Fix action bar safe area regression + [\#5112](https://github.com/matrix-org/matrix-react-sdk/pull/5112) + Changes in [3.2.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.2.0-rc.1) (2020-08-13) ============================================================================================================= [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.1.0...v3.2.0-rc.1) From ea337465ae1a670dac1aad61fd20efc6d0ac3204 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 17 Aug 2020 12:59:51 +0100 Subject: [PATCH 13/13] v3.2.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 8932deea56..e7a7dfac6b 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "3.2.0-rc.1", + "version": "3.2.0", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": {