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

Commit 12657f0

Browse files
committed
Merge branch 'develop' into edit-slashcommands
2 parents 122565b + 70d7a59 commit 12657f0

File tree

336 files changed

+11494
-4033
lines changed

Some content is hidden

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

336 files changed

+11494
-4033
lines changed

.eslintignore.errorfiles

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# autogenerated file: run scripts/generate-eslint-error-ignore-file to update.
22

33
src/Markdown.js
4-
src/Velociraptor.js
4+
src/NodeAnimator.js
55
src/components/structures/RoomDirectory.js
66
src/components/views/rooms/MemberList.js
77
src/ratelimitedfunc.js

.eslintrc.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ module.exports = {
1515
"prefer-promise-reject-errors": "off",
1616
"no-async-promise-executor": "off",
1717
"quotes": "off",
18-
"indent": "off",
1918
},
2019

2120
overrides: [{

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
/*.log
33
package-lock.json
44

5+
/coverage
56
/node_modules
67
/lib
78

CHANGELOG.md

Lines changed: 236 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,233 @@
1+
Changes in [3.20.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.20.0) (2021-05-10)
2+
=====================================================================================================
3+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.20.0-rc.1...v3.20.0)
4+
5+
* Upgrade to JS SDK 10.1.0
6+
* [Release] Don't use the event's metadata to calc the scale of an image
7+
[\#6004](https://github.com/matrix-org/matrix-react-sdk/pull/6004)
8+
9+
Changes in [3.20.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.20.0-rc.1) (2021-05-04)
10+
===============================================================================================================
11+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.19.0...v3.20.0-rc.1)
12+
13+
* Upgrade to JS SDK 10.1.0-rc.1
14+
* Translations update from Weblate
15+
[\#5966](https://github.com/matrix-org/matrix-react-sdk/pull/5966)
16+
* Fix more space panel layout and hover behaviour issues
17+
[\#5965](https://github.com/matrix-org/matrix-react-sdk/pull/5965)
18+
* Fix edge case with space panel alignment with subspaces on ff
19+
[\#5964](https://github.com/matrix-org/matrix-react-sdk/pull/5964)
20+
* Fix saving room pill part to history
21+
[\#5951](https://github.com/matrix-org/matrix-react-sdk/pull/5951)
22+
* Generate room preview even when minimized
23+
[\#5948](https://github.com/matrix-org/matrix-react-sdk/pull/5948)
24+
* Another change from recovery passphrase to Security Phrase
25+
[\#5934](https://github.com/matrix-org/matrix-react-sdk/pull/5934)
26+
* Sort rooms in the add existing to space dialog based on recency
27+
[\#5943](https://github.com/matrix-org/matrix-react-sdk/pull/5943)
28+
* Inhibit sending RR when context switching to a room
29+
[\#5944](https://github.com/matrix-org/matrix-react-sdk/pull/5944)
30+
* Prevent room list keyboard handling from landing focus on hidden nodes
31+
[\#5950](https://github.com/matrix-org/matrix-react-sdk/pull/5950)
32+
* Make the text filter search all spaces instead of just the selected one
33+
[\#5942](https://github.com/matrix-org/matrix-react-sdk/pull/5942)
34+
* Enable indent rule and fix indent
35+
[\#5931](https://github.com/matrix-org/matrix-react-sdk/pull/5931)
36+
* Prevent peeking members from reacting
37+
[\#5946](https://github.com/matrix-org/matrix-react-sdk/pull/5946)
38+
* Disallow inline display maths
39+
[\#5939](https://github.com/matrix-org/matrix-react-sdk/pull/5939)
40+
* Space creation prompt user to add existing rooms for "Just Me" spaces
41+
[\#5923](https://github.com/matrix-org/matrix-react-sdk/pull/5923)
42+
* Add test coverage collection script
43+
[\#5937](https://github.com/matrix-org/matrix-react-sdk/pull/5937)
44+
* Fix joining room using via servers regression
45+
[\#5936](https://github.com/matrix-org/matrix-react-sdk/pull/5936)
46+
* Revert "Fixes the two Todays problem in Redaction"
47+
[\#5938](https://github.com/matrix-org/matrix-react-sdk/pull/5938)
48+
* Handle encoded matrix URLs
49+
[\#5903](https://github.com/matrix-org/matrix-react-sdk/pull/5903)
50+
* Render ignored users setting regardless of if there are any
51+
[\#5860](https://github.com/matrix-org/matrix-react-sdk/pull/5860)
52+
* Fix inserting trailing colon after mention/pill
53+
[\#5830](https://github.com/matrix-org/matrix-react-sdk/pull/5830)
54+
* Fixes the two Todays problem in Redaction
55+
[\#5917](https://github.com/matrix-org/matrix-react-sdk/pull/5917)
56+
* Fix page up/down scrolling only half a page
57+
[\#5920](https://github.com/matrix-org/matrix-react-sdk/pull/5920)
58+
* Voice messages: Composer controls
59+
[\#5935](https://github.com/matrix-org/matrix-react-sdk/pull/5935)
60+
* Support MSC3086 asserted identity
61+
[\#5886](https://github.com/matrix-org/matrix-react-sdk/pull/5886)
62+
* Handle possible edge case with getting stuck in "unsent messages" bar
63+
[\#5930](https://github.com/matrix-org/matrix-react-sdk/pull/5930)
64+
* Fix suggested rooms not showing up regression from room list optimisation
65+
[\#5932](https://github.com/matrix-org/matrix-react-sdk/pull/5932)
66+
* Broadcast language change to ElectronPlatform
67+
[\#5913](https://github.com/matrix-org/matrix-react-sdk/pull/5913)
68+
* Fix VoIP PIP frame color
69+
[\#5701](https://github.com/matrix-org/matrix-react-sdk/pull/5701)
70+
* Convert some Flow-typed files to TypeScript
71+
[\#5912](https://github.com/matrix-org/matrix-react-sdk/pull/5912)
72+
* Initial SpaceStore tests work
73+
[\#5906](https://github.com/matrix-org/matrix-react-sdk/pull/5906)
74+
* Fix issues with space hierarchy in layout and with incompatible servers
75+
[\#5926](https://github.com/matrix-org/matrix-react-sdk/pull/5926)
76+
* Scale all mxc thumbs using device pixel ratio for hidpi
77+
[\#5928](https://github.com/matrix-org/matrix-react-sdk/pull/5928)
78+
* Fix add existing to space dialog no longer showing rooms for public spaces
79+
[\#5918](https://github.com/matrix-org/matrix-react-sdk/pull/5918)
80+
* Disable spaces context switching for when exploring a space
81+
[\#5924](https://github.com/matrix-org/matrix-react-sdk/pull/5924)
82+
* Autofocus search box in the add existing to space dialog
83+
[\#5921](https://github.com/matrix-org/matrix-react-sdk/pull/5921)
84+
* Use label element in add existing to space dialog for easier hit target
85+
[\#5922](https://github.com/matrix-org/matrix-react-sdk/pull/5922)
86+
* Dynamic max and min zoom in the new ImageView
87+
[\#5916](https://github.com/matrix-org/matrix-react-sdk/pull/5916)
88+
* Improve message error states
89+
[\#5897](https://github.com/matrix-org/matrix-react-sdk/pull/5897)
90+
* Check for null room in `VisibilityProvider`
91+
[\#5914](https://github.com/matrix-org/matrix-react-sdk/pull/5914)
92+
* Add unit tests for various collection-based utility functions
93+
[\#5910](https://github.com/matrix-org/matrix-react-sdk/pull/5910)
94+
* Spaces visual fixes
95+
[\#5909](https://github.com/matrix-org/matrix-react-sdk/pull/5909)
96+
* Remove reliance on DOM API to generated message preview
97+
[\#5908](https://github.com/matrix-org/matrix-react-sdk/pull/5908)
98+
* Expand upon voice message event & include overall waveform
99+
[\#5888](https://github.com/matrix-org/matrix-react-sdk/pull/5888)
100+
* Use floats for image background opacity
101+
[\#5905](https://github.com/matrix-org/matrix-react-sdk/pull/5905)
102+
* Show invites to spaces at the top of the space panel
103+
[\#5902](https://github.com/matrix-org/matrix-react-sdk/pull/5902)
104+
* Improve edge cases with spaces context switching
105+
[\#5899](https://github.com/matrix-org/matrix-react-sdk/pull/5899)
106+
* Fix spaces notification dots wrongly including upgraded (hidden) rooms
107+
[\#5900](https://github.com/matrix-org/matrix-react-sdk/pull/5900)
108+
* Iterate the spaces face pile design
109+
[\#5898](https://github.com/matrix-org/matrix-react-sdk/pull/5898)
110+
* Fix alignment issue with nested spaces being cut off wrong
111+
[\#5890](https://github.com/matrix-org/matrix-react-sdk/pull/5890)
112+
113+
Changes in [3.19.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.19.0) (2021-04-26)
114+
=====================================================================================================
115+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.19.0-rc.1...v3.19.0)
116+
117+
* Upgrade to JS SDK 10.0.0
118+
* [Release] Dynamic max and min zoom in the new ImageView
119+
[\#5927](https://github.com/matrix-org/matrix-react-sdk/pull/5927)
120+
* [Release] Add a WheelEvent normalization function
121+
[\#5911](https://github.com/matrix-org/matrix-react-sdk/pull/5911)
122+
* Add a WheelEvent normalization function
123+
[\#5904](https://github.com/matrix-org/matrix-react-sdk/pull/5904)
124+
* [Release] Use floats for image background opacity
125+
[\#5907](https://github.com/matrix-org/matrix-react-sdk/pull/5907)
126+
127+
Changes in [3.19.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.19.0-rc.1) (2021-04-21)
128+
===============================================================================================================
129+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.18.0...v3.19.0-rc.1)
130+
131+
* Upgrade to JS SDK 10.0.0-rc.1
132+
* Translations update from Weblate
133+
[\#5896](https://github.com/matrix-org/matrix-react-sdk/pull/5896)
134+
* Fix sticky tags header in room list
135+
[\#5895](https://github.com/matrix-org/matrix-react-sdk/pull/5895)
136+
* Fix spaces filtering sometimes lagging behind or behaving oddly
137+
[\#5893](https://github.com/matrix-org/matrix-react-sdk/pull/5893)
138+
* Fix issue with spaces context switching looping and breaking
139+
[\#5894](https://github.com/matrix-org/matrix-react-sdk/pull/5894)
140+
* Improve RoomList render time when filtering
141+
[\#5874](https://github.com/matrix-org/matrix-react-sdk/pull/5874)
142+
* Avoid being stuck in a space
143+
[\#5891](https://github.com/matrix-org/matrix-react-sdk/pull/5891)
144+
* [Spaces] Context switching
145+
[\#5795](https://github.com/matrix-org/matrix-react-sdk/pull/5795)
146+
* Warn when you attempt to leave room that you are the only member of
147+
[\#5415](https://github.com/matrix-org/matrix-react-sdk/pull/5415)
148+
* Ensure PersistedElement are unmounted on application logout
149+
[\#5884](https://github.com/matrix-org/matrix-react-sdk/pull/5884)
150+
* Add missing space in seshat dialog and the corresponding string
151+
[\#5866](https://github.com/matrix-org/matrix-react-sdk/pull/5866)
152+
* A tiny change to make the Add existing rooms dialog a little nicer
153+
[\#5885](https://github.com/matrix-org/matrix-react-sdk/pull/5885)
154+
* Remove weird margin from the file panel
155+
[\#5889](https://github.com/matrix-org/matrix-react-sdk/pull/5889)
156+
* Trigger lazy loading when filtering using spaces
157+
[\#5882](https://github.com/matrix-org/matrix-react-sdk/pull/5882)
158+
* Fix typo in method call in add existing to space dialog
159+
[\#5883](https://github.com/matrix-org/matrix-react-sdk/pull/5883)
160+
* New Image View fixes/improvements
161+
[\#5872](https://github.com/matrix-org/matrix-react-sdk/pull/5872)
162+
* Limit voice recording length
163+
[\#5871](https://github.com/matrix-org/matrix-react-sdk/pull/5871)
164+
* Clean up add existing to space dialog and include DMs in it too
165+
[\#5881](https://github.com/matrix-org/matrix-react-sdk/pull/5881)
166+
* Fix unknown slash command error exploding
167+
[\#5853](https://github.com/matrix-org/matrix-react-sdk/pull/5853)
168+
* Switch to a spec conforming email validation Regexp
169+
[\#5852](https://github.com/matrix-org/matrix-react-sdk/pull/5852)
170+
* Cleanup unused state in MessageComposer
171+
[\#5877](https://github.com/matrix-org/matrix-react-sdk/pull/5877)
172+
* Pulse animation for voice messages recording state
173+
[\#5869](https://github.com/matrix-org/matrix-react-sdk/pull/5869)
174+
* Don't include invisible rooms in notify summary
175+
[\#5875](https://github.com/matrix-org/matrix-react-sdk/pull/5875)
176+
* Properly disable composer access when recording a voice message
177+
[\#5870](https://github.com/matrix-org/matrix-react-sdk/pull/5870)
178+
* Stabilise starting a DM with multiple people flow
179+
[\#5862](https://github.com/matrix-org/matrix-react-sdk/pull/5862)
180+
* Render msgOption only if showReadReceipts is enabled
181+
[\#5864](https://github.com/matrix-org/matrix-react-sdk/pull/5864)
182+
* Labs: Add quick/cheap "do not disturb" flag
183+
[\#5873](https://github.com/matrix-org/matrix-react-sdk/pull/5873)
184+
* Fix ReadReceipts animations
185+
[\#5836](https://github.com/matrix-org/matrix-react-sdk/pull/5836)
186+
* Add tooltips to message previews
187+
[\#5859](https://github.com/matrix-org/matrix-react-sdk/pull/5859)
188+
* IRC Layout fix layout spacing in replies
189+
[\#5855](https://github.com/matrix-org/matrix-react-sdk/pull/5855)
190+
* Move user to welcome_page if continuing with previous session
191+
[\#5849](https://github.com/matrix-org/matrix-react-sdk/pull/5849)
192+
* Improve image view
193+
[\#5521](https://github.com/matrix-org/matrix-react-sdk/pull/5521)
194+
* Add a button to reset personal encryption state during login
195+
[\#5819](https://github.com/matrix-org/matrix-react-sdk/pull/5819)
196+
* Fix js-sdk import in SlashCommands
197+
[\#5850](https://github.com/matrix-org/matrix-react-sdk/pull/5850)
198+
* Fix useRoomPowerLevels hook
199+
[\#5854](https://github.com/matrix-org/matrix-react-sdk/pull/5854)
200+
* Prevent state events being rendered with invalid state keys
201+
[\#5851](https://github.com/matrix-org/matrix-react-sdk/pull/5851)
202+
* Give server ACLs a name in 'roles & permissions' tab
203+
[\#5838](https://github.com/matrix-org/matrix-react-sdk/pull/5838)
204+
* Don't hide notification badge on the home space button as it has no menu
205+
[\#5845](https://github.com/matrix-org/matrix-react-sdk/pull/5845)
206+
* User Info hide disambiguation as we always show MXID anyway
207+
[\#5843](https://github.com/matrix-org/matrix-react-sdk/pull/5843)
208+
* Improve kick state to not show if the target was not joined to begin with
209+
[\#5846](https://github.com/matrix-org/matrix-react-sdk/pull/5846)
210+
* Fix space store wrongly switching to a non-space filter
211+
[\#5844](https://github.com/matrix-org/matrix-react-sdk/pull/5844)
212+
* Tweak appearance of invite reason
213+
[\#5847](https://github.com/matrix-org/matrix-react-sdk/pull/5847)
214+
* Update Inter font to v3.18
215+
[\#5840](https://github.com/matrix-org/matrix-react-sdk/pull/5840)
216+
* Enable sharing historical keys on invite
217+
[\#5839](https://github.com/matrix-org/matrix-react-sdk/pull/5839)
218+
* Add ability to hide post-login encryption setup with customisation point
219+
[\#5834](https://github.com/matrix-org/matrix-react-sdk/pull/5834)
220+
* Use LaTeX and TeX delimiters by default
221+
[\#5515](https://github.com/matrix-org/matrix-react-sdk/pull/5515)
222+
* Clone author's deps fork for Netlify previews
223+
[\#5837](https://github.com/matrix-org/matrix-react-sdk/pull/5837)
224+
* Show drop file UI only if dragging a file
225+
[\#5827](https://github.com/matrix-org/matrix-react-sdk/pull/5827)
226+
* Ignore punctuation when filtering rooms
227+
[\#5824](https://github.com/matrix-org/matrix-react-sdk/pull/5824)
228+
* Resizable CallView
229+
[\#5710](https://github.com/matrix-org/matrix-react-sdk/pull/5710)
230+
1231
Changes in [3.18.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.18.0) (2021-04-12)
2232
=====================================================================================================
3233
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.18.0-rc.1...v3.18.0)
@@ -312,11 +542,12 @@ Changes in [3.15.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/
312542

313543
## Security notice
314544

315-
matrix-react-sdk 3.15.0 fixes a low severity issue (CVE-2021-21320) where the
316-
user content sandbox can be abused to trick users into opening unexpected
317-
documents. The content is opened with a `blob` origin that cannot access Matrix
318-
user data, so messages and secrets are not at risk. Thanks to @keerok for
319-
responsibly disclosing this via Matrix's Security Disclosure Policy.
545+
matrix-react-sdk 3.15.0 fixes a moderate severity issue (CVE-2021-21320) where
546+
the user content sandbox can be abused to trick users into opening unexpected
547+
documents after several user interactions. The content can be opened with a
548+
`blob` origin from the Matrix client, so it is possible for a malicious document
549+
to access user messages and secrets. Thanks to @keerok for responsibly
550+
disclosing this via Matrix's Security Disclosure Policy.
320551

321552
## All changes
322553

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ Platform Targets:
2828
* WebRTC features (VoIP and Video calling) are only available in Chrome & Firefox.
2929
* Mobile Web is not currently a target platform - instead please use the native
3030
iOS (https://github.com/matrix-org/matrix-ios-kit) and Android
31-
(https://github.com/matrix-org/matrix-android-sdk) SDKs.
31+
(https://github.com/matrix-org/matrix-android-sdk2) SDKs.
3232

3333
All code lands on the `develop` branch - `master` is only used for stable releases.
3434
**Please file PRs against `develop`!!**

package.json

Lines changed: 14 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "matrix-react-sdk",
3-
"version": "3.18.0",
3+
"version": "3.20.0",
44
"description": "SDK for matrix.org using React",
55
"author": "matrix.org",
66
"repository": {
@@ -23,9 +23,7 @@
2323
"package.json"
2424
],
2525
"bin": {
26-
"reskindex": "scripts/reskindex.js",
27-
"matrix-gen-i18n": "scripts/gen-i18n.js",
28-
"matrix-prune-i18n": "scripts/prune-i18n.js"
26+
"reskindex": "scripts/reskindex.js"
2927
},
3028
"main": "./src/index.js",
3129
"matrix_src_main": "./src/index.js",
@@ -35,7 +33,7 @@
3533
"prepublishOnly": "yarn build",
3634
"i18n": "matrix-gen-i18n",
3735
"prunei18n": "matrix-prune-i18n",
38-
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && ./scripts/gen-i18n.js && node scripts/compare-file.js src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
36+
"diff-i18n": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && matrix-gen-i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
3937
"reskindex": "node scripts/reskindex.js -h header",
4038
"reskindex:watch": "node scripts/reskindex.js -h header -w",
4139
"rethemendex": "res/css/rethemendex.sh",
@@ -51,7 +49,8 @@
5149
"lint:types": "tsc --noEmit --jsx react",
5250
"lint:style": "stylelint 'res/css/**/*.scss'",
5351
"test": "jest",
54-
"test:e2e": "./test/end-to-end-tests/run.sh --app-url http://localhost:8080"
52+
"test:e2e": "./test/end-to-end-tests/run.sh --app-url http://localhost:8080",
53+
"coverage": "yarn test --coverage"
5554
},
5655
"dependencies": {
5756
"@babel/runtime": "^7.12.5",
@@ -98,11 +97,10 @@
9897
"react-transition-group": "^4.4.1",
9998
"resize-observer-polyfill": "^1.5.1",
10099
"rfc4648": "^1.4.0",
101-
"sanitize-html": "github:apostrophecms/sanitize-html#3c7f93f2058f696f5359e3e58d464161647226db",
100+
"sanitize-html": "^2.3.2",
102101
"tar-js": "^0.3.0",
103102
"text-encoding-utf-8": "^1.0.2",
104103
"url": "^0.11.0",
105-
"velocity-animate": "^2.0.6",
106104
"what-input": "^5.2.10",
107105
"zxcvbn": "^4.4.2"
108106
},
@@ -134,6 +132,7 @@
134132
"@types/modernizr": "^3.5.3",
135133
"@types/node": "^14.14.22",
136134
"@types/pako": "^1.0.1",
135+
"@types/parse5": "^6.0.0",
137136
"@types/qrcode": "^1.3.5",
138137
"@types/react": "^16.9",
139138
"@types/react-dom": "^16.9.10",
@@ -161,6 +160,7 @@
161160
"jest-fetch-mock": "^3.0.3",
162161
"matrix-mock-request": "^1.2.3",
163162
"matrix-react-test-utils": "^0.2.2",
163+
"matrix-web-i18n": "github:matrix-org/matrix-web-i18n",
164164
"olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",
165165
"react-test-renderer": "^16.14.0",
166166
"rimraf": "^3.0.2",
@@ -190,6 +190,12 @@
190190
},
191191
"transformIgnorePatterns": [
192192
"/node_modules/(?!matrix-js-sdk).+$"
193+
],
194+
"collectCoverageFrom": [
195+
"<rootDir>/src/**/*.{js,ts,tsx}"
196+
],
197+
"coverageReporters": [
198+
"text"
193199
]
194200
}
195201
}

res/css/_common.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,16 @@ $MessageTimestamp_width_hover: calc($MessageTimestamp_width - 2 * $EventTile_e2e
2828

2929
:root {
3030
font-size: 10px;
31+
32+
--transition-short: .1s;
33+
--transition-standard: .3s;
34+
}
35+
36+
@media (prefers-reduced-motion) {
37+
:root {
38+
--transition-short: 0;
39+
--transition-standard: 0;
40+
}
3141
}
3242

3343
html {

0 commit comments

Comments
 (0)