From 93c44390458f00bcdff090df2c1d4950870cd705 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 6 Jan 2020 13:30:56 +0000 Subject: [PATCH 01/15] js-sdk rc.1 --- package.json | 2 +- yarn.lock | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/package.json b/package.json index ad446e26cc..61e12eceda 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "linkifyjs": "^2.1.6", "lodash": "^4.17.14", "lolex": "4.2", - "matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop", + "matrix-js-sdk": "2.4.7", "optimist": "^0.6.1", "pako": "^1.0.5", "png-chunks-extract": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index a491ba3941..1646ac5a59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5271,9 +5271,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz#6dff66c99d55ecf739ca53c492e626f1d12a33cc" integrity sha512-pWB896KPGSGkp1XtyzRBftpTzwSOL0Gfk0wLvxt4f2mgzjY19o0LxJ3U25vNWTzsh7da+KTbuXQoQ3lOJZ8WHw== -"matrix-js-sdk@github:matrix-org/matrix-js-sdk#develop": - version "2.4.6" - resolved "https://codeload.github.com/matrix-org/matrix-js-sdk/tar.gz/01f0dd4498fb689cb66091aff7aa0ae49f9b8ebf" +matrix-js-sdk@2.4.7: + version "2.4.7" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.4.7.tgz#998949120cb6cfb6362af6ff7b6bce326f7dca6f" + integrity sha512-3BVlZrHJYt7j5N83BLEeqroe4Gi2J/ycZKvKIe6s6SEygP8TpUP+trVSd+bSLm7c2JpPpMCoEsJ22aaPcbWVDQ== dependencies: another-json "^0.2.0" browser-request "^0.3.3" From 6b8f6239c5f29ef3d969c8f7700f097d35ff139b Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 6 Jan 2020 13:58:43 +0000 Subject: [PATCH 02/15] js-sdk 3.0.0-rc.1 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 61e12eceda..1b97d84abb 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "linkifyjs": "^2.1.6", "lodash": "^4.17.14", "lolex": "4.2", - "matrix-js-sdk": "2.4.7", + "matrix-js-sdk": "3.0.0-rc.1", "optimist": "^0.6.1", "pako": "^1.0.5", "png-chunks-extract": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 1646ac5a59..982760c49a 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5271,10 +5271,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz#6dff66c99d55ecf739ca53c492e626f1d12a33cc" integrity sha512-pWB896KPGSGkp1XtyzRBftpTzwSOL0Gfk0wLvxt4f2mgzjY19o0LxJ3U25vNWTzsh7da+KTbuXQoQ3lOJZ8WHw== -matrix-js-sdk@2.4.7: - version "2.4.7" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-2.4.7.tgz#998949120cb6cfb6362af6ff7b6bce326f7dca6f" - integrity sha512-3BVlZrHJYt7j5N83BLEeqroe4Gi2J/ycZKvKIe6s6SEygP8TpUP+trVSd+bSLm7c2JpPpMCoEsJ22aaPcbWVDQ== +matrix-js-sdk@3.0.0-rc.1: + version "3.0.0-rc.1" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-3.0.0-rc.1.tgz#6ecdedab752933f6a0ccf6aa7d2786bd32f6d7f7" + integrity sha512-1eaECVqG64tj1pE0UBFTIGc1whryXLNaRpkrXrZ5+ZMDtuK2ZDlTOLYoK3t4z/hjn+4C6a294ytoEVe0UnIA8w== dependencies: another-json "^0.2.0" browser-request "^0.3.3" From 623799ebdcededefc5c34c3dd5a93fc08fc79f1e Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 6 Jan 2020 14:01:54 +0000 Subject: [PATCH 03/15] Prepare changelog for v1.7.6-rc.1 --- CHANGELOG.md | 174 +++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 174 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5390cad319..3ad057dc7c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,177 @@ +Changes in [1.7.6-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.7.6-rc.1) (2020-01-06) +============================================================================================================= +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.7.5...v1.7.6-rc.1) + + * Deduplicate recent emoji + [\#3806](https://github.com/matrix-org/matrix-react-sdk/pull/3806) + * Fix ability to remove avatars + [\#3803](https://github.com/matrix-org/matrix-react-sdk/pull/3803) + * Update from Weblate + [\#3810](https://github.com/matrix-org/matrix-react-sdk/pull/3810) + * User Info fetch latest RoomMember instead of showing historical data + [\#3788](https://github.com/matrix-org/matrix-react-sdk/pull/3788) + * Remove all usages of slate in favour of CIDER + [\#3808](https://github.com/matrix-org/matrix-react-sdk/pull/3808) + * Use display name when pinned messages are changed + [\#3809](https://github.com/matrix-org/matrix-react-sdk/pull/3809) + * Fix inverted diff line highlighting in dark theme + [\#3790](https://github.com/matrix-org/matrix-react-sdk/pull/3790) + * Bridge info settings tab + [\#3693](https://github.com/matrix-org/matrix-react-sdk/pull/3693) + * Send the labs flags the client is running with in rageshake + [\#3805](https://github.com/matrix-org/matrix-react-sdk/pull/3805) + * Initial implementation of FTUE user lists design + [\#3792](https://github.com/matrix-org/matrix-react-sdk/pull/3792) + * Update key backup creation and recovery paths for SSSS + [\#3800](https://github.com/matrix-org/matrix-react-sdk/pull/3800) + * Don't fail if logs exists and is an empty dir + [\#3798](https://github.com/matrix-org/matrix-react-sdk/pull/3798) + * Comment remaining non-cross-signing-compliant components + [\#3799](https://github.com/matrix-org/matrix-react-sdk/pull/3799) + * Remove 'unverify' from UserInfoPanel + [\#3797](https://github.com/matrix-org/matrix-react-sdk/pull/3797) + * Use deviceTrust when displaying key backup trust status + [\#3795](https://github.com/matrix-org/matrix-react-sdk/pull/3795) + * Don't crash if a keyshare request is removed + [\#3793](https://github.com/matrix-org/matrix-react-sdk/pull/3793) + * Convert /verify to checkDeviceTrust + [\#3794](https://github.com/matrix-org/matrix-react-sdk/pull/3794) + * Remove E2eIcon onClick + [\#3791](https://github.com/matrix-org/matrix-react-sdk/pull/3791) + * support channel names with slash in name/alias + [\#3778](https://github.com/matrix-org/matrix-react-sdk/pull/3778) + * Fix NPE when filtering the room list + [\#3787](https://github.com/matrix-org/matrix-react-sdk/pull/3787) + * Turn RoomAliasField into properly controlled and use in RoomSettings + [\#3782](https://github.com/matrix-org/matrix-react-sdk/pull/3782) + * fuzzy-sort MemberList + [\#3783](https://github.com/matrix-org/matrix-react-sdk/pull/3783) + * Serialize file uploads into room to match confirmation dialog order + [\#3786](https://github.com/matrix-org/matrix-react-sdk/pull/3786) + * Do not show Top Unread Messages Bar and Jump to bottom button if searching + [\#3785](https://github.com/matrix-org/matrix-react-sdk/pull/3785) + * Fix sticker picker chevron offset calculation + [\#3784](https://github.com/matrix-org/matrix-react-sdk/pull/3784) + * Fix not being able to promote others to the same power level as your own + [\#3781](https://github.com/matrix-org/matrix-react-sdk/pull/3781) + * Room Tile DMs online/active green dot + [\#3751](https://github.com/matrix-org/matrix-react-sdk/pull/3751) + * Fix spelling and grammar in README + [\#3780](https://github.com/matrix-org/matrix-react-sdk/pull/3780) + * Reintroduce working resizer code for right panel + [\#3776](https://github.com/matrix-org/matrix-react-sdk/pull/3776) + * Fix wrong scope binding on openHelp for TopLeftMenu + [\#3775](https://github.com/matrix-org/matrix-react-sdk/pull/3775) + * UserInfo hide kick/mute buttons if they make no sense + [\#3774](https://github.com/matrix-org/matrix-react-sdk/pull/3774) + * Fix duplicate Incoming Call prompt on Community Invite sublist + [\#3773](https://github.com/matrix-org/matrix-react-sdk/pull/3773) + * Apply new design to highlighted tags and add toggle mechanic + [\#3755](https://github.com/matrix-org/matrix-react-sdk/pull/3755) + * stop using ReactDOM.findDOMNode in componentWillUnmount, use refs + [\#3771](https://github.com/matrix-org/matrix-react-sdk/pull/3771) + * Add alt="" to presentational images + [\#3772](https://github.com/matrix-org/matrix-react-sdk/pull/3772) + * Fix room list filtering weird case sensitivity + [\#3759](https://github.com/matrix-org/matrix-react-sdk/pull/3759) + * Don't show the 'verify' button if the user is verified + [\#3758](https://github.com/matrix-org/matrix-react-sdk/pull/3758) + * Switch to using checkDeviceTrust + [\#3757](https://github.com/matrix-org/matrix-react-sdk/pull/3757) + * Migrate away from React Legacy contexts API + [\#3743](https://github.com/matrix-org/matrix-react-sdk/pull/3743) + * Migrate key backups to SSSS + [\#3749](https://github.com/matrix-org/matrix-react-sdk/pull/3749) + * Get rid of stripped-emoji.json in favour of an in-memory single source of + truth + [\#3745](https://github.com/matrix-org/matrix-react-sdk/pull/3745) + * Combine cross signing and verification over DM feature flags + [\#3753](https://github.com/matrix-org/matrix-react-sdk/pull/3753) + * apply unhomoglyph when filtering room list to fuzzify it + [\#3754](https://github.com/matrix-org/matrix-react-sdk/pull/3754) + * Make EmojiPicker an unmanaged Context Menu as it is too complex to be + managed + [\#3746](https://github.com/matrix-org/matrix-react-sdk/pull/3746) + * Internationalise M_TOO_LARGE error from Synapse + [\#3750](https://github.com/matrix-org/matrix-react-sdk/pull/3750) + * Replace UserInfo avatar with for fallback logic + [\#3748](https://github.com/matrix-org/matrix-react-sdk/pull/3748) + * Dropdown stop keyboard propagation if key handled + [\#3741](https://github.com/matrix-org/matrix-react-sdk/pull/3741) + * Fix right panel for multiple member info viewings + [\#3742](https://github.com/matrix-org/matrix-react-sdk/pull/3742) + * Fix Field validation tooltip sticking if blurred before async validation + resolved + [\#3740](https://github.com/matrix-org/matrix-react-sdk/pull/3740) + * Fix UserInfo exploding without a room being passed to it + [\#3738](https://github.com/matrix-org/matrix-react-sdk/pull/3738) + * Fix room directory maintaining and error state + [\#3737](https://github.com/matrix-org/matrix-react-sdk/pull/3737) + * Stop trapping tab in AddressPickerDialog + [\#3735](https://github.com/matrix-org/matrix-react-sdk/pull/3735) + * Stop using KeyboardEvent.keyCode as it is deprecated + [\#3736](https://github.com/matrix-org/matrix-react-sdk/pull/3736) + * Implement new design for uploading/removing avatars + [\#3733](https://github.com/matrix-org/matrix-react-sdk/pull/3733) + * Fix aspect ratio on room/profile avatar preview + [\#3731](https://github.com/matrix-org/matrix-react-sdk/pull/3731) + * Switch to react-focus-lock for it to comprehend Portals + [\#3732](https://github.com/matrix-org/matrix-react-sdk/pull/3732) + * Make combobox dropdown keyboard and screen reader accessible + [\#3729](https://github.com/matrix-org/matrix-react-sdk/pull/3729) + * Verify users when cross-signing enabled + [\#3728](https://github.com/matrix-org/matrix-react-sdk/pull/3728) + * Update from Weblate + [\#3730](https://github.com/matrix-org/matrix-react-sdk/pull/3730) + * Improve a11y of the unignore button in Settings + [\#3727](https://github.com/matrix-org/matrix-react-sdk/pull/3727) + * Fix ToggleSwitch A11Y (trapping tab and switch v. checkbox) + [\#3726](https://github.com/matrix-org/matrix-react-sdk/pull/3726) + * Make URL previews dismissable via keyboard and accessible to screen readers + [\#3725](https://github.com/matrix-org/matrix-react-sdk/pull/3725) + * Create new key backups using secret storage + [\#3720](https://github.com/matrix-org/matrix-react-sdk/pull/3720) + * Replace sign-ins with sessions + [\#3721](https://github.com/matrix-org/matrix-react-sdk/pull/3721) + * Refactor RightPanel to match expected behaviour + [\#3703](https://github.com/matrix-org/matrix-react-sdk/pull/3703) + * Render policy room event updates in the timeline + [\#3716](https://github.com/matrix-org/matrix-react-sdk/pull/3716) + * Wrap the await call for unknown device lookups + [\#3718](https://github.com/matrix-org/matrix-react-sdk/pull/3718) + * Add testing flow to bootstrap secret storage + [\#3640](https://github.com/matrix-org/matrix-react-sdk/pull/3640) + * Fix remaining context menu regressions + [\#3715](https://github.com/matrix-org/matrix-react-sdk/pull/3715) + * Migrate away from React Legacy string refs + [\#3712](https://github.com/matrix-org/matrix-react-sdk/pull/3712) + * Update copy for DM invites + [\#3706](https://github.com/matrix-org/matrix-react-sdk/pull/3706) + * Fix message action bar reaction picker regression + [\#3714](https://github.com/matrix-org/matrix-react-sdk/pull/3714) + * Add what-input to allow different scoping to focus-visible for MAB a11y + [\#3709](https://github.com/matrix-org/matrix-react-sdk/pull/3709) + * Mark the This/All Rooms scope buttons as radios for a11y + [\#3708](https://github.com/matrix-org/matrix-react-sdk/pull/3708) + * Switch ReactionsRowButton to an AccessibleButton for space/enter handling + [\#3707](https://github.com/matrix-org/matrix-react-sdk/pull/3707) + * Change the (edited) link to an AccessibleButton for a11y + [\#3710](https://github.com/matrix-org/matrix-react-sdk/pull/3710) + * Update from Weblate + [\#3713](https://github.com/matrix-org/matrix-react-sdk/pull/3713) + * Fix ?via= args in SpecPermalinkConstructor.js + [\#3694](https://github.com/matrix-org/matrix-react-sdk/pull/3694) + * Don't mark a room as unread when server ACLs are set + [\#3705](https://github.com/matrix-org/matrix-react-sdk/pull/3705) + * Make reaction buttons more accessible + [\#3704](https://github.com/matrix-org/matrix-react-sdk/pull/3704) + * yarn upgrade + [\#3701](https://github.com/matrix-org/matrix-react-sdk/pull/3701) + * Make CI scripts executable + [\#3698](https://github.com/matrix-org/matrix-react-sdk/pull/3698) + * ARIA compliant context menus + [\#3611](https://github.com/matrix-org/matrix-react-sdk/pull/3611) + Changes in [1.7.5](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.7.5) (2019-12-09) =================================================================================================== [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.7.5-rc.1...v1.7.5) From 0df16631c24824c4cca5902a83e8c574d12fed9f Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 6 Jan 2020 14:01:54 +0000 Subject: [PATCH 04/15] v1.7.6-rc.1 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 1b97d84abb..f155738fbd 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "1.7.5", + "version": "1.7.6-rc.1", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From f31cc7dfeee4fb5423c62359e8d87e023520d25c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 7 Jan 2020 18:48:55 +0000 Subject: [PATCH 05/15] Strip all variation selectors on emoji ...when inserting into or looking up in the unicode to emoji map. This broke with emojibase 4.2.0 which changed the type of a whole load of emojis to 'text' when previously they were 'emoji'. This caused them to get the 'text' variant of the unicode string which has the text variation selector (15) appended instead of the emoji variation selector (16). We were only stripping the emoji selector, so upgrading to 4.2.0 caused riot to fail to find the heart in the unicode map, which therefore prevented the app from starting. --- src/emoji.js | 39 ++++++++++++++++++++++++++++----------- 1 file changed, 28 insertions(+), 11 deletions(-) diff --git a/src/emoji.js b/src/emoji.js index 7b7a9c1bfe..8b3c4c9fe4 100644 --- a/src/emoji.js +++ b/src/emoji.js @@ -16,14 +16,12 @@ limitations under the License. import EMOJIBASE from 'emojibase-data/en/compact.json'; -export const VARIATION_SELECTOR = String.fromCharCode(0xFE0F); - // The unicode is stored without the variant selector const UNICODE_TO_EMOJI = new Map(); // not exported as gets for it are handled by getEmojiFromUnicode export const EMOTICON_TO_EMOJI = new Map(); export const SHORTCODE_TO_EMOJI = new Map(); -export const getEmojiFromUnicode = unicode => UNICODE_TO_EMOJI.get(unicode.replace(VARIATION_SELECTOR, "")); +export const getEmojiFromUnicode = unicode => UNICODE_TO_EMOJI.get(stripVariation(unicode)); const EMOJIBASE_GROUP_ID_TO_CATEGORY = [ "people", // smileys @@ -51,13 +49,6 @@ export const DATA_BY_CATEGORY = { // Store various mappings from unicode/emoticon/shortcode to the Emoji objects EMOJIBASE.forEach(emoji => { - if (emoji.unicode.includes(VARIATION_SELECTOR)) { - // Clone data into variation-less version - emoji = Object.assign({}, emoji, { - unicode: emoji.unicode.replace(VARIATION_SELECTOR, ""), - }); - } - const categoryId = EMOJIBASE_GROUP_ID_TO_CATEGORY[emoji.group]; if (DATA_BY_CATEGORY.hasOwnProperty(categoryId)) { DATA_BY_CATEGORY[categoryId].push(emoji); @@ -66,7 +57,13 @@ EMOJIBASE.forEach(emoji => { emoji.filterString = `${emoji.annotation}\n${emoji.shortcodes.join('\n')}}\n${emoji.emoticon || ''}`.toLowerCase(); // Add mapping from unicode to Emoji object - UNICODE_TO_EMOJI.set(emoji.unicode, emoji); + // The 'unicode' field that we use in emojibase has either + // VS15 or VS16 appended to any characters that can take + // variation selectors. Which one it appends depends + // on whether emojibase considers their type to be 'text' or + // 'emoji'. We therefore strip any variation chars from strings + // both when building the map and when looking up. + UNICODE_TO_EMOJI.set(stripVariation(emoji.unicode), emoji); if (emoji.emoticon) { // Add mapping from emoticon to Emoji object @@ -80,3 +77,23 @@ EMOJIBASE.forEach(emoji => { }); } }); + +/** + * Strips variation selectors from a string + * NB. Skin tone modifers are not variation selectors: + * this function does not touch them. (Should it?) + * + * @param {string} str string to strip + * @returns {string} stripped string + */ +function stripVariation(str) { + let ret = ''; + for (let i = 0; i < str.length; ++i) { + const charCode = str.charCodeAt(i); + // append to output only if it's outside the variation selector range + if (charCode < 0xFE00 && charCode > 0xFE0F) { + ret += str.charAt(i); + } + } + return ret; +} From bd336b0710cc95a9cdf497c270607de70d33fd1c Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 7 Jan 2020 19:57:17 +0000 Subject: [PATCH 06/15] Use a regex because it's simpler and works and my loop did not because I meant 'or', not 'and' --- src/emoji.js | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/src/emoji.js b/src/emoji.js index 8b3c4c9fe4..d62630ae08 100644 --- a/src/emoji.js +++ b/src/emoji.js @@ -87,13 +87,5 @@ EMOJIBASE.forEach(emoji => { * @returns {string} stripped string */ function stripVariation(str) { - let ret = ''; - for (let i = 0; i < str.length; ++i) { - const charCode = str.charCodeAt(i); - // append to output only if it's outside the variation selector range - if (charCode < 0xFE00 && charCode > 0xFE0F) { - ret += str.charAt(i); - } - } - return ret; + return str.replace("\uFE00-\uFE0F", ""); } From 96cb1ddff5c718a7575a3af1cb5fdcb03ef9c967 Mon Sep 17 00:00:00 2001 From: David Baker Date: Tue, 7 Jan 2020 20:41:19 +0000 Subject: [PATCH 07/15] Use a regex that actually works --- src/emoji.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/emoji.js b/src/emoji.js index d62630ae08..125864e381 100644 --- a/src/emoji.js +++ b/src/emoji.js @@ -87,5 +87,5 @@ EMOJIBASE.forEach(emoji => { * @returns {string} stripped string */ function stripVariation(str) { - return str.replace("\uFE00-\uFE0F", ""); + return str.replace(/[\uFE00-\uFE0F]/, ""); } From f03d55cfe18550efaa4e56388219cf396b4a0b36 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 8 Jan 2020 11:20:29 +0000 Subject: [PATCH 08/15] Prepare changelog for v1.7.6-rc.2 --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 3ad057dc7c..a416920529 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,10 @@ +Changes in [1.7.6-rc.2](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.7.6-rc.2) (2020-01-08) +============================================================================================================= +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.7.6-rc.1...v1.7.6-rc.2) + + * Strip all variation selectors on emoji + [\#3818](https://github.com/matrix-org/matrix-react-sdk/pull/3818) + Changes in [1.7.6-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.7.6-rc.1) (2020-01-06) ============================================================================================================= [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.7.5...v1.7.6-rc.1) From a3fe5bbd8c865f227b62370d0722d7f3bc077478 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Wed, 8 Jan 2020 11:20:29 +0000 Subject: [PATCH 09/15] v1.7.6-rc.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index f155738fbd..2237ae2d53 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "1.7.6-rc.1", + "version": "1.7.6-rc.2", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": { From 63e5c44c63f70137ef36ec11fa3bcedf34f0737a Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 13 Jan 2020 11:48:51 +0000 Subject: [PATCH 10/15] Add feature flag around the presence indicator in room list This adds a feature flag (disabled by default for now) around the room list presence indicator, as it still needs some tweaking before it's ready for production use. Part of https://github.com/vector-im/riot-web/issues/11799 --- src/components/views/rooms/RoomTile.js | 5 ++++- src/i18n/strings/en_EN.json | 1 + src/settings/Settings.js | 6 ++++++ 3 files changed, 11 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomTile.js b/src/components/views/rooms/RoomTile.js index 241713c97d..f0c1a23c9c 100644 --- a/src/components/views/rooms/RoomTile.js +++ b/src/components/views/rooms/RoomTile.js @@ -381,7 +381,10 @@ module.exports = createReactClass({ const { room } = this.props; const member = room.getMember(dmUserId); - if (member && member.membership === "join" && room.getJoinedMemberCount() === 2) { + if ( + member && member.membership === "join" && room.getJoinedMemberCount() === 2 && + SettingsStore.isFeatureEnabled("feature_presence_in_room_list") + ) { const UserOnlineDot = sdk.getComponent('rooms.UserOnlineDot'); dmOnline = ; } diff --git a/src/i18n/strings/en_EN.json b/src/i18n/strings/en_EN.json index 9c2105afab..fe64a7df12 100644 --- a/src/i18n/strings/en_EN.json +++ b/src/i18n/strings/en_EN.json @@ -359,6 +359,7 @@ "Multiple integration managers": "Multiple integration managers", "Try out new ways to ignore people (experimental)": "Try out new ways to ignore people (experimental)", "New DM invite dialog (under development)": "New DM invite dialog (under development)", + "Show a presence dot next to DMs in the room list": "Show a presence dot next to DMs in the room list", "Enable cross-signing to verify per-user instead of per-device (in development)": "Enable cross-signing to verify per-user instead of per-device (in development)", "Enable local event indexing and E2EE search (requires restart)": "Enable local event indexing and E2EE search (requires restart)", "Show info about bridges in room settings": "Show info about bridges in room settings", diff --git a/src/settings/Settings.js b/src/settings/Settings.js index 14208e1f03..8ee8d89890 100644 --- a/src/settings/Settings.js +++ b/src/settings/Settings.js @@ -134,6 +134,12 @@ export const SETTINGS = { supportedLevels: LEVELS_FEATURE, default: false, }, + "feature_presence_in_room_list": { + isFeature: true, + displayName: _td("Show a presence dot next to DMs in the room list"), + supportedLevels: LEVELS_FEATURE, + default: false, + }, "mjolnirRooms": { supportedLevels: ['account'], default: [], From 8fc85797a7715bce0319298e6f8d08619f75cd4f Mon Sep 17 00:00:00 2001 From: "J. Ryan Stinnett" Date: Mon, 13 Jan 2020 12:29:03 +0000 Subject: [PATCH 11/15] Guard against missing members in avatars Part of https://github.com/vector-im/riot-web/issues/11744 --- src/Avatar.js | 19 +++++++++++-------- src/components/views/avatars/MemberAvatar.js | 2 +- 2 files changed, 12 insertions(+), 9 deletions(-) diff --git a/src/Avatar.js b/src/Avatar.js index 17860698cb..a529ca5588 100644 --- a/src/Avatar.js +++ b/src/Avatar.js @@ -21,14 +21,17 @@ import DMRoomMap from './utils/DMRoomMap'; module.exports = { avatarUrlForMember: function(member, width, height, resizeMethod) { - let url = member.getAvatarUrl( - MatrixClientPeg.get().getHomeserverUrl(), - Math.floor(width * window.devicePixelRatio), - Math.floor(height * window.devicePixelRatio), - resizeMethod, - false, - false, - ); + let url; + if (member && member.getAvatarUrl) { + url = member.getAvatarUrl( + MatrixClientPeg.get().getHomeserverUrl(), + Math.floor(width * window.devicePixelRatio), + Math.floor(height * window.devicePixelRatio), + resizeMethod, + false, + false, + ); + } if (!url) { // member can be null here currently since on invites, the JS SDK // does not have enough info to build a RoomMember object for diff --git a/src/components/views/avatars/MemberAvatar.js b/src/components/views/avatars/MemberAvatar.js index 383bab5e79..8b6d41eb9f 100644 --- a/src/components/views/avatars/MemberAvatar.js +++ b/src/components/views/avatars/MemberAvatar.js @@ -55,7 +55,7 @@ module.exports = createReactClass({ }, _getState: function(props) { - if (props.member) { + if (props.member && props.member.name) { return { name: props.member.name, title: props.title || props.member.userId, From 66b55495bb02433b00b3faf60dcfaadb28a41577 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Sun, 5 Jan 2020 20:30:01 +0000 Subject: [PATCH 12/15] Fix right panel buttons highlighting Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- src/components/structures/GroupView.js | 2 +- src/components/views/right_panel/HeaderButtons.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/structures/GroupView.js b/src/components/structures/GroupView.js index 9df4630136..50b63b94b1 100644 --- a/src/components/structures/GroupView.js +++ b/src/components/structures/GroupView.js @@ -1299,7 +1299,7 @@ export default createReactClass({ ); } - const rightPanel = !RightPanelStore.getSharedInstance().isOpenForGroup + const rightPanel = RightPanelStore.getSharedInstance().isOpenForGroup ? : undefined; diff --git a/src/components/views/right_panel/HeaderButtons.js b/src/components/views/right_panel/HeaderButtons.js index ebe1f5f915..dbcae4529a 100644 --- a/src/components/views/right_panel/HeaderButtons.js +++ b/src/components/views/right_panel/HeaderButtons.js @@ -74,7 +74,7 @@ export default class HeaderButtons extends React.Component { const rps = RightPanelStore.getSharedInstance(); if (this.state.headerKind === HEADER_KIND_ROOM) { this.setState({phase: rps.visibleRoomPanelPhase}); - } else if (this.state.head === HEADER_KIND_GROUP) { + } else if (this.state.headerKind === HEADER_KIND_GROUP) { this.setState({phase: rps.visibleGroupPanelPhase}); } } From 9a3ca289781fd3a59dac47a378ef8565029cc4c6 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 13 Jan 2020 13:01:36 +0000 Subject: [PATCH 13/15] js-sdk 3.0.0 --- package.json | 2 +- yarn.lock | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 2237ae2d53..253f230f14 100644 --- a/package.json +++ b/package.json @@ -87,7 +87,7 @@ "linkifyjs": "^2.1.6", "lodash": "^4.17.14", "lolex": "4.2", - "matrix-js-sdk": "3.0.0-rc.1", + "matrix-js-sdk": "3.0.0", "optimist": "^0.6.1", "pako": "^1.0.5", "png-chunks-extract": "^1.0.0", diff --git a/yarn.lock b/yarn.lock index 982760c49a..ff86a10a11 100644 --- a/yarn.lock +++ b/yarn.lock @@ -5271,10 +5271,10 @@ mathml-tag-names@^2.0.1: resolved "https://registry.yarnpkg.com/mathml-tag-names/-/mathml-tag-names-2.1.1.tgz#6dff66c99d55ecf739ca53c492e626f1d12a33cc" integrity sha512-pWB896KPGSGkp1XtyzRBftpTzwSOL0Gfk0wLvxt4f2mgzjY19o0LxJ3U25vNWTzsh7da+KTbuXQoQ3lOJZ8WHw== -matrix-js-sdk@3.0.0-rc.1: - version "3.0.0-rc.1" - resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-3.0.0-rc.1.tgz#6ecdedab752933f6a0ccf6aa7d2786bd32f6d7f7" - integrity sha512-1eaECVqG64tj1pE0UBFTIGc1whryXLNaRpkrXrZ5+ZMDtuK2ZDlTOLYoK3t4z/hjn+4C6a294ytoEVe0UnIA8w== +matrix-js-sdk@3.0.0: + version "3.0.0" + resolved "https://registry.yarnpkg.com/matrix-js-sdk/-/matrix-js-sdk-3.0.0.tgz#97908f9eda9eeb3ba0333b7e474c45f2b258e50c" + integrity sha512-lzUMwJAZHw7Dk0K+rubqe6kEpy4+pJ+qCp8n6lisfdKfMDJXdNCkjiiXRnakM1ZD4PFYK8ju89+NfxlyhAAd4A== dependencies: another-json "^0.2.0" browser-request "^0.3.3" From d38c3582353182debb2f4e6085e0a966a7c9df74 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 13 Jan 2020 13:06:30 +0000 Subject: [PATCH 14/15] Prepare changelog for v1.7.6 --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a416920529..3ae2711e25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,12 @@ +Changes in [1.7.6](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.7.6) (2020-01-13) +=================================================================================================== +[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.7.6-rc.2...v1.7.6) + + * Repair community member info panel + [\#3834](https://github.com/matrix-org/matrix-react-sdk/pull/3834) + * Add feature flag around the presence indicator in room list + [\#3833](https://github.com/matrix-org/matrix-react-sdk/pull/3833) + Changes in [1.7.6-rc.2](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v1.7.6-rc.2) (2020-01-08) ============================================================================================================= [Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v1.7.6-rc.1...v1.7.6-rc.2) From 8091cadc46d0b92e7b0c024becb0fc802f95cad4 Mon Sep 17 00:00:00 2001 From: RiotRobot Date: Mon, 13 Jan 2020 13:06:31 +0000 Subject: [PATCH 15/15] v1.7.6 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 253f230f14..2de2877c81 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "matrix-react-sdk", - "version": "1.7.6-rc.2", + "version": "1.7.6", "description": "SDK for matrix.org using React", "author": "matrix.org", "repository": {