From d1237b2c98ecab2b3f4d951ffdea8ba5d7c49ab0 Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Fri, 2 Sep 2022 10:24:07 +0200 Subject: [PATCH 1/4] Remove e2e test exclude from tsconfig (#9234) --- tsconfig.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index 27b0f948649..69749ab96bc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -24,8 +24,5 @@ "./src/**/*.tsx", "./test/**/*.ts", "./test/**/*.tsx" - ], - "exclude": [ - "./test/end-to-end-tests/" ] } From 3e8da6ffa4646d21bd26c12600fb603c21a86037 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 2 Sep 2022 10:03:53 +0100 Subject: [PATCH 2/4] Fix tooltip infinitely recursing (#9235) --- src/components/views/elements/Tooltip.tsx | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/Tooltip.tsx b/src/components/views/elements/Tooltip.tsx index a2298486e8d..2741a699360 100644 --- a/src/components/views/elements/Tooltip.tsx +++ b/src/components/views/elements/Tooltip.tsx @@ -22,6 +22,7 @@ import ReactDOM from 'react-dom'; import classNames from 'classnames'; import UIStore from "../../../stores/UIStore"; +import { objectHasDiff } from "../../../utils/objects"; export enum Alignment { Natural, // Pick left or right @@ -91,8 +92,10 @@ export default class Tooltip extends React.PureComponent { this.updatePosition(); } - public componentDidUpdate() { - this.updatePosition(); + public componentDidUpdate(prevProps) { + if (objectHasDiff(prevProps, this.props)) { + this.updatePosition(); + } } // Remove the wrapper element, as the tooltip has finished using it From ea0622a48e89e8863e9fccd90c06e386c8a3291b Mon Sep 17 00:00:00 2001 From: Michael Weimann Date: Fri, 2 Sep 2022 11:24:56 +0200 Subject: [PATCH 3/4] Require @typescript-eslint/eslint-plugin >= 5.35.1 (#9233) --- package.json | 2 +- yarn.lock | 75 ++++++++++++++++++++++++++++++++++++++-------------- 2 files changed, 56 insertions(+), 21 deletions(-) diff --git a/package.json b/package.json index 6e2b42d25e5..5c90e917dd0 100644 --- a/package.json +++ b/package.json @@ -164,7 +164,7 @@ "@types/react-transition-group": "^4.4.0", "@types/sanitize-html": "^2.3.1", "@types/zxcvbn": "^4.4.0", - "@typescript-eslint/eslint-plugin": "^5.6.0", + "@typescript-eslint/eslint-plugin": "^5.35.1", "@typescript-eslint/parser": "^5.6.0", "@wojtekmaj/enzyme-adapter-react-17": "^0.6.1", "allchange": "^1.0.6", diff --git a/yarn.lock b/yarn.lock index 2a056b88b07..56dceb9fff2 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2299,14 +2299,14 @@ resolved "https://registry.yarnpkg.com/@types/zxcvbn/-/zxcvbn-4.4.1.tgz#46e42cbdcee681b22181478feaf4af2bc4c1abd2" integrity sha512-3NoqvZC2W5gAC5DZbTpCeJ251vGQmgcWIHQJGq2J240HY6ErQ9aWKkwfoKJlHLx+A83WPNTZ9+3cd2ILxbvr1w== -"@typescript-eslint/eslint-plugin@^5.6.0": - version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.34.0.tgz#d690f60e335596f38b01792e8f4b361d9bd0cb35" - integrity sha512-eRfPPcasO39iwjlUAMtjeueRGuIrW3TQ9WseIDl7i5UWuFbf83yYaU7YPs4j8+4CxUMIsj1k+4kV+E+G+6ypDQ== - dependencies: - "@typescript-eslint/scope-manager" "5.34.0" - "@typescript-eslint/type-utils" "5.34.0" - "@typescript-eslint/utils" "5.34.0" +"@typescript-eslint/eslint-plugin@^5.35.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-5.36.1.tgz#471f64dc53600025e470dad2ca4a9f2864139019" + integrity sha512-iC40UK8q1tMepSDwiLbTbMXKDxzNy+4TfPWgIL661Ym0sD42vRcQU93IsZIrmi+x292DBr60UI/gSwfdVYexCA== + dependencies: + "@typescript-eslint/scope-manager" "5.36.1" + "@typescript-eslint/type-utils" "5.36.1" + "@typescript-eslint/utils" "5.36.1" debug "^4.3.4" functional-red-black-tree "^1.0.1" ignore "^5.2.0" @@ -2332,12 +2332,21 @@ "@typescript-eslint/types" "5.34.0" "@typescript-eslint/visitor-keys" "5.34.0" -"@typescript-eslint/type-utils@5.34.0": - version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.34.0.tgz#7a324ab9ddd102cd5e1beefc94eea6f3eb32d32d" - integrity sha512-Pxlno9bjsQ7hs1pdWRUv9aJijGYPYsHpwMeCQ/Inavhym3/XaKt1ZKAA8FIw4odTBfowBdZJDMxf2aavyMDkLg== +"@typescript-eslint/scope-manager@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-5.36.1.tgz#23c49b7ddbcffbe09082e6694c2524950766513f" + integrity sha512-pGC2SH3/tXdu9IH3ItoqciD3f3RRGCh7hb9zPdN2Drsr341zgd6VbhP5OHQO/reUqihNltfPpMpTNihFMarP2w== + dependencies: + "@typescript-eslint/types" "5.36.1" + "@typescript-eslint/visitor-keys" "5.36.1" + +"@typescript-eslint/type-utils@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-5.36.1.tgz#016fc2bff6679f54c0b2df848a493f0ca3d4f625" + integrity sha512-xfZhfmoQT6m3lmlqDvDzv9TiCYdw22cdj06xY0obSznBsT///GK5IEZQdGliXpAOaRL34o8phEvXzEo/VJx13Q== dependencies: - "@typescript-eslint/utils" "5.34.0" + "@typescript-eslint/typescript-estree" "5.36.1" + "@typescript-eslint/utils" "5.36.1" debug "^4.3.4" tsutils "^3.21.0" @@ -2346,6 +2355,11 @@ resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.34.0.tgz#217bf08049e9e7b86694d982e88a2c1566330c78" integrity sha512-49fm3xbbUPuzBIOcy2CDpYWqy/X7VBkxVN+DC21e0zIm3+61Z0NZi6J9mqPmSW1BDVk9FIOvuCFyUPjXz93sjA== +"@typescript-eslint/types@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-5.36.1.tgz#1cf0e28aed1cb3ee676917966eb23c2f8334ce2c" + integrity sha512-jd93ShpsIk1KgBTx9E+hCSEuLCUFwi9V/urhjOWnOaksGZFbTOxAT47OH2d4NLJnLhkVD+wDbB48BuaycZPLBg== + "@typescript-eslint/typescript-estree@5.34.0": version "5.34.0" resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.34.0.tgz#ba7b83f4bf8ccbabf074bbf1baca7a58de3ccb9a" @@ -2359,15 +2373,28 @@ semver "^7.3.7" tsutils "^3.21.0" -"@typescript-eslint/utils@5.34.0": - version "5.34.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.34.0.tgz#0cae98f48d8f9e292e5caa9343611b6faf49e743" - integrity sha512-kWRYybU4Rn++7lm9yu8pbuydRyQsHRoBDIo11k7eqBWTldN4xUdVUMCsHBiE7aoEkFzrUEaZy3iH477vr4xHAQ== +"@typescript-eslint/typescript-estree@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-5.36.1.tgz#b857f38d6200f7f3f4c65cd0a5afd5ae723f2adb" + integrity sha512-ih7V52zvHdiX6WcPjsOdmADhYMDN15SylWRZrT2OMy80wzKbc79n8wFW0xpWpU0x3VpBz/oDgTm2xwDAnFTl+g== + dependencies: + "@typescript-eslint/types" "5.36.1" + "@typescript-eslint/visitor-keys" "5.36.1" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.3.7" + tsutils "^3.21.0" + +"@typescript-eslint/utils@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-5.36.1.tgz#136d5208cc7a3314b11c646957f8f0b5c01e07ad" + integrity sha512-lNj4FtTiXm5c+u0pUehozaUWhh7UYKnwryku0nxJlYUEWetyG92uw2pr+2Iy4M/u0ONMKzfrx7AsGBTCzORmIg== dependencies: "@types/json-schema" "^7.0.9" - "@typescript-eslint/scope-manager" "5.34.0" - "@typescript-eslint/types" "5.34.0" - "@typescript-eslint/typescript-estree" "5.34.0" + "@typescript-eslint/scope-manager" "5.36.1" + "@typescript-eslint/types" "5.36.1" + "@typescript-eslint/typescript-estree" "5.36.1" eslint-scope "^5.1.1" eslint-utils "^3.0.0" @@ -2379,6 +2406,14 @@ "@typescript-eslint/types" "5.34.0" eslint-visitor-keys "^3.3.0" +"@typescript-eslint/visitor-keys@5.36.1": + version "5.36.1" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-5.36.1.tgz#7731175312d65738e501780f923896d200ad1615" + integrity sha512-ojB9aRyRFzVMN3b5joSYni6FAS10BBSCAfKJhjJAV08t/a95aM6tAhz+O1jF+EtgxktuSO3wJysp2R+Def/IWQ== + dependencies: + "@typescript-eslint/types" "5.36.1" + eslint-visitor-keys "^3.3.0" + "@wojtekmaj/enzyme-adapter-react-17@^0.6.1": version "0.6.7" resolved "https://registry.yarnpkg.com/@wojtekmaj/enzyme-adapter-react-17/-/enzyme-adapter-react-17-0.6.7.tgz#7784bd32f518b186218cebb26c98c852676f30b0" From 219f4fae3d97592249ecde2a63cbd9373b83e77b Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Fri, 2 Sep 2022 14:04:16 +0100 Subject: [PATCH 4/4] Fix suggested rooms going missing (#9236) --- src/components/views/rooms/RoomList.tsx | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/components/views/rooms/RoomList.tsx b/src/components/views/rooms/RoomList.tsx index b2493db25cc..1353f8f5c8a 100644 --- a/src/components/views/rooms/RoomList.tsx +++ b/src/components/views/rooms/RoomList.tsx @@ -592,12 +592,8 @@ export default class RoomList extends React.PureComponent { let extraTiles = null; if (orderedTagId === DefaultTagID.Suggested) { extraTiles = this.renderSuggestedRooms(); - } - - if (this.state.feature_favourite_messages && orderedTagId === DefaultTagID.SavedItems) { + } else if (this.state.feature_favourite_messages && orderedTagId === DefaultTagID.SavedItems) { extraTiles = this.renderFavoriteMessagesList(); - } else { - extraTiles = null; } const aesthetics = TAG_AESTHETICS[orderedTagId];