Skip to content

Commit 4ad0cce

Browse files
committed
Merge remote-tracking branch 'upstream/master' into synodim
2 parents 98c4500 + 8fc13ba commit 4ad0cce

24 files changed

+1610
-2344
lines changed

.eslintrc.js

+1
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ module.exports = {
8888
"@typescript-eslint/explicit-function-return-type": "off",
8989
"@typescript-eslint/explicit-member-accessibility": "off",
9090
"@typescript-eslint/ban-ts-comment": "off",
91+
"@typescript-eslint/no-floating-promises": "off",
9192
},
9293
},
9394
],

.github/labels.yml

+3
Original file line numberDiff line numberDiff line change
@@ -261,3 +261,6 @@
261261
color: "ededed"
262262
- name: "Z-t3chguy"
263263
color: "ededed"
264+
- name: "Z-Flaky-Test-Disabled"
265+
description: "The flaking test has been disabled"
266+
color: "ededed"

CHANGELOG.md

+57
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,60 @@
1+
Changes in [1.11.70](https://github.com/element-hq/element-web/releases/tag/v1.11.70) (2024-07-08)
2+
==================================================================================================
3+
## ✨ Features
4+
5+
* Add SSO redirect option for login page ([#27576](https://github.com/element-hq/element-web/pull/27576)). Contributed by @bartvdbraak.
6+
* Use stable endpoints for MSC3916 ([#27558](https://github.com/element-hq/element-web/pull/27558)). Contributed by @turt2live.
7+
* Switch to Rust crypto stack for all logins ([#12630](https://github.com/matrix-org/matrix-react-sdk/pull/12630)). Contributed by @richvdh.
8+
* Hide voip buttons in group rooms in environments with widgets disabled ([#12664](https://github.com/matrix-org/matrix-react-sdk/pull/12664)). Contributed by @t3chguy.
9+
* Minor tweaks to UserSettings dialog ([#12651](https://github.com/matrix-org/matrix-react-sdk/pull/12651)). Contributed by @florianduros.
10+
* Hide voice call button when redundant ([#12639](https://github.com/matrix-org/matrix-react-sdk/pull/12639)). Contributed by @t3chguy.
11+
* Improve accessibility of the room summary card ([#12586](https://github.com/matrix-org/matrix-react-sdk/pull/12586)). Contributed by @t3chguy.
12+
* Show tooltips on narrow tabbed views ([#12624](https://github.com/matrix-org/matrix-react-sdk/pull/12624)). Contributed by @dbkr.
13+
* Update gfm.css to github-markdown-css ([#12613](https://github.com/matrix-org/matrix-react-sdk/pull/12613)). Contributed by @t3chguy.
14+
* Cache e2eStatus to avoid concerning unencrypted flicker when changing rooms ([#12606](https://github.com/matrix-org/matrix-react-sdk/pull/12606)). Contributed by @t3chguy.
15+
* Tweak copy for user verification toast ([#12605](https://github.com/matrix-org/matrix-react-sdk/pull/12605)). Contributed by @t3chguy.
16+
* Support s tags for strikethrough for Matrix v1.10 ([#12604](https://github.com/matrix-org/matrix-react-sdk/pull/12604)). Contributed by @t3chguy.
17+
18+
## 🐛 Bug Fixes
19+
20+
* Fix "Unable to restore session" error ([#4299](https://github.com/matrix-org/matrix-js-sdk/pull/4299)).
21+
* Fix error when sending encrypted messages in large rooms ([#4297](https://github.com/matrix-org/matrix-js-sdk/pull/4297)).
22+
* Remove redundant copy in deactive uia modal ([#12668](https://github.com/matrix-org/matrix-react-sdk/pull/12668)). Contributed by @t3chguy.
23+
* Fix high contrast theme in settings ([#12649](https://github.com/matrix-org/matrix-react-sdk/pull/12649)). Contributed by @florianduros.
24+
* Fix background on live location sharing footer ([#12629](https://github.com/matrix-org/matrix-react-sdk/pull/12629)). Contributed by @t3chguy.
25+
* Remove outdated iframe sandbox attribute ([#12633](https://github.com/matrix-org/matrix-react-sdk/pull/12633)). Contributed by @t3chguy.
26+
* Remove stray setState which caused encryption state shields to flicker ([#12632](https://github.com/matrix-org/matrix-react-sdk/pull/12632)). Contributed by @t3chguy.
27+
* Fix stray background colour on markdown body ([#12628](https://github.com/matrix-org/matrix-react-sdk/pull/12628)). Contributed by @t3chguy.
28+
* Fix widgets not being cleaned up correctly. ([#12616](https://github.com/matrix-org/matrix-react-sdk/pull/12616)). Contributed by @toger5.
29+
* Add in-progress view to display name EditInPlace ([#12609](https://github.com/matrix-org/matrix-react-sdk/pull/12609)). Contributed by @dbkr.
30+
* Fix config override of other settings levels ([#12593](https://github.com/matrix-org/matrix-react-sdk/pull/12593)). Contributed by @langleyd.
31+
* Don't show 'saved' on display name save error ([#12600](https://github.com/matrix-org/matrix-react-sdk/pull/12600)). Contributed by @dbkr.
32+
33+
34+
35+
Changes in [1.11.69](https://github.com/element-hq/element-web/releases/tag/v1.11.69) (2024-06-18)
36+
==================================================================================================
37+
## ✨ Features
38+
39+
* Change avatar setting component to use a menu ([#12585](https://github.com/matrix-org/matrix-react-sdk/pull/12585)). Contributed by @dbkr.
40+
* New user profile UI in User Settings ([#12548](https://github.com/matrix-org/matrix-react-sdk/pull/12548)). Contributed by @dbkr.
41+
* MSC4108 support OIDC QR code login ([#12370](https://github.com/matrix-org/matrix-react-sdk/pull/12370)). Contributed by @t3chguy.
42+
43+
## 🐛 Bug Fixes
44+
45+
* Fix image upload preview size ([#12612](https://github.com/matrix-org/matrix-react-sdk/pull/12612)). Contributed by @RiotRobot.
46+
* Fix screen sharing in recent Chrome (https://github.com/matrix-org/matrix-js-sdk/pull/4243).
47+
* Fix roving tab index crash `compareDocumentPosition` ([#12594](https://github.com/matrix-org/matrix-react-sdk/pull/12594)). Contributed by @t3chguy.
48+
* Keep dialog glass border on narrow screens ([#12591](https://github.com/matrix-org/matrix-react-sdk/pull/12591)). Contributed by @dbkr.
49+
* Add missing a11y label to dismiss onboarding button in room list ([#12587](https://github.com/matrix-org/matrix-react-sdk/pull/12587)). Contributed by @t3chguy.
50+
* Add hover / active state on avatar setting upload button ([#12590](https://github.com/matrix-org/matrix-react-sdk/pull/12590)). Contributed by @dbkr.
51+
* Fix EditInPlace button styles ([#12589](https://github.com/matrix-org/matrix-react-sdk/pull/12589)). Contributed by @dbkr.
52+
* Fix incorrect assumptions about required fields in /search response ([#12575](https://github.com/matrix-org/matrix-react-sdk/pull/12575)). Contributed by @t3chguy.
53+
* Fix display of no avatar in avatar setting controls ([#12558](https://github.com/matrix-org/matrix-react-sdk/pull/12558)). Contributed by @dbkr.
54+
* Element-R: pass pickleKey in as raw key for indexeddb encryption ([#12543](https://github.com/matrix-org/matrix-react-sdk/pull/12543)). Contributed by @richvdh.
55+
56+
57+
158
Changes in [1.11.68](https://github.com/element-hq/element-web/releases/tag/v1.11.68) (2024-06-04)
259
==================================================================================================
360
## ✨ Features

babel.config.js

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ module.exports = {
1717
],
1818
plugins: [
1919
"@babel/plugin-proposal-export-default-from",
20-
"@babel/plugin-proposal-numeric-separator",
21-
"@babel/plugin-proposal-class-properties",
22-
"@babel/plugin-proposal-object-rest-spread",
23-
"@babel/plugin-proposal-optional-chaining",
24-
"@babel/plugin-proposal-nullish-coalescing-operator",
20+
"@babel/plugin-transform-numeric-separator",
21+
"@babel/plugin-transform-class-properties",
22+
"@babel/plugin-transform-object-rest-spread",
23+
"@babel/plugin-transform-optional-chaining",
24+
"@babel/plugin-transform-nullish-coalescing-operator",
2525

2626
// transform logical assignment (??=, ||=, &&=). preset-env doesn't
2727
// normally bother with these (presumably because all the target
2828
// browsers support it natively), but they make our webpack version (or
2929
// something downstream of babel, at least) fall over.
30-
"@babel/plugin-proposal-logical-assignment-operators",
30+
"@babel/plugin-transform-logical-assignment-operators",
3131

3232
"@babel/plugin-syntax-dynamic-import",
3333
"@babel/plugin-transform-runtime",

docs/config.md

+4-2
Original file line numberDiff line numberDiff line change
@@ -250,12 +250,14 @@ When Element is deployed alongside a homeserver with SSO-only login, some option
250250
user can be sent to in order to log them out of that system too, making logout symmetric between Element and the SSO system.
251251
2. `sso_redirect_options`: Options to define how to handle unauthenticated users. If the object contains `"immediate": true`, then
252252
all unauthenticated users will be automatically redirected to the SSO system to start their login. If instead you'd only like to
253-
have users which land on the welcome page to be redirected, use `"on_welcome_page": true`. As an example:
253+
have users which land on the welcome page to be redirected, use `"on_welcome_page": true`. Additionally, there is an option to
254+
redirect anyone landing on the login page, by using `"on_login_page": true`. As an example:
254255
```json
255256
{
256257
"sso_redirect_options": {
257258
"immediate": false,
258-
"on_welcome_page": true
259+
"on_welcome_page": true,
260+
"on_login_page": true
259261
}
260262
}
261263
```

docs/labs.md

-23
Original file line numberDiff line numberDiff line change
@@ -110,29 +110,6 @@ This is useful while we experiment with encryption and to make calling compatibl
110110

111111
Enables rendering of MD / HTML in room topics.
112112

113-
## Use the Rust cryptography implementation (`feature_rust_crypto`) [In Development]
114-
115-
Configures Element to use a new cryptography implementation based on the [matrix-rust-sdk](https://github.com/matrix-org/matrix-rust-sdk).
116-
117-
This setting is (currently) _sticky_ to a user's session: it only takes effect when the user logs in to a new session. Likewise, even after disabling the setting in `config.json`, the Rust implementation will remain in use until users log out.
118-
119-
This configuration value is now set to `true` by default. This means that without any additional configuration
120-
every new login will use the new cryptography implementation.
121-
122-
For administrators looking to transition existing users to the new stack, the `RustCrypto.staged_rollout_percent` configuration is available.
123-
This configuration allows for a phased migration of users, represented as an integer percentage (0 to 100). By default, this value is set to `0`,
124-
which means no existing users will be migrated to the new stack. If you wish to migrate all users, you can adjust this value to `100`.
125-
126-
This configuration should be placed under the `setting_defaults` section as shown:
127-
128-
```
129-
"setting_defaults": {
130-
"RustCrypto.staged_rollout_percent": 20
131-
},
132-
```
133-
134-
By adjusting the `RustCrypto.staged_rollout_percent` value, you can control the migration process according to your deployment strategy.
135-
136113
## New room header & details (`feature_new_room_decoration_ui`) [In Development]
137114

138115
Refactors visually the room header and room sidebar

element.io/app/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,6 @@
4545
"privacy_policy_url": "https://element.io/cookie-policy",
4646
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx",
4747
"setting_defaults": {
48-
"RustCrypto.staged_rollout_percent": 30
48+
"RustCrypto.staged_rollout_percent": 60
4949
}
5050
}

package.json

+13-15
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "element-web",
3-
"version": "1.11.68",
3+
"version": "1.11.70",
44
"description": "A feature-rich client for Matrix.org",
55
"author": "New Vector Ltd.",
66
"repository": {
@@ -73,12 +73,11 @@
7373
"dependencies": {
7474
"@matrix-org/olm": "3.2.15",
7575
"@matrix-org/react-sdk-module-api": "^2.3.0",
76-
"gfm.css": "^1.1.2",
7776
"jsrsasign": "^11.0.0",
7877
"katex": "^0.16.0",
7978
"lodash": "^4.17.21",
80-
"matrix-js-sdk": "33.0.0",
81-
"matrix-react-sdk": "3.100.0",
79+
"matrix-js-sdk": "34.0.0",
80+
"matrix-react-sdk": "3.102.0",
8281
"matrix-widget-api": "^1.3.1",
8382
"react": "17.0.2",
8483
"react-dom": "17.0.2",
@@ -90,14 +89,14 @@
9089
"@babel/core": "^7.12.10",
9190
"@babel/eslint-parser": "^7.12.10",
9291
"@babel/eslint-plugin": "^7.12.10",
93-
"@babel/plugin-proposal-class-properties": "^7.12.1",
9492
"@babel/plugin-proposal-export-default-from": "^7.12.1",
95-
"@babel/plugin-proposal-logical-assignment-operators": "^7.20.7",
96-
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
97-
"@babel/plugin-proposal-numeric-separator": "^7.12.7",
98-
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
99-
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
10093
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
94+
"@babel/plugin-transform-class-properties": "^7.12.1",
95+
"@babel/plugin-transform-logical-assignment-operators": "^7.20.7",
96+
"@babel/plugin-transform-nullish-coalescing-operator": "^7.12.1",
97+
"@babel/plugin-transform-numeric-separator": "^7.12.7",
98+
"@babel/plugin-transform-object-rest-spread": "^7.12.1",
99+
"@babel/plugin-transform-optional-chaining": "^7.12.7",
101100
"@babel/plugin-transform-runtime": "^7.12.10",
102101
"@babel/preset-env": "^7.12.11",
103102
"@babel/preset-react": "^7.12.10",
@@ -153,13 +152,13 @@
153152
"eslint": "8.57.0",
154153
"eslint-config-google": "^0.14.0",
155154
"eslint-config-prettier": "^9.0.0",
156-
"eslint-plugin-deprecate": "0.8.4",
155+
"eslint-plugin-deprecate": "0.8.5",
157156
"eslint-plugin-import": "^2.26.0",
158157
"eslint-plugin-matrix-org": "^1.0.0",
159158
"eslint-plugin-react": "^7.28.0",
160159
"eslint-plugin-react-hooks": "^4.3.0",
161160
"eslint-plugin-unicorn": "^53.0.0",
162-
"fake-indexeddb": "^5.0.0",
161+
"fake-indexeddb": "^6.0.0",
163162
"fetch-mock": "9.11.0",
164163
"fetch-mock-jest": "^1.5.1",
165164
"file-loader": "^6.0.0",
@@ -183,15 +182,14 @@
183182
"postcss-loader": "8.1.0",
184183
"postcss-mixins": "^10.0.0",
185184
"postcss-nested": "^6.0.0",
186-
"postcss-preset-env": "^9.3.0",
185+
"postcss-preset-env": "^9.5.14",
187186
"postcss-scss": "^4.0.4",
188187
"postcss-simple-vars": "^7.0.1",
189-
"prettier": "3.2.5",
188+
"prettier": "3.3.2",
190189
"process": "^0.11.10",
191190
"raw-loader": "^4.0.2",
192191
"rimraf": "^5.0.0",
193192
"semver": "^7.5.2",
194-
"setimmediate": "^1.0.5",
195193
"string-replace-loader": "3",
196194
"style-loader": "4",
197195
"stylelint": "^16.1.0",

recorder-worklet-loader.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ module.exports.pitch = function pitch(request) {
3838
return cb(err);
3939
}
4040
if (entries[0]) {
41-
return cb(null, `module.exports = __webpack_public_path__ + ${JSON.stringify(entries[0].files[0])};`);
41+
return cb(null, `module.exports = __webpack_public_path__ + ${JSON.stringify([...entries[0].files][0])};`);
4242
}
4343
return cb(null, null);
4444
});

res/jitsi_external_api.min.js

+1-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/favicon.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -194,9 +194,9 @@ export default class Favicon {
194194
}
195195

196196
private setIcon(canvas: HTMLCanvasElement): void {
197-
setImmediate(() => {
197+
setTimeout(() => {
198198
this.setIconSrc(canvas.toDataURL("image/png"));
199-
});
199+
}, 0);
200200
}
201201

202202
private setIconSrc(url: string): void {

src/serviceworker/index.ts

+4-6
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ import { buildAndEncodePickleKey } from "matrix-react-sdk/src/utils/tokens/pickl
2020

2121
const serverSupportMap: {
2222
[serverUrl: string]: {
23-
supportsMSC3916: boolean;
23+
supportsAuthedMedia: boolean;
2424
cacheExpiryTimeMs: number;
2525
};
2626
} = {};
@@ -79,10 +79,8 @@ self.addEventListener("fetch", (event: FetchEvent) => {
7979
await tryUpdateServerSupportMap(csApi, accessToken);
8080

8181
// If we have server support (and a means of authentication), rewrite the URL to use MSC3916 endpoints.
82-
if (serverSupportMap[csApi].supportsMSC3916 && accessToken) {
83-
// Currently unstable only.
84-
// TODO: Support stable endpoints when available.
85-
url = url.replace(/\/media\/v3\/(.*)\//, "/client/unstable/org.matrix.msc3916/media/$1/");
82+
if (serverSupportMap[csApi].supportsAuthedMedia && accessToken) {
83+
url = url.replace(/\/media\/v3\/(.*)\//, "/client/v1/media/$1/");
8684
} // else by default we make no changes
8785
} catch (err) {
8886
console.error("SW: Error in request rewrite.", err);
@@ -106,7 +104,7 @@ async function tryUpdateServerSupportMap(clientApiUrl: string, accessToken?: str
106104
const versions = await (await fetch(`${clientApiUrl}/_matrix/client/versions`, config)).json();
107105

108106
serverSupportMap[clientApiUrl] = {
109-
supportsMSC3916: Boolean(versions?.unstable_features?.["org.matrix.msc3916"]),
107+
supportsAuthedMedia: Boolean(versions?.versions?.includes("v1.11")),
110108
cacheExpiryTimeMs: new Date().getTime() + 2 * 60 * 60 * 1000, // 2 hours from now
111109
};
112110
}

src/vector/app.tsx

+5
Original file line numberDiff line numberDiff line change
@@ -89,9 +89,14 @@ export async function loadApp(fragParams: {}, matrixChatRef: React.Ref<MatrixCha
8989
// XXX: This path matching is a bit brittle, but better to do it early instead of in the app code.
9090
const isWelcomeOrLanding =
9191
window.location.hash === "#/welcome" || window.location.hash === "#" || window.location.hash === "";
92+
const isLoginPage = window.location.hash === "#/login";
93+
9294
if (!autoRedirect && ssoRedirects.on_welcome_page && isWelcomeOrLanding) {
9395
autoRedirect = true;
9496
}
97+
if (!autoRedirect && ssoRedirects.on_login_page && isLoginPage) {
98+
autoRedirect = true;
99+
}
95100
if (!hasPossibleToken && !isReturningFromSso && autoRedirect) {
96101
logger.log("Bypassing app load to redirect to SSO");
97102
const tempCli = createClient({

src/vector/index.ts

+2-6
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,9 @@ import { extractErrorMessageFromError } from "matrix-react-sdk/src/components/vi
2525
import { parseQsFromFragment } from "./url_utils";
2626
import "./modernizr";
2727

28-
// Make setImmediate available in bundle
29-
import "setimmediate";
30-
3128
// Require common CSS here; this will make webpack process it into bundle.css.
3229
// Our own CSS (which is themed) is imported via separate webpack entry points
3330
// in webpack.config.js
34-
require("gfm.css/gfm.css");
3531
require("katex/dist/katex.css");
3632

3733
/**
@@ -180,7 +176,7 @@ async function start(): Promise<void> {
180176
// error handling begins here
181177
// ##########################
182178
if (!acceptBrowser) {
183-
await new Promise<void>((resolve) => {
179+
await new Promise<void>((resolve, reject) => {
184180
logger.error("Browser is missing required features.");
185181
// take to a different landing page to AWOOOOOGA at the user
186182
showIncompatibleBrowser(() => {
@@ -189,7 +185,7 @@ async function start(): Promise<void> {
189185
}
190186
logger.log("User accepts the compatibility risks.");
191187
resolve();
192-
});
188+
}).catch(reject);
193189
});
194190
}
195191

src/vector/init.tsx

+1-1
Original file line numberDiff line numberDiff line change
@@ -138,7 +138,7 @@ export async function loadLanguage(): Promise<void> {
138138
}
139139

140140
export async function loadTheme(): Promise<void> {
141-
setTheme();
141+
return setTheme();
142142
}
143143

144144
export async function loadApp(fragParams: {}): Promise<void> {

0 commit comments

Comments
 (0)