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

Commit 8a709b3

Browse files
committed
Merge branch 'develop' into spoiler-command
2 parents f1fabd8 + 75bfaa5 commit 8a709b3

File tree

501 files changed

+14886
-2830
lines changed

Some content is hidden

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

501 files changed

+14886
-2830
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@ package-lock.json
1313
/src/component-index.js
1414

1515
.DS_Store
16+
*.tmp

CHANGELOG.md

Lines changed: 201 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,204 @@
1+
Changes in [3.16.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.16.0) (2021-03-15)
2+
=====================================================================================================
3+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.16.0-rc.2...v3.16.0)
4+
5+
* Upgrade to JS SDK 9.9.0
6+
* [Release] Change read receipt drift to be non-fractional
7+
[\#5746](https://github.com/matrix-org/matrix-react-sdk/pull/5746)
8+
* [Release] Properly gate SpaceRoomView behind labs
9+
[\#5750](https://github.com/matrix-org/matrix-react-sdk/pull/5750)
10+
11+
Changes in [3.16.0-rc.2](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.16.0-rc.2) (2021-03-10)
12+
===============================================================================================================
13+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.16.0-rc.1...v3.16.0-rc.2)
14+
15+
* Fixed incorrect build output in rc.1
16+
17+
Changes in [3.16.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.16.0-rc.1) (2021-03-10)
18+
===============================================================================================================
19+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.15.0...v3.16.0-rc.1)
20+
21+
* Upgrade to JS SDK 9.9.0-rc.1
22+
* Translations update from Weblate
23+
[\#5743](https://github.com/matrix-org/matrix-react-sdk/pull/5743)
24+
* Document behaviour of showReadReceipts=false for sent receipts
25+
[\#5739](https://github.com/matrix-org/matrix-react-sdk/pull/5739)
26+
* Tweak sent marker code style
27+
[\#5741](https://github.com/matrix-org/matrix-react-sdk/pull/5741)
28+
* Fix sent markers disappearing for edits/reactions
29+
[\#5737](https://github.com/matrix-org/matrix-react-sdk/pull/5737)
30+
* Ignore to-device decryption in the room list store
31+
[\#5740](https://github.com/matrix-org/matrix-react-sdk/pull/5740)
32+
* Spaces suggested rooms support
33+
[\#5736](https://github.com/matrix-org/matrix-react-sdk/pull/5736)
34+
* Add tooltips to sent/sending receipts
35+
[\#5738](https://github.com/matrix-org/matrix-react-sdk/pull/5738)
36+
* Remove a bunch of useless 'use strict' definitions
37+
[\#5735](https://github.com/matrix-org/matrix-react-sdk/pull/5735)
38+
* [SK-1] Fix types for replaceableComponent
39+
[\#5732](https://github.com/matrix-org/matrix-react-sdk/pull/5732)
40+
* [SK-2] Make debugging skinning problems easier
41+
[\#5733](https://github.com/matrix-org/matrix-react-sdk/pull/5733)
42+
* Support sending invite reasons with /invite command
43+
[\#5695](https://github.com/matrix-org/matrix-react-sdk/pull/5695)
44+
* Fix clicking on the avatar for opening member info requires pixel-perfect
45+
accuracy
46+
[\#5717](https://github.com/matrix-org/matrix-react-sdk/pull/5717)
47+
* Display decrypted and encrypted event source on the same dialog
48+
[\#5713](https://github.com/matrix-org/matrix-react-sdk/pull/5713)
49+
* Fix units of TURN server expiry time
50+
[\#5730](https://github.com/matrix-org/matrix-react-sdk/pull/5730)
51+
* Display room name in pills instead of address
52+
[\#5624](https://github.com/matrix-org/matrix-react-sdk/pull/5624)
53+
* Refresh UI for file uploads
54+
[\#5723](https://github.com/matrix-org/matrix-react-sdk/pull/5723)
55+
* UI refresh for uploaded files
56+
[\#5719](https://github.com/matrix-org/matrix-react-sdk/pull/5719)
57+
* Improve message sending states to match new designs
58+
[\#5699](https://github.com/matrix-org/matrix-react-sdk/pull/5699)
59+
* Add clipboard write permission for widgets
60+
[\#5725](https://github.com/matrix-org/matrix-react-sdk/pull/5725)
61+
* Fix widget resizing
62+
[\#5722](https://github.com/matrix-org/matrix-react-sdk/pull/5722)
63+
* Option for audio streaming
64+
[\#5707](https://github.com/matrix-org/matrix-react-sdk/pull/5707)
65+
* Show a specific error for hs_disabled
66+
[\#5576](https://github.com/matrix-org/matrix-react-sdk/pull/5576)
67+
* Add Edge to the targets list
68+
[\#5721](https://github.com/matrix-org/matrix-react-sdk/pull/5721)
69+
* File drop UI fixes and improvements
70+
[\#5505](https://github.com/matrix-org/matrix-react-sdk/pull/5505)
71+
* Fix Bottom border of state counters is white on the dark theme
72+
[\#5715](https://github.com/matrix-org/matrix-react-sdk/pull/5715)
73+
* Trim spurious whitespace of nicknames
74+
[\#5332](https://github.com/matrix-org/matrix-react-sdk/pull/5332)
75+
* Ensure HostSignupDialog border colour matches light theme
76+
[\#5716](https://github.com/matrix-org/matrix-react-sdk/pull/5716)
77+
* Don't place another call if there's already one ongoing
78+
[\#5712](https://github.com/matrix-org/matrix-react-sdk/pull/5712)
79+
* Space room hierarchies
80+
[\#5706](https://github.com/matrix-org/matrix-react-sdk/pull/5706)
81+
* Iterate Space view and right panel
82+
[\#5705](https://github.com/matrix-org/matrix-react-sdk/pull/5705)
83+
* Add a scroll to bottom on message sent setting
84+
[\#5692](https://github.com/matrix-org/matrix-react-sdk/pull/5692)
85+
* Add .tmp files to gitignore
86+
[\#5708](https://github.com/matrix-org/matrix-react-sdk/pull/5708)
87+
* Initial Space Room View and Creation UX
88+
[\#5704](https://github.com/matrix-org/matrix-react-sdk/pull/5704)
89+
* Add multi language spell check
90+
[\#5452](https://github.com/matrix-org/matrix-react-sdk/pull/5452)
91+
* Fix tetris effect (holes) in read receipts
92+
[\#5697](https://github.com/matrix-org/matrix-react-sdk/pull/5697)
93+
* Fixed edit for markdown images
94+
[\#5703](https://github.com/matrix-org/matrix-react-sdk/pull/5703)
95+
* Iterate Space Panel
96+
[\#5702](https://github.com/matrix-org/matrix-react-sdk/pull/5702)
97+
* Fix read receipts for compact layout
98+
[\#5700](https://github.com/matrix-org/matrix-react-sdk/pull/5700)
99+
* Space Store and Space Panel for Room List filtering
100+
[\#5689](https://github.com/matrix-org/matrix-react-sdk/pull/5689)
101+
* Log when turn creds expire
102+
[\#5691](https://github.com/matrix-org/matrix-react-sdk/pull/5691)
103+
* Null check for maxHeight in call view
104+
[\#5690](https://github.com/matrix-org/matrix-react-sdk/pull/5690)
105+
* Autocomplete invited users
106+
[\#5687](https://github.com/matrix-org/matrix-react-sdk/pull/5687)
107+
* Add send message button
108+
[\#5535](https://github.com/matrix-org/matrix-react-sdk/pull/5535)
109+
* Move call buttons to the room header
110+
[\#5693](https://github.com/matrix-org/matrix-react-sdk/pull/5693)
111+
* Use the default SSSS key if the default is set
112+
[\#5638](https://github.com/matrix-org/matrix-react-sdk/pull/5638)
113+
* Initial Spaces feature flag
114+
[\#5668](https://github.com/matrix-org/matrix-react-sdk/pull/5668)
115+
* Clean up code edge cases and add helpers
116+
[\#5667](https://github.com/matrix-org/matrix-react-sdk/pull/5667)
117+
* Clean up widgets when leaving the room
118+
[\#5684](https://github.com/matrix-org/matrix-react-sdk/pull/5684)
119+
* Fix read receipts?
120+
[\#5567](https://github.com/matrix-org/matrix-react-sdk/pull/5567)
121+
* Fix MAU usage alerts
122+
[\#5678](https://github.com/matrix-org/matrix-react-sdk/pull/5678)
123+
124+
Changes in [3.15.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.15.0) (2021-03-01)
125+
=====================================================================================================
126+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.15.0-rc.1...v3.15.0)
127+
128+
## Security notice
129+
130+
matrix-react-sdk 3.15.0 fixes a low severity issue (CVE-2021-21320) where the
131+
user content sandbox can be abused to trick users into opening unexpected
132+
documents. The content is opened with a `blob` origin that cannot access Matrix
133+
user data, so messages and secrets are not at risk. Thanks to @keerok for
134+
responsibly disclosing this via Matrix's Security Disclosure Policy.
135+
136+
## All changes
137+
138+
* Upgrade to JS SDK 9.8.0
139+
140+
Changes in [3.15.0-rc.1](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.15.0-rc.1) (2021-02-24)
141+
===============================================================================================================
142+
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.14.0...v3.15.0-rc.1)
143+
144+
* Upgrade to JS SDK 9.8.0-rc.1
145+
* Translations update from Weblate
146+
[\#5683](https://github.com/matrix-org/matrix-react-sdk/pull/5683)
147+
* Fix object diffing when objects have different keys
148+
[\#5681](https://github.com/matrix-org/matrix-react-sdk/pull/5681)
149+
* Add <code> if it's missing
150+
[\#5673](https://github.com/matrix-org/matrix-react-sdk/pull/5673)
151+
* Add email only if the verification is complete
152+
[\#5629](https://github.com/matrix-org/matrix-react-sdk/pull/5629)
153+
* Fix portrait videocalls
154+
[\#5676](https://github.com/matrix-org/matrix-react-sdk/pull/5676)
155+
* Tweak code block icon positions
156+
[\#5643](https://github.com/matrix-org/matrix-react-sdk/pull/5643)
157+
* Revert "Improve URL preview formatting and image upload thumbnail size"
158+
[\#5677](https://github.com/matrix-org/matrix-react-sdk/pull/5677)
159+
* Fix context menu leaving visible area
160+
[\#5644](https://github.com/matrix-org/matrix-react-sdk/pull/5644)
161+
* Jitsi conferences names, take 3
162+
[\#5675](https://github.com/matrix-org/matrix-react-sdk/pull/5675)
163+
* Update isUserOnDarkTheme to take use_system_theme in account
164+
[\#5670](https://github.com/matrix-org/matrix-react-sdk/pull/5670)
165+
* Discard some dead code
166+
[\#5665](https://github.com/matrix-org/matrix-react-sdk/pull/5665)
167+
* Add developer tool to explore and edit settings
168+
[\#5664](https://github.com/matrix-org/matrix-react-sdk/pull/5664)
169+
* Use and create new room helpers
170+
[\#5663](https://github.com/matrix-org/matrix-react-sdk/pull/5663)
171+
* Clear message previews when the maximum limit is reached for history
172+
[\#5661](https://github.com/matrix-org/matrix-react-sdk/pull/5661)
173+
* VoIP virtual rooms, mk II
174+
[\#5639](https://github.com/matrix-org/matrix-react-sdk/pull/5639)
175+
* Disable chat effects when reduced motion preferred
176+
[\#5660](https://github.com/matrix-org/matrix-react-sdk/pull/5660)
177+
* Improve URL preview formatting and image upload thumbnail size
178+
[\#5637](https://github.com/matrix-org/matrix-react-sdk/pull/5637)
179+
* Fix border radius when the panel is collapsed
180+
[\#5641](https://github.com/matrix-org/matrix-react-sdk/pull/5641)
181+
* Use a more generic layout setting - useIRCLayout → layout
182+
[\#5571](https://github.com/matrix-org/matrix-react-sdk/pull/5571)
183+
* Remove redundant lockOrigin parameter from usercontent
184+
[\#5657](https://github.com/matrix-org/matrix-react-sdk/pull/5657)
185+
* Set ICE candidate pool size option
186+
[\#5655](https://github.com/matrix-org/matrix-react-sdk/pull/5655)
187+
* Prepare to encrypt when a call arrives
188+
[\#5654](https://github.com/matrix-org/matrix-react-sdk/pull/5654)
189+
* Use config for host signup branding
190+
[\#5650](https://github.com/matrix-org/matrix-react-sdk/pull/5650)
191+
* Use randomly generated conference names for Jitsi
192+
[\#5649](https://github.com/matrix-org/matrix-react-sdk/pull/5649)
193+
* Modified regex to account for an immediate new line after slash commands
194+
[\#5647](https://github.com/matrix-org/matrix-react-sdk/pull/5647)
195+
* Fix codeblock scrollbar color for non-Firefox
196+
[\#5642](https://github.com/matrix-org/matrix-react-sdk/pull/5642)
197+
* Fix codeblock scrollbar colors
198+
[\#5630](https://github.com/matrix-org/matrix-react-sdk/pull/5630)
199+
* Added loading and disabled the button while searching for server
200+
[\#5634](https://github.com/matrix-org/matrix-react-sdk/pull/5634)
201+
1202
Changes in [3.14.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.14.0) (2021-02-16)
2203
=====================================================================================================
3204
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.14.0-rc.1...v3.14.0)

babel.config.js

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,15 @@ module.exports = {
33
"presets": [
44
["@babel/preset-env", {
55
"targets": [
6-
"last 2 Chrome versions", "last 2 Firefox versions", "last 2 Safari versions"
6+
"last 2 Chrome versions",
7+
"last 2 Firefox versions",
8+
"last 2 Safari versions",
9+
"last 2 Edge versions",
710
],
811
}],
912
"@babel/preset-typescript",
1013
"@babel/preset-flow",
11-
"@babel/preset-react"
14+
"@babel/preset-react",
1215
],
1316
"plugins": [
1417
["@babel/plugin-proposal-decorators", {legacy: true}],
@@ -18,6 +21,6 @@ module.exports = {
1821
"@babel/plugin-proposal-object-rest-spread",
1922
"@babel/plugin-transform-flow-comments",
2023
"@babel/plugin-syntax-dynamic-import",
21-
"@babel/plugin-transform-runtime"
22-
]
24+
"@babel/plugin-transform-runtime",
25+
],
2326
};

docs/ciderEditor.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,14 @@ caret nodes (more on that later).
2121
For these reasons it doesn't use `innerText`, `textContent` or anything similar.
2222
The model addresses any content in the editor within as an offset within this string.
2323
The caret position is thus also converted from a position in the DOM tree
24-
to an offset in the content string. This happens in `getCaretOffsetAndText` in `dom.js`.
24+
to an offset in the content string. This happens in `getCaretOffsetAndText` in `dom.ts`.
2525

2626
Once the content string and caret offset is calculated, it is passed to the `update()`
2727
method of the model. The model first calculates the same content string of its current parts,
2828
basically just concatenating their text. It then looks for differences between
2929
the current and the new content string. The diffing algorithm is very basic,
3030
and assumes there is only one change around the caret offset,
31-
so this should be very inexpensive. See `diff.js` for details.
31+
so this should be very inexpensive. See `diff.ts` for details.
3232

3333
The result of the diffing is the strings that were added and/or removed from
3434
the current content. These differences are then applied to the parts,
@@ -51,7 +51,7 @@ which relate poorly to text input or changes, and don't need the `beforeinput` e
5151
which isn't broadly supported yet.
5252

5353
Once the parts of the model are updated, the DOM of the editor is then reconciled
54-
with the new model state, see `renderModel` in `render.js` for this.
54+
with the new model state, see `renderModel` in `render.ts` for this.
5555
If the model didn't reject the input and didn't make any additional changes,
5656
this won't make any changes to the DOM at all, and should thus be fairly efficient.
5757

docs/media-handling.md

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Media handling
2+
3+
Surely media should be as easy as just putting a URL into an `img` and calling it good, right?
4+
Not quite. Matrix uses something called a Matrix Content URI (better known as MXC URI) to identify
5+
content, which is then converted to a regular HTTPS URL on the homeserver. However, sometimes that
6+
URL can change depending on deployment considerations.
7+
8+
The react-sdk features a [customisation endpoint](https://github.com/vector-im/element-web/blob/develop/docs/customisations.md)
9+
for media handling where all conversions from MXC URI to HTTPS URL happen. This is to ensure that
10+
those obscure deployments can route all their media to the right place.
11+
12+
For development, there are currently two functions available: `mediaFromMxc` and `mediaFromContent`.
13+
The `mediaFromMxc` function should be self-explanatory. `mediaFromContent` takes an event content as
14+
a parameter and will automatically parse out the source media and thumbnail. Both functions return
15+
a `Media` object with a number of options on it, such as getting various common HTTPS URLs for the
16+
media.
17+
18+
**It is extremely important that all media calls are put through this customisation endpoint.** So
19+
much so it's a lint rule to avoid accidental use of the wrong functions.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "matrix-react-sdk",
3-
"version": "3.14.0",
3+
"version": "3.16.0",
44
"description": "SDK for matrix.org using React",
55
"author": "matrix.org",
66
"repository": {
@@ -83,6 +83,7 @@
8383
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
8484
"matrix-widget-api": "^0.1.0-beta.13",
8585
"minimist": "^1.2.5",
86+
"opus-recorder": "^8.0.3",
8687
"pako": "^2.0.3",
8788
"parse5": "^6.0.1",
8889
"png-chunks-extract": "^1.0.0",
@@ -101,7 +102,7 @@
101102
"tar-js": "^0.3.0",
102103
"text-encoding-utf-8": "^1.0.2",
103104
"url": "^0.11.0",
104-
"velocity-animate": "^1.5.2",
105+
"velocity-animate": "^2.0.6",
105106
"what-input": "^5.2.10",
106107
"zxcvbn": "^4.4.2"
107108
},
@@ -157,6 +158,7 @@
157158
"jest": "^26.6.3",
158159
"jest-canvas-mock": "^2.3.0",
159160
"jest-environment-jsdom-sixteen": "^1.0.3",
161+
"jest-fetch-mock": "^3.0.3",
160162
"matrix-mock-request": "^1.2.3",
161163
"matrix-react-test-utils": "^0.2.2",
162164
"olm": "https://packages.matrix.org/npm/olm/olm-3.2.1.tgz",

res/css/_common.scss

Lines changed: 8 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -395,6 +395,7 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
395395
border: 1px solid $accent-color;
396396
color: $accent-color;
397397
background-color: $button-secondary-bg-color;
398+
font-family: inherit;
398399
}
399400

400401
.mx_Dialog button:last-child {
@@ -489,54 +490,6 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
489490
margin-top: 69px;
490491
}
491492

492-
.mx_Beta {
493-
color: red;
494-
margin-right: 10px;
495-
position: relative;
496-
top: -3px;
497-
background-color: white;
498-
padding: 0 4px;
499-
border-radius: 3px;
500-
border: 1px solid darkred;
501-
cursor: help;
502-
transition-duration: 200ms;
503-
font-size: smaller;
504-
filter: opacity(0.5);
505-
}
506-
507-
.mx_Beta:hover {
508-
color: white;
509-
border: 1px solid gray;
510-
background-color: darkred;
511-
}
512-
513-
.mx_TintableSvgButton {
514-
position: relative;
515-
display: flex;
516-
flex-direction: row;
517-
justify-content: center;
518-
align-content: center;
519-
}
520-
521-
.mx_TintableSvgButton object {
522-
margin: 0;
523-
padding: 0;
524-
width: 100%;
525-
height: 100%;
526-
max-width: 100%;
527-
max-height: 100%;
528-
}
529-
530-
.mx_TintableSvgButton span {
531-
position: absolute;
532-
top: 0;
533-
right: 0;
534-
bottom: 0;
535-
left: 0;
536-
opacity: 0;
537-
cursor: pointer;
538-
}
539-
540493
// username colors
541494
// used by SenderProfile & RoomPreviewBar
542495
.mx_Username_color1 {
@@ -606,6 +559,13 @@ input[type=text]:focus, input[type=password]:focus, textarea:focus {
606559
}
607560
}
608561

562+
@define-mixin ProgressBarBgColour $colour {
563+
background-color: $colour;
564+
&::-webkit-progress-bar {
565+
background-color: $colour;
566+
}
567+
}
568+
609569
@define-mixin ProgressBarBorderRadius $radius {
610570
border-radius: $radius;
611571
&::-moz-progress-bar {

0 commit comments

Comments
 (0)