Skip to content
This repository was archived by the owner on Sep 11, 2024. It is now read-only.

Commit bec1d71

Browse files
committed
Merge branch 'develop' of github.com:matrix-org/matrix-react-sdk into t3chguy/feat/room-list-widgets
� Conflicts: � src/components/views/elements/AppTile.js � src/utils/WidgetUtils.ts
2 parents f7959fe + 5987126 commit bec1d71

File tree

200 files changed

+7561
-5542
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

200 files changed

+7561
-5542
lines changed

.eslintignore.errorfiles

Lines changed: 6 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,50 +1,31 @@
11
# autogenerated file: run scripts/generate-eslint-error-ignore-file to update.
22

3+
src/ImageUtils.js
4+
src/Markdown.js
5+
src/Rooms.js
6+
src/Unread.js
7+
src/Velociraptor.js
38
src/components/structures/RoomDirectory.js
4-
src/components/structures/RoomStatusBar.js
59
src/components/structures/ScrollPanel.js
6-
src/components/structures/SearchBox.js
710
src/components/structures/UploadBar.js
8-
src/components/views/avatars/MemberAvatar.js
9-
src/components/views/create_room/RoomAlias.js
10-
src/components/views/dialogs/SetPasswordDialog.js
1111
src/components/views/elements/AddressSelector.js
1212
src/components/views/elements/DirectorySearchBox.js
13-
src/components/views/elements/MemberEventListSummary.js
14-
src/components/views/elements/UserSelector.js
15-
src/components/views/globals/NewVersionBar.js
1613
src/components/views/messages/MFileBody.js
1714
src/components/views/messages/TextualBody.js
18-
src/components/views/room_settings/ColorSettings.js
19-
src/components/views/rooms/Autocomplete.js
2015
src/components/views/rooms/AuxPanel.js
2116
src/components/views/rooms/LinkPreviewWidget.js
22-
src/components/views/rooms/MemberInfo.js
2317
src/components/views/rooms/MemberList.js
24-
src/components/views/rooms/RoomList.js
2518
src/components/views/rooms/RoomPreviewBar.js
26-
src/components/views/rooms/SearchResultTile.js
2719
src/components/views/settings/ChangeAvatar.js
28-
src/components/views/settings/ChangePassword.js
2920
src/components/views/settings/DevicesPanel.js
3021
src/components/views/settings/Notifications.js
31-
src/HtmlUtils.js
32-
src/ImageUtils.js
33-
src/Markdown.js
34-
src/notifications/ContentRules.js
35-
src/notifications/PushRuleVectorState.js
36-
src/PlatformPeg.js
3722
src/rageshake/rageshake.js
3823
src/ratelimitedfunc.js
39-
src/Rooms.js
40-
src/Unread.js
24+
src/utils/DMRoomMap.js
4125
src/utils/DecryptFile.js
4226
src/utils/DirectoryUtils.js
43-
src/utils/DMRoomMap.js
44-
src/utils/FormattingUtils.js
4527
src/utils/MultiInviter.js
4628
src/utils/Receipt.js
47-
src/Velociraptor.js
4829
test/components/structures/MessagePanel-test.js
4930
test/components/views/dialogs/InteractiveAuthDialog-test.js
5031
test/mock-clock.js

CHANGELOG.md

