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

Commit db2f573

Browse files
committed
Merge branch 'develop' into room-history-key-sharing2
2 parents 46fd549 + 75bfaa5 commit db2f573

File tree

493 files changed

+13472
-2876
lines changed

Some content is hidden

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

493 files changed

+13472
-2876
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: 123 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,126 @@
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+
1124
Changes in [3.15.0](https://github.com/matrix-org/matrix-react-sdk/releases/tag/v3.15.0) (2021-03-01)
2125
=====================================================================================================
3126
[Full Changelog](https://github.com/matrix-org/matrix-react-sdk/compare/v3.15.0-rc.1...v3.15.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.15.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 {

res/css/_components.scss

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@
2828
@import "./structures/_ScrollPanel.scss";
2929
@import "./structures/_SearchBox.scss";
3030
@import "./structures/_SpacePanel.scss";
31+
@import "./structures/_SpaceRoomDirectory.scss";
32+
@import "./structures/_SpaceRoomView.scss";
3133
@import "./structures/_TabbedView.scss";
3234
@import "./structures/_ToastContainer.scss";
3335
@import "./structures/_UploadBar.scss";
@@ -57,6 +59,7 @@
5759
@import "./views/context_menus/_MessageContextMenu.scss";
5860
@import "./views/context_menus/_StatusMessageContextMenu.scss";
5961
@import "./views/context_menus/_TagTileContextMenu.scss";
62+
@import "./views/dialogs/_AddExistingToSpaceDialog.scss";
6063
@import "./views/dialogs/_AddressPickerDialog.scss";
6164
@import "./views/dialogs/_Analytics.scss";
6265
@import "./views/dialogs/_BugReportDialog.scss";
@@ -90,6 +93,7 @@
9093
@import "./views/dialogs/_SettingsDialog.scss";
9194
@import "./views/dialogs/_ShareDialog.scss";
9295
@import "./views/dialogs/_SlashCommandHelpDialog.scss";
96+
@import "./views/dialogs/_SpaceSettingsDialog.scss";
9397
@import "./views/dialogs/_TabbedIntegrationManagerDialog.scss";
9498
@import "./views/dialogs/_TermsDialog.scss";
9599
@import "./views/dialogs/_UploadConfirmDialog.scss";
@@ -107,8 +111,8 @@
107111
@import "./views/elements/_AddressSelector.scss";
108112
@import "./views/elements/_AddressTile.scss";
109113
@import "./views/elements/_DesktopBuildsNotice.scss";
110-
@import "./views/elements/_DirectorySearchBox.scss";
111114
@import "./views/elements/_DesktopCapturerSourcePicker.scss";
115+
@import "./views/elements/_DirectorySearchBox.scss";
112116
@import "./views/elements/_Dropdown.scss";
113117
@import "./views/elements/_EditableItemList.scss";
114118
@import "./views/elements/_ErrorBoundary.scss";
@@ -207,6 +211,7 @@
207211
@import "./views/rooms/_SendMessageComposer.scss";
208212
@import "./views/rooms/_Stickers.scss";
209213
@import "./views/rooms/_TopUnreadMessagesBar.scss";
214+
@import "./views/rooms/_VoiceRecordComposerTile.scss";
210215
@import "./views/rooms/_WhoIsTypingTile.scss";
211216
@import "./views/settings/_AvatarSetting.scss";
212217
@import "./views/settings/_CrossSigningPanel.scss";
@@ -220,6 +225,7 @@
220225
@import "./views/settings/_SecureBackupPanel.scss";
221226
@import "./views/settings/_SetIdServer.scss";
222227
@import "./views/settings/_SetIntegrationManager.scss";
228+
@import "./views/settings/_SpellCheckLanguages.scss";
223229
@import "./views/settings/_UpdateCheckButton.scss";
224230
@import "./views/settings/tabs/_SettingsTab.scss";
225231
@import "./views/settings/tabs/room/_GeneralRoomSettingsTab.scss";
@@ -233,6 +239,9 @@
233239
@import "./views/settings/tabs/user/_PreferencesUserSettingsTab.scss";
234240
@import "./views/settings/tabs/user/_SecurityUserSettingsTab.scss";
235241
@import "./views/settings/tabs/user/_VoiceUserSettingsTab.scss";
242+
@import "./views/spaces/_SpaceBasicSettings.scss";
243+
@import "./views/spaces/_SpaceCreateMenu.scss";
244+
@import "./views/spaces/_SpacePublicShare.scss";
236245
@import "./views/terms/_InlineTermsAgreement.scss";
237246
@import "./views/toasts/_AnalyticsToast.scss";
238247
@import "./views/toasts/_NonUrgentEchoFailureToast.scss";

res/css/structures/_LeftPanel.scss

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,8 @@ $roomListCollapsedWidth: 68px;
1919

2020
.mx_LeftPanel {
2121
background-color: $roomlist-bg-color;
22-
min-width: 260px;
22+
// TODO decrease this once Spaces launches as it'll no longer need to include the 56px Community Panel
23+
min-width: 206px;
2324
max-width: 50%;
2425

2526
// Create a row-based flexbox for the GroupFilterPanel and the room list
@@ -129,6 +130,10 @@ $roomListCollapsedWidth: 68px;
129130
mask-repeat: no-repeat;
130131
background: $secondary-fg-color;
131132
}
133+
134+
&.mx_LeftPanel_exploreButton_space::before {
135+
mask-image: url('$(res)/img/element-icons/roomlist/browse.svg');
136+
}
132137
}
133138
}
134139

0 commit comments

Comments
 (0)