Skip to content

Commit f80bf9f

Browse files
committed
Merge remote-tracking branch 'upstream/master' into synodim
2 parents 4ad0cce + a238990 commit f80bf9f

File tree

10 files changed

+249
-331
lines changed

10 files changed

+249
-331
lines changed

CHANGELOG.md

+30
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,33 @@
1+
Changes in [1.11.71](https://github.com/element-hq/element-web/releases/tag/v1.11.71) (2024-07-16)
2+
==================================================================================================
3+
## ✨ Features
4+
5+
* Add Modernizr rule for Intl.Segmenter ([#27677](https://github.com/element-hq/element-web/pull/27677)). Contributed by @t3chguy.
6+
* Add tabs to the right panel ([#12672](https://github.com/matrix-org/matrix-react-sdk/pull/12672)). Contributed by @MidhunSureshR.
7+
* Promote new room header from labs to Beta ([#12739](https://github.com/matrix-org/matrix-react-sdk/pull/12739)). Contributed by @t3chguy.
8+
* Redesign room search interface ([#12677](https://github.com/matrix-org/matrix-react-sdk/pull/12677)). Contributed by @t3chguy.
9+
* Move language settings to 'preferences' ([#12723](https://github.com/matrix-org/matrix-react-sdk/pull/12723)). Contributed by @dbkr.
10+
* New layout selector ui in user settings ([#12676](https://github.com/matrix-org/matrix-react-sdk/pull/12676)). Contributed by @florianduros.
11+
* Prevent Element appearing in system media controls ([#10995](https://github.com/matrix-org/matrix-react-sdk/pull/10995)). Contributed by @SuperKenVery.
12+
* Move the account management button ([#12663](https://github.com/matrix-org/matrix-react-sdk/pull/12663)). Contributed by @dbkr.
13+
* Disable profile controls if the HS doesn't allow them to be set ([#12652](https://github.com/matrix-org/matrix-react-sdk/pull/12652)). Contributed by @dbkr.
14+
* New theme ui in user settings ([#12576](https://github.com/matrix-org/matrix-react-sdk/pull/12576)). Contributed by @florianduros.
15+
* Adjust room header hover transition from 300ms to 200ms ([#12703](https://github.com/matrix-org/matrix-react-sdk/pull/12703)). Contributed by @t3chguy.
16+
* Split out email \& phone number settings to separate components \& move discovery to privacy tab ([#12670](https://github.com/matrix-org/matrix-react-sdk/pull/12670)). Contributed by @dbkr.
17+
18+
## 🐛 Bug Fixes
19+
20+
* Ensure we do not load matrix-react-sdk is a manner which can white-screen ([#27685](https://github.com/element-hq/element-web/pull/27685)). Contributed by @t3chguy.
21+
* Fix incoming call toast crash due to audio refactor ([#12737](https://github.com/matrix-org/matrix-react-sdk/pull/12737)). Contributed by @t3chguy.
22+
* Improve new room header accessibility ([#12725](https://github.com/matrix-org/matrix-react-sdk/pull/12725)). Contributed by @t3chguy.
23+
* Fix closing all modals ([#12728](https://github.com/matrix-org/matrix-react-sdk/pull/12728)). Contributed by @dbkr.
24+
* Fix close button on forgot password flow ([#12732](https://github.com/matrix-org/matrix-react-sdk/pull/12732)). Contributed by @dbkr.
25+
* Don't consider textual characters to be emoji ([#12582](https://github.com/matrix-org/matrix-react-sdk/pull/12582)). Contributed by @robintown.
26+
* Clear autocomplete input on selection accept ([#12709](https://github.com/matrix-org/matrix-react-sdk/pull/12709)). Contributed by @dbkr.
27+
* Fix `Match system theme` toggle ([#12719](https://github.com/matrix-org/matrix-react-sdk/pull/12719)). Contributed by @florianduros.
28+
29+
30+
131
Changes in [1.11.70](https://github.com/element-hq/element-web/releases/tag/v1.11.70) (2024-07-08)
232
==================================================================================================
333
## ✨ Features

element.io/app/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"uisi_autorageshake_app": "element-auto-uisi",
2323
"show_labs_settings": false,
2424
"room_directory": {
25-
"servers": ["matrix.org", "gitter.im", "libera.chat"]
25+
"servers": ["matrix.org", "gitter.im"]
2626
},
2727
"enable_presence_by_hs_url": {
2828
"https://matrix.org": false,

element.io/develop/config.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"uisi_autorageshake_app": "element-auto-uisi",
2323
"show_labs_settings": true,
2424
"room_directory": {
25-
"servers": ["matrix.org", "gitter.im", "libera.chat"]
25+
"servers": ["matrix.org", "gitter.im"]
2626
},
2727
"enable_presence_by_hs_url": {
2828
"https://matrix.org": false,

package.json

+9-7
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "element-web",
3-
"version": "1.11.70",
3+
"version": "1.11.71",
44
"description": "A feature-rich client for Matrix.org",
55
"author": "New Vector Ltd.",
66
"repository": {
@@ -71,13 +71,12 @@
7171
"@types/react": "17.0.80"
7272
},
7373
"dependencies": {
74-
"@matrix-org/olm": "3.2.15",
7574
"@matrix-org/react-sdk-module-api": "^2.3.0",
7675
"jsrsasign": "^11.0.0",
7776
"katex": "^0.16.0",
7877
"lodash": "^4.17.21",
79-
"matrix-js-sdk": "34.0.0",
80-
"matrix-react-sdk": "3.102.0",
78+
"matrix-js-sdk": "34.1.0",
79+
"matrix-react-sdk": "3.103.0",
8180
"matrix-widget-api": "^1.3.1",
8281
"react": "17.0.2",
8382
"react-dom": "17.0.2",
@@ -135,7 +134,7 @@
135134
"@types/semver": "^7.5.8",
136135
"@types/tar-js": "^0.3.5",
137136
"@types/ua-parser-js": "^0.7.36",
138-
"@types/uuid": "^9.0.7",
137+
"@types/uuid": "^10.0.0",
139138
"@typescript-eslint/eslint-plugin": "^7.0.0",
140139
"@typescript-eslint/parser": "^7.0.0",
141140
"babel-jest": "^29.0.0",
@@ -157,7 +156,7 @@
157156
"eslint-plugin-matrix-org": "^1.0.0",
158157
"eslint-plugin-react": "^7.28.0",
159158
"eslint-plugin-react-hooks": "^4.3.0",
160-
"eslint-plugin-unicorn": "^53.0.0",
159+
"eslint-plugin-unicorn": "^54.0.0",
161160
"fake-indexeddb": "^6.0.0",
162161
"fetch-mock": "9.11.0",
163162
"fetch-mock-jest": "^1.5.1",
@@ -198,7 +197,7 @@
198197
"terser-webpack-plugin": "^5.3.9",
199198
"ts-node": "^10.9.1",
200199
"ts-prune": "^0.10.3",
201-
"typescript": "5.4.5",
200+
"typescript": "5.5.2",
202201
"util": "^0.12.5",
203202
"webpack": "^5.89.0",
204203
"webpack-bundle-analyzer": "^4.8.0",
@@ -210,5 +209,8 @@
210209
"outputDirectory": "coverage",
211210
"outputName": "jest-sonar-report.xml",
212211
"relativePaths": true
212+
},
213+
"engines": {
214+
"node": ">=20.0.0"
213215
}
214216
}

src/vector/index.html

-25
Original file line numberDiff line numberDiff line change
@@ -81,31 +81,6 @@
8181
<img src="<%= require('matrix-react-sdk/res/img/format/quote.svg').default %>" aria-hidden alt="" width="25" height="22" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
8282
<img src="<%= require('matrix-react-sdk/res/img/format/strikethrough.svg').default %>" aria-hidden alt="" width="25" height="22" style="visibility: hidden; position: absolute; top: 0px; left: 0px;"/>
8383

84-
<audio id="messageAudio">
85-
<source src="media/message.ogg" type="audio/ogg" />
86-
<source src="media/message.mp3" type="audio/mpeg" />
87-
</audio>
88-
<audio id="ringAudio" loop>
89-
<source src="media/ring.ogg" type="audio/ogg" />
90-
<source src="media/ring.mp3" type="audio/mpeg" />
91-
</audio>
92-
<audio id="ringbackAudio" loop>
93-
<source src="media/ringback.ogg" type="audio/ogg" />
94-
<source src="media/ringback.mp3" type="audio/mpeg" />
95-
</audio>
96-
<audio id="callendAudio">
97-
<source src="media/callend.ogg" type="audio/ogg" />
98-
<source src="media/callend.mp3" type="audio/mpeg" />
99-
</audio>
100-
<audio id="busyAudio">
101-
<source src="media/busy.ogg" type="audio/ogg" />
102-
<source src="media/busy.mp3" type="audio/mpeg" />
103-
</audio>
104-
<audio id="errorAudio">
105-
<source src="media/error.ogg" type="audio/ogg" />
106-
<source src="media/error.mp3" type="audio/mpeg" />
107-
</audio>
108-
<audio id="remoteAudio"></audio>
10984
<!-- let CSS themes pass constants to the app -->
11085
<div id="mx_theme_accentColor"></div><div id="mx_theme_secondaryAccentColor"></div><div id="mx_theme_tertiaryAccentColor"></div>
11186

src/vector/index.ts

+10-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ limitations under the License.
1919
*/
2020

2121
import { logger } from "matrix-js-sdk/src/logger";
22-
import { extractErrorMessageFromError } from "matrix-react-sdk/src/components/views/dialogs/ErrorDialog";
2322

2423
// These are things that can run before the skin loads - be careful not to reference the react-sdk though.
2524
import { parseQsFromFragment } from "./url_utils";
@@ -56,8 +55,8 @@ function checkBrowserFeatures(): boolean {
5655
return false;
5756
}
5857

59-
// Custom checks atop Modernizr because it doesn't have ES2018/ES2019 checks
60-
// in it for some features we depend on.
58+
// Custom checks atop Modernizr because it doesn't have checks in it for
59+
// some features we depend on.
6160
// Modernizr requires rules to be lowercase with no punctuation.
6261
// ES2018: http://262.ecma-international.org/9.0/#sec-promise.prototype.finally
6362
window.Modernizr.addTest("promiseprototypefinally", () => typeof window.Promise?.prototype?.finally === "function");
@@ -70,6 +69,13 @@ function checkBrowserFeatures(): boolean {
7069
);
7170
// ES2019: http://262.ecma-international.org/10.0/#sec-object.fromentries
7271
window.Modernizr.addTest("objectfromentries", () => typeof window.Object?.fromEntries === "function");
72+
// ES2024: https://tc39.es/ecma262/2024/#sec-get-regexp.prototype.unicodesets
73+
window.Modernizr.addTest(
74+
"regexpunicodesets",
75+
() => window.RegExp?.prototype && "unicodeSets" in window.RegExp.prototype,
76+
);
77+
// ES2024: https://402.ecma-international.org/9.0/#sec-intl.segmenter
78+
window.Modernizr.addTest("intlsegmenter", () => typeof window.Intl?.Segmenter === "function");
7379

7480
const featureList = Object.keys(window.Modernizr) as Array<keyof ModernizrStatic>;
7581

@@ -105,7 +111,6 @@ async function start(): Promise<void> {
105111
rageshakePromise,
106112
setupLogStorage,
107113
preparePlatform,
108-
loadOlm,
109114
loadConfig,
110115
loadLanguage,
111116
loadTheme,
@@ -114,6 +119,7 @@ async function start(): Promise<void> {
114119
showError,
115120
showIncompatibleBrowser,
116121
_t,
122+
extractErrorMessageFromError,
117123
} = await import(
118124
/* webpackChunkName: "init" */
119125
/* webpackPreload: true */
@@ -143,7 +149,6 @@ async function start(): Promise<void> {
143149
}
144150
}
145151

146-
const loadOlmPromise = loadOlm();
147152
// set the platform for react sdk
148153
preparePlatform();
149154
// load config requires the platform to be ready
@@ -210,7 +215,6 @@ async function start(): Promise<void> {
210215
// app load critical path starts here
211216
// assert things started successfully
212217
// ##################################
213-
await loadOlmPromise;
214218
await loadModulesPromise;
215219
await loadThemePromise;
216220
await loadLanguagePromise;

src/vector/init.tsx

+2-46
Original file line numberDiff line numberDiff line change
@@ -17,10 +17,6 @@ See the License for the specific language governing permissions and
1717
limitations under the License.
1818
*/
1919

20-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
21-
// @ts-ignore
22-
import olmWasmPath from "@matrix-org/olm/olm.wasm";
23-
import Olm from "@matrix-org/olm";
2420
import * as ReactDOM from "react-dom";
2521
import * as React from "react";
2622
import * as languageHandler from "matrix-react-sdk/src/languageHandler";
@@ -76,48 +72,6 @@ export async function loadConfig(): Promise<void> {
7672
}
7773
}
7874

79-
export function loadOlm(): Promise<void> {
80-
/* Load Olm. We try the WebAssembly version first, and then the legacy,
81-
* asm.js version if that fails. For this reason we need to wait for this
82-
* to finish before continuing to load the rest of the app. In future
83-
* we could somehow pass a promise down to react-sdk and have it wait on
84-
* that so olm can be loading in parallel with the rest of the app.
85-
*
86-
* We also need to tell the Olm js to look for its wasm file at the same
87-
* level as index.html. It really should be in the same place as the js,
88-
* ie. in the bundle directory, but as far as I can tell this is
89-
* completely impossible with webpack. We do, however, use a hashed
90-
* filename to avoid caching issues.
91-
*/
92-
return Olm.init({
93-
locateFile: () => olmWasmPath,
94-
})
95-
.then(() => {
96-
logger.log("Using WebAssembly Olm");
97-
})
98-
.catch((wasmLoadError) => {
99-
logger.log("Failed to load Olm: trying legacy version", wasmLoadError);
100-
return new Promise((resolve, reject) => {
101-
const s = document.createElement("script");
102-
s.src = "olm_legacy.js"; // XXX: This should be cache-busted too
103-
s.onload = resolve;
104-
s.onerror = reject;
105-
document.body.appendChild(s);
106-
})
107-
.then(() => {
108-
// Init window.Olm, ie. the one just loaded by the script tag,
109-
// not 'Olm' which is still the failed wasm version.
110-
return window.Olm.init();
111-
})
112-
.then(() => {
113-
logger.log("Using legacy Olm");
114-
})
115-
.catch((legacyLoadError) => {
116-
logger.log("Both WebAssembly and asm.js Olm failed!", legacyLoadError);
117-
});
118-
});
119-
}
120-
12175
export async function loadLanguage(): Promise<void> {
12276
const prefLang = SettingsStore.getValue("language", null, /*excludeDefault=*/ true);
12377
let langs: string[] = [];
@@ -189,3 +143,5 @@ export async function loadModules(): Promise<void> {
189143
}
190144

191145
export { _t } from "../languageHandler";
146+
147+
export { extractErrorMessageFromError } from "matrix-react-sdk/src/components/views/dialogs/ErrorDialog";

tsconfig.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,13 +6,13 @@
66
"esModuleInterop": true,
77
"module": "es2022",
88
"moduleResolution": "node",
9-
"target": "es2016",
9+
"target": "es2018",
1010
"noUnusedLocals": true,
1111
"sourceMap": false,
1212
"outDir": "./lib",
1313
"declaration": true,
1414
"jsx": "react",
15-
"lib": ["es2021", "dom", "dom.iterable"],
15+
"lib": ["es2022", "dom", "dom.iterable"],
1616
"strict": true
1717
},
1818
"include": [

webpack.config.js

+5-21
Original file line numberDiff line numberDiff line change
@@ -274,10 +274,6 @@ module.exports = (env, argv) => {
274274
// there is no need for webpack to parse them - they can just be
275275
// included as-is.
276276
/highlight\.js[\\/]lib[\\/]languages/,
277-
278-
// olm takes ages for webpack to process, and it's already heavily
279-
// optimised, so there is little to gain by us uglifying it.
280-
/olm[\\/](javascript[\\/])?olm\.js$/,
281277
],
282278
rules: [
283279
useHMR && {
@@ -443,20 +439,6 @@ module.exports = (env, argv) => {
443439
},
444440
],
445441
},
446-
{
447-
// the olm library wants to load its own wasm, rather than have webpack do it.
448-
// We therefore use the `file-loader` to tell webpack to dump the contents to
449-
// a separate file and return the name, and override the default `type` for `.wasm` files
450-
// (which is `webassembly/experimental` under webpack 4) to stop webpack trying to interpret
451-
// the filename as webassembly. (see also https://github.com/webpack/webpack/issues/6725)
452-
test: /olm\.wasm$/,
453-
loader: "file-loader",
454-
type: "javascript/auto",
455-
options: {
456-
name: "[name].[hash:7].[ext]",
457-
outputPath: ".",
458-
},
459-
},
460442
{
461443
// Fix up the name of the opus-recorder worker (react-sdk dependency).
462444
// We more or less just want it to be clear it's for opus and not something else.
@@ -498,8 +480,11 @@ module.exports = (env, argv) => {
498480
},
499481
},
500482
{
501-
// Same deal as olm.wasm: the decoderWorker wants to load the wasm artifact
502-
// itself.
483+
// The decoderWorker wants to load its own wasm, rather than have webpack do it.
484+
// We therefore use the `file-loader` to tell webpack to dump the contents to
485+
// a separate file and return the name, and override the default `type` for `.wasm` files
486+
// (which is `webassembly/experimental` under webpack 4) to stop webpack trying to interpret
487+
// the filename as webassembly. (see also https://github.com/webpack/webpack/issues/6725)
503488
test: /decoderWorker\.min\.wasm$/,
504489
loader: "file-loader",
505490
type: "javascript/auto",
@@ -750,7 +735,6 @@ module.exports = (env, argv) => {
750735
{ from: "vector-icons/**", context: path.resolve(__dirname, "res") },
751736
{ from: "decoder-ring/**", context: path.resolve(__dirname, "res") },
752737
{ from: "media/**", context: path.resolve(__dirname, "node_modules/matrix-react-sdk/res/") },
753-
"node_modules/@matrix-org/olm/olm_legacy.js",
754738
{ from: "config.json", noErrorOnMissing: true },
755739
"contribute.json",
756740
],

0 commit comments

Comments
 (0)