Lines changed: 216 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,219 @@
1+
Changes in [3.6.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.6.0) (2020-10-12)
2+
===================================================================================================
3+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.6.0-rc.1...v3.6.0)
4+
5+
* Upgrade JS SDK to 8.5.0
6+
* [Release] Fix templating for v1 jitsi widgets
7+
[\#5306](https://github.com/matrix-org/matrix-react-sdk/pull/5306)
8+
* [Release] Use new preparing event for widget communications
9+
[\#5304](https://github.com/matrix-org/matrix-react-sdk/pull/5304)
10+
11+
Changes in [3.6.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.6.0-rc.1) (2020-10-07)
12+
=============================================================================================================
13+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.5.0...v3.6.0-rc.1)
14+
15+
* Upgrade JS SDK to 8.5.0-rc.1
16+
* Update from Weblate
17+
[\#5297](https://github.com/matrix-org/matrix-react-sdk/pull/5297)
18+
* Fix edited replies being wrongly treated as big emoji
19+
[\#5295](https://github.com/matrix-org/matrix-react-sdk/pull/5295)
20+
* Fix StopGapWidget infinitely recursing
21+
[\#5294](https://github.com/matrix-org/matrix-react-sdk/pull/5294)
22+
* Fix editing and redactions not updating the Reply Thread
23+
[\#5281](https://github.com/matrix-org/matrix-react-sdk/pull/5281)
24+
* Hide Jump to Read Receipt button for users who have not yet sent an RR
25+
[\#5282](https://github.com/matrix-org/matrix-react-sdk/pull/5282)
26+
* fix img tags not always being rendered correctly
27+
[\#5279](https://github.com/matrix-org/matrix-react-sdk/pull/5279)
28+
* Hopefully fix righhtpanel crash
29+
[\#5293](https://github.com/matrix-org/matrix-react-sdk/pull/5293)
30+
* Fix naive pinning limit and app tile widgetMessaging NPE
31+
[\#5283](https://github.com/matrix-org/matrix-react-sdk/pull/5283)
32+
* Show server errors from saving profile settings
33+
[\#5272](https://github.com/matrix-org/matrix-react-sdk/pull/5272)
34+
* Update copy for `redact` permission
35+
[\#5273](https://github.com/matrix-org/matrix-react-sdk/pull/5273)
36+
* Remove width limit on widgets
37+
[\#5265](https://github.com/matrix-org/matrix-react-sdk/pull/5265)
38+
* Fix call container avatar initial centering
39+
[\#5280](https://github.com/matrix-org/matrix-react-sdk/pull/5280)
40+
* Fix right panel for peeking rooms
41+
[\#5268](https://github.com/matrix-org/matrix-react-sdk/pull/5268)
42+
* Add support for dehydrated devices
43+
[\#5239](https://github.com/matrix-org/matrix-react-sdk/pull/5239)
44+
* Use Own Profile Store for the Profile Settings
45+
[\#5277](https://github.com/matrix-org/matrix-react-sdk/pull/5277)
46+
* null-guard defaultAvatarUrlForString
47+
[\#5270](https://github.com/matrix-org/matrix-react-sdk/pull/5270)
48+
* Choose first result on enter in the emoji picker
49+
[\#5257](https://github.com/matrix-org/matrix-react-sdk/pull/5257)
50+
* Fix room directory clipping links in the room's topic
51+
[\#5276](https://github.com/matrix-org/matrix-react-sdk/pull/5276)
52+
* Decorate failed e2ee downgrade attempts better
53+
[\#5278](https://github.com/matrix-org/matrix-react-sdk/pull/5278)
54+
* MELS use latest avatar rather than the first avatar
55+
[\#5262](https://github.com/matrix-org/matrix-react-sdk/pull/5262)
56+
* Fix Encryption Panel close button clashing with Base Card
57+
[\#5261](https://github.com/matrix-org/matrix-react-sdk/pull/5261)
58+
* Wrap canEncryptToAllUsers in a try/catch to handle server errors
59+
[\#5275](https://github.com/matrix-org/matrix-react-sdk/pull/5275)
60+
* Fix conditional on communities prototype room creation dialog
61+
[\#5274](https://github.com/matrix-org/matrix-react-sdk/pull/5274)
62+
* Fix ensureDmExists for encryption detection
63+
[\#5271](https://github.com/matrix-org/matrix-react-sdk/pull/5271)
64+
* Switch to using the Widget API SDK for widget messaging
65+
[\#5171](https://github.com/matrix-org/matrix-react-sdk/pull/5171)
66+
* Ensure package links exist when releasing
67+
[\#5269](https://github.com/matrix-org/matrix-react-sdk/pull/5269)
68+
* Fix the call preview when not in same room as the call
69+
[\#5267](https://github.com/matrix-org/matrix-react-sdk/pull/5267)
70+
* Make the hangup button do things for conference calls
71+
[\#5223](https://github.com/matrix-org/matrix-react-sdk/pull/5223)
72+
* Render Jitsi widget state events in a more obvious way
73+
[\#5222](https://github.com/matrix-org/matrix-react-sdk/pull/5222)
74+
* Make the PIP Jitsi look and feel like the 1:1 PIP
75+
[\#5226](https://github.com/matrix-org/matrix-react-sdk/pull/5226)
76+
* Trim range when formatting so that it excludes leading/trailing spaces
77+
[\#5263](https://github.com/matrix-org/matrix-react-sdk/pull/5263)
78+
* Fix button label on the Set Password Dialog
79+
[\#5264](https://github.com/matrix-org/matrix-react-sdk/pull/5264)
80+
* fix link to classic yarn's `yarn link`
81+
[\#5259](https://github.com/matrix-org/matrix-react-sdk/pull/5259)
82+
* Fix index mismatch between username colors styles and custom theming
83+
[\#5256](https://github.com/matrix-org/matrix-react-sdk/pull/5256)
84+
* Disable autocompletion on security key input during login
85+
[\#5258](https://github.com/matrix-org/matrix-react-sdk/pull/5258)
86+
* fix uninitialised state and eventlistener leak in RoomUpgradeWarningBar
87+
[\#5255](https://github.com/matrix-org/matrix-react-sdk/pull/5255)
88+
* Only set title when it changes
89+
[\#5254](https://github.com/matrix-org/matrix-react-sdk/pull/5254)
90+
* Convert CallHandler to typescript
91+
[\#5248](https://github.com/matrix-org/matrix-react-sdk/pull/5248)
92+
* Retry loading i18n language if it fails
93+
[\#5209](https://github.com/matrix-org/matrix-react-sdk/pull/5209)
94+
* Rework profile area for user and room settings to be more clear
95+
[\#5243](https://github.com/matrix-org/matrix-react-sdk/pull/5243)
96+
* Validation improve pattern for derived data
97+
[\#5241](https://github.com/matrix-org/matrix-react-sdk/pull/5241)
98+
99+
Changes in [3.5.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.5.0) (2020-09-28)
100+
===================================================================================================
101+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.5.0-rc.1...v3.5.0)
102+
103+
* Upgrade JS SDK to 8.4.1
104+
105+
Changes in [3.5.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.5.0-rc.1) (2020-09-23)
106+
=============================================================================================================
107+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.4.1...v3.5.0-rc.1)
108+
109+
* Upgrade JS SDK to 8.4.0-rc.1
110+
* Update from Weblate
111+
[\#5246](https://github.com/matrix-org/matrix-react-sdk/pull/5246)
112+
* Upgrade sanitize-html, set nesting limit
113+
[\#5245](https://github.com/matrix-org/matrix-react-sdk/pull/5245)
114+
* Add a note to use the desktop builds when seshat isn't available
115+
[\#5225](https://github.com/matrix-org/matrix-react-sdk/pull/5225)
116+
* Add some permission checks to the communities v2 prototype
117+
[\#5240](https://github.com/matrix-org/matrix-react-sdk/pull/5240)
118+
* Support HS-preferred Secure Backup setup methods
119+
[\#5242](https://github.com/matrix-org/matrix-react-sdk/pull/5242)
120+
* Only show User Info verify button if the other user has e2ee devices
121+
[\#5234](https://github.com/matrix-org/matrix-react-sdk/pull/5234)
122+
* Fix New Room List arrow key management
123+
[\#5237](https://github.com/matrix-org/matrix-react-sdk/pull/5237)
124+
* Fix Room Directory View & Preview actions for federated joins
125+
[\#5235](https://github.com/matrix-org/matrix-react-sdk/pull/5235)
126+
* Add a UI feature to disable advanced encryption options
127+
[\#5238](https://github.com/matrix-org/matrix-react-sdk/pull/5238)
128+
* UI Feature Flag: Communities
129+
[\#5216](https://github.com/matrix-org/matrix-react-sdk/pull/5216)
130+
* Rename apps back to widgets
131+
[\#5236](https://github.com/matrix-org/matrix-react-sdk/pull/5236)
132+
* Adjust layout and formatting of notifications / files cards
133+
[\#5229](https://github.com/matrix-org/matrix-react-sdk/pull/5229)
134+
* Fix Search Results Tile undefined variable access regression
135+
[\#5232](https://github.com/matrix-org/matrix-react-sdk/pull/5232)
136+
* Fix Cmd/Ctrl+Shift+U for File Upload
137+
[\#5233](https://github.com/matrix-org/matrix-react-sdk/pull/5233)
138+
* Disable the e2ee toggle when creating a room on a server with forced e2e
139+
[\#5231](https://github.com/matrix-org/matrix-react-sdk/pull/5231)
140+
* UI Feature Flag: Disable advanced options and tidy up some copy
141+
[\#5215](https://github.com/matrix-org/matrix-react-sdk/pull/5215)
142+
* UI Feature Flag: 3PIDs
143+
[\#5228](https://github.com/matrix-org/matrix-react-sdk/pull/5228)
144+
* Defer encryption setup until first E2EE room
145+
[\#5219](https://github.com/matrix-org/matrix-react-sdk/pull/5219)
146+
* Tidy devDeps, all the webpack stuff lives in the layer above
147+
[\#5179](https://github.com/matrix-org/matrix-react-sdk/pull/5179)
148+
* UI Feature Flag: Hide flair
149+
[\#5214](https://github.com/matrix-org/matrix-react-sdk/pull/5214)
150+
* UI Feature Flag: Identity server
151+
[\#5218](https://github.com/matrix-org/matrix-react-sdk/pull/5218)
152+
* UI Feature Flag: Share dialog QR code and social icons
153+
[\#5221](https://github.com/matrix-org/matrix-react-sdk/pull/5221)
154+
* UI Feature Flag: Registration, Password Reset, Deactivate
155+
[\#5227](https://github.com/matrix-org/matrix-react-sdk/pull/5227)
156+
* Retry joinRoom up to 5 times in the case of a 504 GATEWAY TIMEOUT
157+
[\#5204](https://github.com/matrix-org/matrix-react-sdk/pull/5204)
158+
* UI Feature Flag: Disable VoIP
159+
[\#5217](https://github.com/matrix-org/matrix-react-sdk/pull/5217)
160+
* Fix setState() usage in the constructor of RoomDirectory
161+
[\#5224](https://github.com/matrix-org/matrix-react-sdk/pull/5224)
162+
* Hide Analytics sections if piwik config is not provided
163+
[\#5211](https://github.com/matrix-org/matrix-react-sdk/pull/5211)
164+
* UI Feature Flag: Disable feedback button
165+
[\#5213](https://github.com/matrix-org/matrix-react-sdk/pull/5213)
166+
* Clean up UserInfo to not show a blank Power Selector for users not in room
167+
[\#5220](https://github.com/matrix-org/matrix-react-sdk/pull/5220)
168+
* Also hide bug reporting prompts from the Error Boundaries
169+
[\#5212](https://github.com/matrix-org/matrix-react-sdk/pull/5212)
170+
* Tactical improvements to 3PID invites
171+
[\#5201](https://github.com/matrix-org/matrix-react-sdk/pull/5201)
172+
* If no bug_report_endpoint_url, hide rageshaking from the App
173+
[\#5210](https://github.com/matrix-org/matrix-react-sdk/pull/5210)
174+
* Introduce a concept of UI features, using it for URL previews at first
175+
[\#5208](https://github.com/matrix-org/matrix-react-sdk/pull/5208)
176+
* Remove defunct "always show encryption icons" setting
177+
[\#5207](https://github.com/matrix-org/matrix-react-sdk/pull/5207)
178+
* Don't show Notifications Prompt Toast if user has master rule enabled
179+
[\#5203](https://github.com/matrix-org/matrix-react-sdk/pull/5203)
180+
* Fix Bridges tab crashing when the room does not have bridges
181+
[\#5206](https://github.com/matrix-org/matrix-react-sdk/pull/5206)
182+
* Don't count widgets which no longer exist towards pinned count
183+
[\#5202](https://github.com/matrix-org/matrix-react-sdk/pull/5202)
184+
* Fix crashes with cannot read isResizing of undefined
185+
[\#5205](https://github.com/matrix-org/matrix-react-sdk/pull/5205)
186+
* Prompt to remove the jitsi widget when pressing the call button
187+
[\#5193](https://github.com/matrix-org/matrix-react-sdk/pull/5193)
188+
* Show verification status in the room summary card
189+
[\#5195](https://github.com/matrix-org/matrix-react-sdk/pull/5195)
190+
* Fix user info scrolling in new card view
191+
[\#5198](https://github.com/matrix-org/matrix-react-sdk/pull/5198)
192+
* Fix sticker picker height
193+
[\#5197](https://github.com/matrix-org/matrix-react-sdk/pull/5197)
194+
* Call jitsi widgets 'group calls'
195+
[\#5191](https://github.com/matrix-org/matrix-react-sdk/pull/5191)
196+
* Don't show 'unpin' for persistent widgets
197+
[\#5194](https://github.com/matrix-org/matrix-react-sdk/pull/5194)
198+
* Split up cross-signing and secure backup settings
199+
[\#5182](https://github.com/matrix-org/matrix-react-sdk/pull/5182)
200+
* Fix onNewScreen to use replace when going from roomId->roomAlias
201+
[\#5185](https://github.com/matrix-org/matrix-react-sdk/pull/5185)
202+
* bring back 1.2M style badge counts rather than 99+
203+
[\#5192](https://github.com/matrix-org/matrix-react-sdk/pull/5192)
204+
* Run the rageshake command through the bug report dialog
205+
[\#5189](https://github.com/matrix-org/matrix-react-sdk/pull/5189)
206+
* Account for via in pill matching regex
207+
[\#5188](https://github.com/matrix-org/matrix-react-sdk/pull/5188)
208+
* Remove now-unused create-react-class from lockfile
209+
[\#5187](https://github.com/matrix-org/matrix-react-sdk/pull/5187)
210+
* Fixed 1px jump upwards
211+
[\#5163](https://github.com/matrix-org/matrix-react-sdk/pull/5163)
212+
* Always allow widgets when using the local version
213+
[\#5184](https://github.com/matrix-org/matrix-react-sdk/pull/5184)
214+
* Migrate RoomView and RoomContext to Typescript
215+
[\#5175](https://github.com/matrix-org/matrix-react-sdk/pull/5175)
216+
1217
Changes in [3.4.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.4.1) (2020-09-14)
2218
===================================================================================================
3219
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.4.0...v3.4.1)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ yarn link matrix-js-sdk
160160
yarn install
161161
```
162162

163-
See the [help for `yarn link`](https://yarnpkg.com/docs/cli/link) for more
164-
details about this.
163+
See the [help for `yarn link`](https://classic.yarnpkg.com/docs/cli/link) for
164+
more details about this.
165165

166166
Running tests
167167
=============

__mocks__/browser-request.js

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
const en = require("../src/i18n/strings/en_EN");
2+
const de = require("../src/i18n/strings/de_DE");
23

4+
// Mock the browser-request for the languageHandler tests to return
5+
// Fake languages.json containing references to en_EN and de_DE
6+
// en_EN.json
7+
// de_DE.json
38
module.exports = jest.fn((opts, cb) => {
49
const url = opts.url || opts.uri;
510
if (url && url.endsWith("languages.json")) {
@@ -8,9 +13,15 @@ module.exports = jest.fn((opts, cb) => {
813
"fileName": "en_EN.json",
914
"label": "English",
1015
},
16+
"de": {
17+
"fileName": "de_DE.json",
18+
"label": "German",
19+
},
1120
}));
1221
} else if (url && url.endsWith("en_EN.json")) {
1322
cb(undefined, {status: 200}, JSON.stringify(en));
23+
} else if (url && url.endsWith("de_DE.json")) {
24+
cb(undefined, {status: 200}, JSON.stringify(de));
1425
} else {
1526
cb(true, {status: 404}, "");
1627
}

__test-utils__/environment.js

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
const BaseEnvironment = require("jest-environment-jsdom-sixteen");
2+
3+
class Environment extends BaseEnvironment {
4+
constructor(config, options) {
5+
super(Object.assign({}, config, {
6+
globals: Object.assign({}, config.globals, {
7+
// Explicitly specify the correct globals to workaround Jest bug
8+
// https://github.com/facebook/jest/issues/7780
9+
Uint32Array: Uint32Array,
10+
Uint8Array: Uint8Array,
11+
ArrayBuffer: ArrayBuffer,
12+
}),
13+
}), options);
14+
}
15+
}
16+
17+
module.exports = Environment;

package.json

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "matrix-react-sdk",
3-
"version": "3.4.1",
3+
"version": "3.6.0",
44
"description": "SDK for matrix.org using React",
55
"author": "matrix.org",
66
"repository": {
@@ -79,6 +79,7 @@
7979
"linkifyjs": "^2.1.9",
8080
"lodash": "^4.17.19",
8181
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
82+
"matrix-widget-api": "^0.1.0-beta.5",
8283
"minimist": "^1.2.5",
8384
"pako": "^1.0.11",
8485
"parse5": "^5.1.1",
@@ -95,7 +96,7 @@
9596
"react-transition-group": "^4.4.1",
9697
"resize-observer-polyfill": "^1.5.1",
9798
"rfc4648": "^1.4.0",
98-
"sanitize-html": "^1.27.1",
99+
"sanitize-html": "github:apostrophecms/sanitize-html#3c7f93f2058f696f5359e3e58d464161647226db",
99100
"tar-js": "^0.3.0",
100101
"text-encoding-utf-8": "^1.0.2",
101102
"url": "^0.11.0",
@@ -120,7 +121,7 @@
120121
"@babel/preset-typescript": "^7.10.4",
121122
"@babel/register": "^7.10.5",
122123
"@babel/traverse": "^7.11.0",
123-
"@peculiar/webcrypto": "^1.1.2",
124+
"@peculiar/webcrypto": "^1.1.3",
124125
"@types/classnames": "^2.2.10",
125126
"@types/counterpart": "^0.18.1",
126127
"@types/flux": "^3.1.9",
@@ -150,8 +151,9 @@
150151
"eslint-plugin-react": "^7.20.3",
151152
"eslint-plugin-react-hooks": "^2.5.1",
152153
"glob": "^5.0.15",
153-
"jest": "^24.9.0",
154-
"jest-canvas-mock": "^2.2.0",
154+
"jest": "^26.5.2",
155+
"jest-canvas-mock": "^2.3.0",
156+
"jest-environment-jsdom-sixteen": "^1.0.3",
155157
"lolex": "^5.1.2",
156158
"matrix-mock-request": "^1.2.3",
157159
"matrix-react-test-utils": "^0.2.2",
@@ -164,6 +166,7 @@
164166
"walk": "^2.3.14"
165167
},
166168
"jest": {
169+
"testEnvironment": "./__test-utils__/environment.js",
167170
"testMatch": [
168171
"<rootDir>/test/**/*-test.js"
169172
],

release.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,9 @@ set -e
99

1010
cd `dirname $0`
1111

12+
# This link seems to get eaten by the release process, so ensure it exists.
13+
yarn link matrix-js-sdk
14+
1215
for i in matrix-js-sdk
1316
do
1417
echo "Checking version of $i..."

0 commit comments

Comments
 (0)