Compare commits

...

379 Commits

Author SHA1 Message Date
Michael Telatynski
99553210be Ensure we do not load matrix-react-sdk is a manner which can white-screen
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-08 15:52:53 +01:00
Michael Telatynski
668450325c Merge pull request #27677 from element-hq/t3chguy/intl-segmenter-modernizr
Add Modernizr rule for Intl.Segmenter
2024-07-05 11:56:08 +00:00
Richard van der Hoff
b4aa375619 Merge pull request #27650 from element-hq/rav/remove_olm
Remove code which loads legacy libolm
2024-07-05 10:54:08 +00:00
Michael Telatynski
be92e64458 Merge branch 'develop' of https://github.com/vector-im/element-web into t3chguy/intl-segmenter-modernizr
# Conflicts:
#	src/vector/index.ts
2024-07-05 11:27:03 +01:00
Michael Telatynski
4d0c740ad2 Add Modernizr rule for Intl.Segmenter
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-05 11:26:22 +01:00
Richard van der Hoff
438d07bc75 Merge branch 'develop' into rav/remove_olm 2024-07-05 11:21:38 +01:00
Michael Telatynski
b4d343053d Merge pull request #25477 from SuperKenVery/superkenvery/webaudioapi
Remove message audio element (for another pr)
2024-07-04 18:36:53 +00:00
Michael Telatynski
88d507f4f9 Update index.html 2024-07-04 19:23:13 +01:00
Robin
4ffc77dfef Merge pull request #27674 from robintown/emoji-false-positives
Add a Modernizr check for v mode regexes
2024-07-04 17:25:38 +00:00
Robin
e4d138f4d1 Add a Modernizr check for v mode regexes
I plan to use v mode regexes to test for emoji sequences, and Michael has advised me that we need to ensure that the "incompatible browser" screen shows if they are not supported.
2024-07-04 12:53:39 -04:00
Michael Telatynski
746c20bdba Merge branch 'develop' of https://github.com/vector-im/element-web into fork/SuperKenVery/superkenvery/webaudioapi 2024-07-04 15:45:02 +01:00
Florian Duros
cd2bd81268 Merge pull request #27672 from element-hq/florianduros/ci/node-version
Use last node lts in workflow
2024-07-04 14:07:29 +00:00
Florian Duros
561868f12a fix: use last node lts in workflow 2024-07-04 15:52:42 +02:00
Michael Telatynski
d1f0cbea27 Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-04 14:04:48 +01:00
Michael Telatynski
e80ab738ce Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-07-04 13:51:02 +01:00
Michael Telatynski
d60768daec Merge branch 'develop' of https://github.com/vector-im/element-web into fork/SuperKenVery/superkenvery/webaudioapi 2024-07-04 11:54:07 +01:00
Florian Duros
a7ace95eac Merge pull request #27662 from element-hq/florianduros/ci/mdbooks
Remove `mdbook-combiner` version
2024-07-03 08:38:51 +00:00
Florian Duros
cdb65233b0 Revert "wip: fake run"
This reverts commit 83186c0403.
2024-07-02 11:27:39 +02:00
Florian Duros
83186c0403 wip: fake run 2024-07-02 11:21:17 +02:00
Florian Duros
8776371ed4 ci: remove mdbook-combiner version 2024-07-02 11:14:44 +02:00
Richard van der Hoff
5f9637b14e Merge remote-tracking branch 'origin/develop' into rav/remove_olm 2024-06-26 18:16:22 +01:00
Michael Telatynski
c924f59f41 Merge pull request #27632 from element-hq/t3chguy/fix-release-note-ingest
Remove redundant reusable workflow input
2024-06-26 17:05:36 +00:00
Michael Telatynski
c6134b1849 Update tsconfig.json 2024-06-26 16:49:29 +01:00
Richard van der Hoff
818ec7529c Remove from package.json too 2024-06-26 16:43:38 +01:00
Richard van der Hoff
7c7cbe655a Remove code which loads legacy libolm
Now that we use the Rust crypto stack
(https://github.com/matrix-org/matrix-react-sdk/pull/12630), the legacy olm
library is unneeded. Remove all the dedicated cruft for loading it.

(All this crap is why matrix-sdk-crypto-wasm has to base64 its wasm artifact,
cf https://github.com/matrix-org/matrix-rust-sdk/pull/1167.)
2024-06-26 16:27:14 +01:00
renovate[bot]
d379103352 Update dependency typescript to v5.5.2 (#27637)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-25 16:59:08 +01:00
Michael Telatynski
844a318eb2 Merge pull request #27636 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-06-25 14:55:13 +00:00
Michael Telatynski
205f0f9f30 Merge pull request #27638 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.14.1
2024-06-25 14:52:20 +00:00
Michael Telatynski
703ad190f8 Merge pull request #27635 from element-hq/renovate/stylelint
Update stylelint
2024-06-25 14:18:35 +00:00
Michael Telatynski
1237fbf74c Merge pull request #27639 from element-hq/renovate/major-definitelytyped
Update dependency @types/uuid to v10
2024-06-25 14:17:49 +00:00
Michael Telatynski
137b20b784 Merge pull request #27634 from element-hq/renovate/definitelytyped
Update dependency @types/node to v16.18.101
2024-06-25 13:59:30 +00:00
Michael Telatynski
5de07e091f Merge pull request #27633 from element-hq/renovate/peter-evans-create-pull-request-digest
Update peter-evans/create-pull-request digest to c5a7806
2024-06-25 13:59:16 +00:00
Michael Telatynski
f3237fb0b0 Merge pull request #27640 from element-hq/renovate/eslint-plugin-unicorn-54.x
Update dependency eslint-plugin-unicorn to v54
2024-06-25 13:58:01 +00:00
Michael Telatynski
e41b476be3 Merge pull request #27642 from element-hq/renovate/major-docker
Update docker/build-push-action action to v6
2024-06-25 13:57:48 +00:00
renovate[bot]
4506988ad6 Update docker/build-push-action action to v6 2024-06-25 13:40:19 +00:00
renovate[bot]
734e698c7e Update dependency eslint-plugin-unicorn to v54 2024-06-25 13:40:04 +00:00
renovate[bot]
ba9f962570 Update dependency @types/uuid to v10 2024-06-25 13:39:53 +00:00
renovate[bot]
1dca6b60c3 Update typescript-eslint monorepo to v7.14.1 2024-06-25 13:39:45 +00:00
renovate[bot]
4e47b75f0f Update all non-major dependencies 2024-06-25 13:39:11 +00:00
renovate[bot]
55634304b0 Update stylelint 2024-06-25 13:38:57 +00:00
renovate[bot]
eb2ff67e7b Update dependency @types/node to v16.18.101 2024-06-25 13:38:47 +00:00
renovate[bot]
c5d04b3649 Update peter-evans/create-pull-request digest to c5a7806 2024-06-25 13:38:34 +00:00
Michael Telatynski
0845c515c4 Use workflow_dispatch over repository_dispatch as it lets us specify branch
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-25 14:31:30 +01:00
Michael Telatynski
76416ec7b9 Remove redundant reusable workflow input
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-25 14:31:11 +01:00
Richard van der Hoff
e3aee58a6d Merge pull request #27619 from element-hq/rav/rust_migration_rollout_phase3
Remove outdated rust-crypto settings config
2024-06-24 10:15:36 +00:00
Richard van der Hoff
ea158ed63f Merge remote-tracking branch 'origin/develop' into rav/rust_migration_rollout_phase3 2024-06-24 10:09:07 +01:00
Richard van der Hoff
38c0bf3b62 Remove outdated rust-crypto settings config
As of https://github.com/matrix-org/matrix-react-sdk/pull/12630, Rust crypto is
no longer subject to config settings; they are no longer supported in config.
2024-06-21 13:38:35 +01:00
Michael Telatynski
6821a35444 Merge branch 'develop' into superkenvery/webaudioapi 2024-06-20 17:19:10 +01:00
Richard van der Hoff
9f9cd6ff08 Merge pull request #27588 from element-hq/rav/kill_loading_tests
Remove very outdated loading-test.tsx
2024-06-20 11:32:58 +00:00
Michael Telatynski
f8b3be682a Merge pull request #27603 from element-hq/renovate/all-minor-patch
Update dependency webpack to v5.92.0
2024-06-19 09:24:27 +00:00
Michael Telatynski
ab5ff85bff Merge pull request #27602 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.13.1
2024-06-19 09:24:20 +00:00
renovate[bot]
aa9851dc4e Update dependency webpack to v5.92.0 2024-06-19 08:49:26 +00:00
renovate[bot]
437b5241b9 Update typescript-eslint monorepo to v7.13.1 2024-06-19 08:49:02 +00:00
Michael Telatynski
42943f3ffc Merge pull request #27598 from element-hq/t3chguy/deprecated-babel-plugins
Replace deprecated babel proposal plugins
2024-06-18 16:14:39 +00:00
Michael Telatynski
2fd4e474cb Replace deprecated babel proposal plugins
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-18 16:33:22 +01:00
RiotRobot
cf1eddf0ea Reset matrix-js-sdk back to develop branch 2024-06-18 12:22:29 +00:00
RiotRobot
cee4a754d7 Reset matrix-react-sdk back to develop branch 2024-06-18 12:22:19 +00:00
RiotRobot
72354161e2 Merge branch 'master' into develop 2024-06-18 12:22:01 +00:00
RiotRobot
fa1d2c7dfb v1.11.69 2024-06-18 12:19:08 +00:00
RiotRobot
42c0c19556 Upgrade dependency to matrix-react-sdk@3.101.0 2024-06-18 12:17:05 +00:00
RiotRobot
d3a0925e42 Upgrade dependency to matrix-js-sdk@33.1.0 2024-06-18 11:56:40 +00:00
Richard van der Hoff
351a31c9ee Remove unused test utils 2024-06-17 19:22:39 +01:00
Richard van der Hoff
2614cab64b Remove very outdated loading-test.tsx 2024-06-17 19:01:30 +01:00
Michael Telatynski
15db387425 Merge pull request #27568 from element-hq/t3chguy/fix/23595
Update postcss-preset-env
2024-06-17 13:41:08 +00:00
Michael Telatynski
53cc1c78b1 Merge pull request #27584 from element-hq/actions/jitsi-update
Jitsi Update
2024-06-17 08:10:24 +00:00
Johennes
be6528de26 [create-pull-request] automated change 2024-06-16 03:05:46 +00:00
RiotRobot
087f1bc948 v1.11.69-rc.1 2024-06-14 12:35:42 +00:00
RiotRobot
4360f5a63e Upgrade dependency to matrix-react-sdk@3.101.0-rc.1 2024-06-14 12:29:18 +00:00
RiotRobot
65a87f1a53 Upgrade dependency to matrix-js-sdk@33.1.0-rc.1 2024-06-14 12:22:22 +00:00
Michael Telatynski
b0c04834b6 Merge pull request #27576 from bartvdbraak/add-login-redirect-to-sso
Add SSO redirect option for login page
2024-06-14 10:47:11 +00:00
Bart van der Braak
b61d5b4475 Add SSO redirect option for login page
Signed-off-by: Bart van der Braak <bartvdbraak@gmail.com>
2024-06-14 10:23:16 +02:00
Michael Telatynski
6c3817fa34 Merge pull request #27566 from element-hq/t3chguy/fix/24694
Remove gfm.css, import from matrix-react-sdk
2024-06-13 17:10:26 +00:00
Travis Ralston
e151d9ab53 Merge pull request #27558 from element-hq/travis/stable-msc3916
Use stable endpoints for MSC3916
2024-06-13 16:32:18 +00:00
Michael Telatynski
f15b188297 Merge pull request #27570 from element-hq/t3chguy/webpack-depr
Fix webpack deprecation warnings
2024-06-13 16:03:42 +00:00
Michael Telatynski
ea16928d35 Remove setImmediate polyfill (#27567) 2024-06-13 16:59:56 +01:00
Michael Telatynski
4651bf4eb4 Fix webpack deprecation warnings
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-13 13:16:18 +01:00
R Midhun Suresh
5442d4050d Merge pull request #27569 from element-hq/midhun/update-flaky-test-label
Add `Z-Flaky-Test-Disabled` label to labels.yml
2024-06-13 12:07:18 +00:00
R Midhun Suresh
695cc1b28b Create new label 2024-06-13 16:41:03 +05:30
Michael Telatynski
c94e3f00ed yarn.lock
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-13 12:01:27 +01:00
Michael Telatynski
79e0661be3 Update postcss-preset-env
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-13 11:54:38 +01:00
Michael Telatynski
6cf0809064 Remove gfm.css, import from matrix-react-sdk
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-06-13 10:51:37 +01:00
Michael Telatynski
a0eb94704e Conform to no-floating-promises (#27561) 2024-06-12 17:17:29 +01:00
Travis Ralston
e1e0d37478 Use stable endpoints for MSC3916 2024-06-11 14:36:08 -06:00
Michael Telatynski
9039e70990 Merge pull request #27554 from element-hq/renovate/all-minor-patch
Update dependency prettier to v3.3.2
2024-06-11 15:23:04 +00:00
renovate[bot]
596f297094 Update dependency prettier to v3.3.2 2024-06-11 14:40:18 +00:00
renovate[bot]
4f92927a3d Merge pull request #27529 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-06-11 14:16:10 +00:00
renovate[bot]
b77218e65a Update all non-major dependencies 2024-06-11 14:03:08 +00:00
Michael Telatynski
c21e9f6383 Merge pull request #27553 from element-hq/dependabot/npm_and_yarn/braces-3.0.3
Bump braces from 3.0.2 to 3.0.3
2024-06-11 13:27:34 +00:00
dependabot[bot]
4f8a8a2543 Bump braces from 3.0.2 to 3.0.3
Bumps [braces](https://github.com/micromatch/braces) from 3.0.2 to 3.0.3.
- [Changelog](https://github.com/micromatch/braces/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/braces/compare/3.0.2...3.0.3)

---
updated-dependencies:
- dependency-name: braces
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-06-11 13:14:37 +00:00
Michael Telatynski
d615e69a86 Merge pull request #27552 from element-hq/renovate/fake-indexeddb-6.x
Update dependency fake-indexeddb to v6
2024-06-11 12:56:15 +00:00
Michael Telatynski
db1d440e3b Merge pull request #27548 from element-hq/renovate/docker
Update docker/build-push-action digest to ca052bb
2024-06-11 12:55:45 +00:00
Michael Telatynski
24fafe2588 Merge pull request #27550 from element-hq/renovate/stylelint
Update stylelint
2024-06-11 12:55:16 +00:00
Michael Telatynski
1e06e3083f Merge pull request #27549 from element-hq/renovate/definitelytyped
Update dependency @types/lodash to v4.17.5
2024-06-11 12:55:02 +00:00
renovate[bot]
8e9f3a786c Update dependency fake-indexeddb to v6 2024-06-11 12:45:25 +00:00
renovate[bot]
95f134a7c5 Merge pull request #27547 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.13.0
2024-06-11 12:45:04 +00:00
renovate[bot]
50f5c15027 Update stylelint 2024-06-11 12:44:43 +00:00
renovate[bot]
65b43d8dc7 Update dependency @types/lodash to v4.17.5 2024-06-11 12:43:54 +00:00
renovate[bot]
8dad4f5f10 Update docker/build-push-action digest to ca052bb 2024-06-11 12:43:35 +00:00
renovate[bot]
a3a436ad64 Update typescript-eslint monorepo to v7.13.0 2024-06-11 12:28:49 +00:00
RiotRobot
ffb69d4c47 v1.11.69-rc.0 2024-06-11 12:20:51 +00:00
RiotRobot
369ae1208e Upgrade dependency to matrix-react-sdk@3.101.0-rc.0 2024-06-11 12:15:49 +00:00
RiotRobot
050dae7a9f Upgrade dependency to matrix-js-sdk@33.1.0-rc.0 2024-06-11 12:08:25 +00:00
David Baker
a9cd567fc9 Merge pull request #27538 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.12.0
2024-06-07 16:17:11 +00:00
renovate[bot]
82073aea3e Update typescript-eslint monorepo to v7.12.0 2024-06-07 15:28:51 +00:00
David Baker
9cf7b8b6f6 Merge pull request #27535 from element-hq/renovate/definitelytyped
Update definitelyTyped
2024-06-07 15:01:54 +00:00
renovate[bot]
fa5bd19368 Update definitelyTyped 2024-06-07 12:50:03 +00:00
David Baker
fb72597fcf Merge pull request #27534 from element-hq/renovate/babel-monorepo
Update babel monorepo to v7.24.6
2024-06-07 11:57:11 +00:00
renovate[bot]
3ce0d78961 Update babel monorepo to v7.24.6 2024-06-07 11:28:04 +00:00
David Baker
361636a3d1 Merge pull request #27528 from element-hq/renovate/docker
Update docker/login-action digest to 0d4c9c5
2024-06-07 08:36:25 +00:00
Florian Duros
0b49a7724b Merge pull request #27530 from element-hq/florianduros/fix/ci-docs
Fix CI docs generation
2024-06-06 14:13:41 +00:00
Florian Duros
2db2cf2b1b Downgrade mdbook-combiner 2024-06-06 16:02:22 +02:00
Michael Telatynski
c38505598f Update build_develop.yml 2024-06-06 12:22:36 +01:00
renovate[bot]
7e21f12678 Update docker/login-action digest to 0d4c9c5 2024-06-06 10:16:13 +00:00
Richard van der Hoff
4f43c57a96 Merge pull request #27527 from element-hq/rav/rust_migration_rollout_phase2c
Roll out Rust crypto to 60% of existing users on app.element.io
2024-06-06 09:42:46 +00:00
Richard van der Hoff
60d3b59076 Roll out Rust crypto to 60% of existing users on app.element.io 2024-06-06 09:53:29 +01:00
RiotRobot
5a7956fd90 Reset matrix-js-sdk back to develop branch 2024-06-04 13:38:30 +00:00
RiotRobot
e193f57ac7 Reset matrix-react-sdk back to develop branch 2024-06-04 13:38:20 +00:00
RiotRobot
30f964447f v1.11.68 2024-06-04 13:35:16 +00:00
RiotRobot
cb9eccebed Upgrade dependency to matrix-react-sdk@3.100.0 2024-06-04 13:30:29 +00:00
RiotRobot
a0ae97c2e3 Upgrade dependency to matrix-js-sdk@33.0.0 2024-06-04 13:20:13 +00:00
RiotRobot
fd62e04bc0 v1.11.68-rc.0 2024-05-29 13:21:52 +00:00
RiotRobot
e6c0b8d8e5 Upgrade dependency to matrix-react-sdk@3.100.0-rc.1 2024-05-29 13:09:48 +00:00
RiotRobot
67e78a56a6 Upgrade dependency to matrix-js-sdk@33.0.0-rc.0 2024-05-29 12:56:23 +00:00
RiotRobot
153d0c36b8 Reset matrix-js-sdk back to develop branch 2024-05-22 12:21:51 +00:00
RiotRobot
18bfe3cb43 Reset matrix-react-sdk back to develop branch 2024-05-22 12:21:41 +00:00
RiotRobot
61ba9b48f9 Merge branch 'master' into develop 2024-05-22 12:21:28 +00:00
RiotRobot
5e02a42ca0 v1.11.67 2024-05-22 12:18:40 +00:00
RiotRobot
89622749e2 Upgrade dependency to matrix-js-sdk@32.4.0 2024-05-22 12:05:55 +00:00
RiotRobot
eced524029 Upgrade dependency to matrix-js-sdk@32.3.0 2024-05-21 12:27:33 +00:00
David Baker
c4263b3330 Merge pull request #27474 from element-hq/renovate/stylelint
Update stylelint
2024-05-15 22:45:24 +00:00
David Baker
68f4a7d4b0 Merge pull request #27477 from element-hq/renovate/eslint-plugin-unicorn-53.x
Update dependency eslint-plugin-unicorn to v53
2024-05-15 22:41:47 +00:00
David Baker
7df5028c51 Merge pull request #27473 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-05-15 22:03:21 +00:00
David Baker
4de49c76d0 Merge pull request #27475 from element-hq/renovate/css-minimizer-webpack-plugin-7.x
Update dependency css-minimizer-webpack-plugin to v7
2024-05-15 17:54:31 +00:00
David Baker
165cbcda89 Merge pull request #27472 from element-hq/renovate/definitelytyped
Update definitelyTyped
2024-05-15 16:58:11 +00:00
David Baker
c11bfaf07e Merge pull request #27471 from element-hq/renovate/peter-evans-create-pull-request-digest
Update peter-evans/create-pull-request digest to 6d6857d
2024-05-15 16:57:44 +00:00
Michael Telatynski
98babd140e Merge pull request #27478 from element-hq/t3chguy/missing-semver
Add missing @types/semver dev dep
2024-05-15 15:03:19 +00:00
Michael Telatynski
575a726361 Add missing @types/semver dev dep
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-15 15:51:11 +01:00
RiotRobot
ed2440f8cf v1.11.67-rc.1 2024-05-15 13:56:02 +00:00
renovate[bot]
59592f84fb Update dependency eslint-plugin-unicorn to v53 2024-05-15 10:26:28 +00:00
renovate[bot]
ab690372d2 Update dependency css-minimizer-webpack-plugin to v7 2024-05-15 10:25:54 +00:00
renovate[bot]
571028f124 Update stylelint 2024-05-15 10:25:38 +00:00
renovate[bot]
36391187da Update all non-major dependencies 2024-05-15 10:24:47 +00:00
renovate[bot]
35f2f5055a Update definitelyTyped 2024-05-15 10:24:22 +00:00
renovate[bot]
e2c974f53b Update peter-evans/create-pull-request digest to 6d6857d 2024-05-15 10:23:48 +00:00
RiotRobot
74172969c1 v1.11.67-rc.0 2024-05-15 09:21:54 +00:00
RiotRobot
6db392025c Upgrade dependency to matrix-react-sdk@3.100.0-rc.0 2024-05-15 09:14:52 +00:00
RiotRobot
a61de47bb6 Upgrade dependency to matrix-js-sdk@32.3.0-rc.0 2024-05-15 09:06:14 +00:00
Travis Ralston
bcd5c838e8 Typescriptify & use service worker for MSC3916 authentication (#27326)
* Typescriptify & use service worker for MSC3916 authentication

* appease the linter

* appease jest

* appease linter

* Get the access token directly

* Add a bit of jitter

* Improve legibility, use factored-out functions for pickling

* Add docs

* Appease the linter

* Document risks of postMessage

* Split service worker post message handling out to function

* Move registration to async function

* Use more early returns

* Thanks(?), WebStorm

* Handle case of no access token for /versions

* Appease linter

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Remove spurious try/catch

* Factor out fetch config stuff

* Apply suggestions from code review

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>

* Finish applying code review suggestions

---------

Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-05-14 13:17:38 -06:00
Robin
482b81b0ed Merge pull request #27439 from bmarty/bma/androidAssetLinks
Add static file .well-known/assetlinks.json
2024-05-14 16:02:17 +00:00
Benoit Marty
095c613b69 Fix deployment of file res/.well-known/assetlinks.json 2024-05-14 17:42:11 +02:00
Michael Telatynski
5eed034389 Merge pull request #27460 from element-hq/t3chguy/oidc-config
Allow explicit configuration of OIDC dynamic registration metadata
2024-05-14 09:41:31 +00:00
Michael Telatynski
7a3bc83a55 Add comment
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-14 10:32:55 +01:00
Michael Telatynski
706f4c6e20 Merge branch 'develop' of https://github.com/vector-im/element-web into t3chguy/oidc-config 2024-05-13 17:49:02 +01:00
Michael Telatynski
f43bb0a9f7 Merge pull request #27431 from element-hq/t3chguy/fix-oidc-native-electron
Fix `element-desktop-ssoid being` included in OIDC Authorization call
2024-05-13 13:53:45 +00:00
Michael Telatynski
64f0bb5460 Inline consts
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-13 13:05:50 +01:00
Ben Banfield-Zanin
e651330ff1 Merge pull request #26817 from element-hq/gaelg/sign-images-cosign
Sign Docker images using cosign
2024-05-13 10:07:49 +00:00
Michael Telatynski
6a6a362a8d Update end-to-end-tests.yaml 2024-05-13 11:19:55 +01:00
David Baker
35046bb7b2 Merge pull request #27452 from element-hq/dbkr/multi_return_type_rule
Add code style rule for multiple return types
2024-05-13 09:13:14 +00:00
Marcel
a10f2e1258 Revert "Modernize hash in webpack" (#27466) 2024-05-13 09:15:24 +01:00
Michael Telatynski
a0d7805484 Merge pull request #27464 from MTRNord/patch-1
Modernize hash in webpack
2024-05-13 05:51:42 +00:00
Marcel
ae77dac66d Modernize hash 2024-05-12 15:03:14 +02:00
David Baker
5f1f018a30 Fundamental behaviour, not return type 2024-05-10 16:52:19 +01:00
David Baker
f2da5fcf2c Fix typos and clarify wording
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-05-10 16:49:05 +01:00
Michael Telatynski
9cce1e060a Merge branch 't3chguy/fix-oidc-native-electron' into t3chguy/oidc-config 2024-05-10 13:19:33 +01:00
Michael Telatynski
50c8cb7bf0 Merge branch 'develop' into t3chguy/fix-oidc-native-electron 2024-05-10 13:15:28 +01:00
Michael Telatynski
58e5b3959d Allow explicit configuration of OIDC dynamic registration metadata
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-10 13:13:59 +01:00
Michael Telatynski
84b6bf9789 Merge branch 't3chguy/fix-oidc-native-electron' of https://github.com/vector-im/element-web into develop 2024-05-10 12:58:58 +01:00
Michael Telatynski
9efa04da7a Split out oidc callback url into its own method
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-10 11:58:58 +01:00
David Baker
8ba3f53d2c Hopefully clarify 2024-05-10 10:48:11 +01:00
David Baker
36571edb95 Prettier 2024-05-09 10:53:33 +01:00
David Baker
3a159beb21 Add code style rule for multiple return types 2024-05-09 10:42:26 +01:00
Ben Banfield-Zanin
6ebe844fc0 Indent inline script correctly
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-08 16:56:45 +01:00
Gaël Goinvic
7359c9bf93 sign images using cosign
Signed-off-by: Gaël Goinvic <gaelg@element.io>
2024-05-08 16:27:07 +01:00
RiotRobot
02fd35dad0 Reset matrix-js-sdk back to develop branch 2024-05-07 12:42:55 +00:00
RiotRobot
a71b7f0e66 Reset matrix-react-sdk back to develop branch 2024-05-07 12:42:45 +00:00
RiotRobot
f0672082b3 Merge branch 'master' into develop 2024-05-07 12:42:29 +00:00
RiotRobot
2ee54dd4bc v1.11.66 2024-05-07 12:39:40 +00:00
RiotRobot
e852282270 Upgrade dependency to matrix-react-sdk@3.99.0 2024-05-07 12:27:24 +00:00
RiotRobot
80a7ea7649 Upgrade dependency to matrix-js-sdk@32.2.0 2024-05-07 12:17:45 +00:00
Benoit Marty
9b988f70de Add /.well-known/assetlinks.json to webpack.config.js 2024-05-07 14:09:42 +02:00
Benoit Marty
27d4e1d990 Add /.well-known/assetlinks.json to cfp_headers file. 2024-05-07 14:04:47 +02:00
Benoit Marty
f7132ff139 Add static file .well-known/assetlinks.json, to allow Android applications Element and Element X running on Android 12 and higher to open external links. 2024-05-07 12:12:01 +02:00
Michael Telatynski
b82100ede8 Fix element-desktop-ssoid being included in OIDC Authorization call
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-05-03 12:47:40 +01:00
RiotRobot
729534401f v1.11.66-rc.1 2024-05-02 15:17:05 +00:00
RiotRobot
dc85c9fb13 Upgrade dependency to matrix-react-sdk@3.99.0-rc.1 2024-05-02 15:11:09 +00:00
Richard van der Hoff
2c8b32d2c9 Merge pull request #27416 from element-hq/rav/rust_migration_rollout_phase2b
Roll out Rust crypto to 30% of existing users on `app.element.io`
2024-05-01 14:48:38 +00:00
renovate[bot]
011f7465e7 Update react-types (#26481)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-05-01 13:11:46 +01:00
Richard van der Hoff
4561b2d35d Roll out Rust crypto to 30% of existing users on app.element.io 2024-05-01 11:36:06 +01:00
Michael Telatynski
5dcaf8ab80 Merge pull request #27346 from element-hq/renovate/typescript
Update dependency typescript to v5.4.5
2024-04-30 15:49:59 +00:00
Michael Telatynski
ac20fffb40 Merge branch 'develop' into renovate/typescript 2024-04-30 16:19:45 +01:00
Michael Telatynski
aeef12ef8b Update end-to-end-tests.yaml 2024-04-30 16:19:35 +01:00
renovate[bot]
73f2dba0c3 Update dependency typescript to v5.4.5 2024-04-30 15:08:20 +00:00
Michael Telatynski
ea56d6774c Merge pull request #27407 from element-hq/renovate/all-minor-patch
Update dependency yaml to v2.4.2
2024-04-30 13:46:38 +00:00
Michael Telatynski
0937c161f4 Merge pull request #27406 from element-hq/renovate/react-monorepo
Update dependency eslint-plugin-react-hooks to v4.6.2
2024-04-30 13:45:26 +00:00
Michael Telatynski
ad31575ddc Merge pull request #27409 from element-hq/renovate/stylelint
Update dependency stylelint to v16.4.0
2024-04-30 13:31:29 +00:00
Michael Telatynski
3fc2cdfbab Merge pull request #27405 from element-hq/renovate/babel-monorepo
Update babel monorepo to v7.24.5
2024-04-30 13:30:31 +00:00
Michael Telatynski
ba186a22d0 Merge pull request #27408 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.7.1
2024-04-30 13:26:27 +00:00
renovate[bot]
8449bdc5c1 Update dependency stylelint to v16.4.0 2024-04-30 13:09:29 +00:00
renovate[bot]
686816b8a4 Update typescript-eslint monorepo to v7.7.1 2024-04-30 13:09:05 +00:00
renovate[bot]
6d457e3559 Update dependency yaml to v2.4.2 2024-04-30 13:08:32 +00:00
renovate[bot]
91e9891892 Update dependency eslint-plugin-react-hooks to v4.6.2 2024-04-30 13:08:12 +00:00
renovate[bot]
c8e866e384 Update babel monorepo to v7.24.5 2024-04-30 13:07:49 +00:00
RiotRobot
f5997aaf7c v1.11.66-rc.0 2024-04-30 12:27:52 +00:00
RiotRobot
9a2066d98a Upgrade dependency to matrix-react-sdk@3.99.0-rc.0 2024-04-30 12:17:16 +00:00
RiotRobot
6e59f6f413 Upgrade dependency to matrix-js-sdk@32.2.0-rc.0 2024-04-30 12:04:05 +00:00
Michael Telatynski
7e8177edb3 Update end-to-end-tests.yaml 2024-04-29 16:20:54 +01:00
Michael Telatynski
d3deda62a8 Simplify Playwright CI (#27398) 2024-04-29 09:51:53 +01:00
R Midhun Suresh
f990918e49 Merge pull request #27387 from element-hq/midhun/prevent-close-disabled-issue
Prevent action from closing flaky test issues that have already been disabled
2024-04-24 11:19:25 +00:00
R Midhun Suresh
9ce7b19147 Exempt issues with this label 2024-04-24 16:20:55 +05:30
RiotRobot
786c590dcf Reset matrix-js-sdk back to develop branch 2024-04-23 13:08:43 +00:00
RiotRobot
bbf37ba7cf Reset matrix-react-sdk back to develop branch 2024-04-23 13:08:32 +00:00
RiotRobot
c50556a957 Merge branch 'master' into develop 2024-04-23 13:08:18 +00:00
RiotRobot
4a895f6daf v1.11.65 2024-04-23 13:05:34 +00:00
RiotRobot
7f5af1ccdf Upgrade dependency to matrix-react-sdk@3.98.0 2024-04-23 12:59:24 +00:00
RiotRobot
eac221c2d3 Upgrade dependency to matrix-js-sdk@32.1.0 2024-04-23 12:35:55 +00:00
David Baker
c5b98a5e93 Merge pull request #27377 from element-hq/dbkr/enable_tac_develop
Enable the TAC in develop
2024-04-22 13:59:40 +00:00
David Baker
88c49e7c50 Enable the TAC in develop
While we work through fixing all the tests on https://github.com/matrix-org/matrix-react-sdk/pull/12439 enable the TAC on nightly so we can get wider testing.
2024-04-22 12:13:01 +01:00
Michael Telatynski
3cb5b840ce Merge pull request #27366 from element-hq/t3chguy/flaky-stale
Add automation to close flaky test issues
2024-04-18 12:55:18 +00:00
Michael Telatynski
e0deabceb3 Add automation to close flaky test issues
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-04-18 10:40:08 +01:00
renovate[bot]
2e15e5e3c7 Merge pull request #27343 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-04-16 16:07:19 +00:00
renovate[bot]
050e9126d8 Update all non-major dependencies 2024-04-16 15:59:07 +00:00
Michael Telatynski
3b52d375e7 Merge pull request #27342 from element-hq/renovate/t3chguy-wait-on-check-action-digest
Update t3chguy/wait-on-check-action digest to 1854102
2024-04-16 14:08:07 +00:00
Michael Telatynski
a1c6f0a1d2 Merge pull request #27351 from element-hq/renovate/eslint-plugin-unicorn-52.x
Update dependency eslint-plugin-unicorn to v52
2024-04-16 14:05:24 +00:00
Michael Telatynski
4bd351f167 Merge pull request #27353 from element-hq/renovate/peaceiris-actions-mdbook-2.x
Update peaceiris/actions-mdbook action to v2
2024-04-16 14:05:22 +00:00
Michael Telatynski
5bed03f37e Merge pull request #27352 from element-hq/renovate/style-loader-4.x
Update dependency style-loader to v4
2024-04-16 14:04:42 +00:00
Michael Telatynski
315ee8a64d Merge pull request #27349 from element-hq/renovate/css-loader-7.x
Update dependency css-loader to v7
2024-04-16 14:03:20 +00:00
Michael Telatynski
f51622a507 Merge pull request #27347 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.6.0
2024-04-16 14:03:06 +00:00
Michael Telatynski
ce95e1abcd Merge pull request #27345 from element-hq/renovate/definitelytyped
Update dependency @types/node to v16.18.96
2024-04-16 14:02:06 +00:00
Michael Telatynski
70e480a3e9 Merge pull request #27344 from element-hq/renovate/babel-monorepo
Update dependency @babel/runtime to v7.24.4
2024-04-16 14:01:50 +00:00
Michael Telatynski
6ca67ff1ef Merge pull request #27341 from element-hq/renovate/peter-evans-create-pull-request-digest
Update peter-evans/create-pull-request digest to c55203c
2024-04-16 13:59:50 +00:00
Michael Telatynski
ff63c92c2c Merge pull request #27340 from element-hq/renovate/docker
Update docker/setup-buildx-action digest to d70bba7
2024-04-16 13:59:22 +00:00
renovate[bot]
36ff005d11 Update peaceiris/actions-mdbook action to v2 2024-04-16 12:46:50 +00:00
renovate[bot]
38ea3312f6 Update dependency style-loader to v4 2024-04-16 12:46:44 +00:00
renovate[bot]
8c61026761 Update dependency eslint-plugin-unicorn to v52 2024-04-16 12:46:33 +00:00
renovate[bot]
5d32728f3e Update dependency css-loader to v7 2024-04-16 12:46:06 +00:00
renovate[bot]
159ef4cc15 Update typescript-eslint monorepo to v7.6.0 2024-04-16 12:45:40 +00:00
renovate[bot]
8baab4ce8e Update dependency @types/node to v16.18.96 2024-04-16 12:44:41 +00:00
renovate[bot]
491ad6de17 Update dependency @babel/runtime to v7.24.4 2024-04-16 12:44:21 +00:00
renovate[bot]
f62076cdc1 Update t3chguy/wait-on-check-action digest to 1854102 2024-04-16 12:43:15 +00:00
renovate[bot]
674650f24d Update peter-evans/create-pull-request digest to c55203c 2024-04-16 12:43:10 +00:00
renovate[bot]
9f5bd7bf66 Update docker/setup-buildx-action digest to d70bba7 2024-04-16 12:43:04 +00:00
RiotRobot
fa5a842257 v1.11.65-rc.0 2024-04-16 12:35:42 +00:00
RiotRobot
a2f1c917bc Upgrade dependency to matrix-react-sdk@3.98.0-rc.0 2024-04-16 12:25:51 +00:00
RiotRobot
b4bff9f3b2 Upgrade dependency to matrix-js-sdk@32.1.0-rc.0 2024-04-16 12:18:34 +00:00
Robin
8ce46d3de8 Merge pull request #27301 from gumara-dev/fix_branch
Fix: 1:1 call - screen sharing no longer works after pressing the cancel button in Element-Desktop
2024-04-09 18:43:57 +00:00
Stephan Raab
2cad731f23 Added comment 2024-04-09 20:32:11 +02:00
Stephan Raab
1cf08423ad ElectronPlatform.tsx aktualisieren
Co-authored-by: Robin <robin@robin.town>
2024-04-09 20:05:03 +02:00
Stephan Raab
b64ac0593e Merge branch 'develop' into fix_branch 2024-04-09 12:32:31 +02:00
RiotRobot
f64759e42e Reset matrix-js-sdk back to develop branch 2024-04-09 10:22:50 +00:00
RiotRobot
d0b192dbc8 Reset matrix-react-sdk back to develop branch 2024-04-09 10:22:40 +00:00
RiotRobot
fc90392982 Merge branch 'master' into develop 2024-04-09 10:22:23 +00:00
RiotRobot
180a1a243b v1.11.64 2024-04-09 10:19:29 +00:00
RiotRobot
5246a7824b Upgrade dependency to matrix-react-sdk@3.97.0 2024-04-09 10:15:10 +00:00
RiotRobot
2dffd41c6f Upgrade dependency to matrix-js-sdk@32.0.0 2024-04-09 10:08:27 +00:00
Stephan Raab
2f72796ae7 Fix share cancel button in element-desktop 2024-04-08 22:17:24 +02:00
David Baker
364ad021e4 Fix issue labeller job, again (#27287)
With the correct URL format this time
2024-04-05 10:10:33 +01:00
David Baker
a187b54707 Merge pull request #27275 from element-hq/dbkr/update_triage_labeller_for_new_project
Update the issue triage labeller for the new triage project
2024-04-04 08:31:54 +00:00
Valere
15c177d8b3 Merge pull request #27032 from element-hq/valere/rust_rollout_phase_1
Update app.element.io configuration to migrate 10% of existing users to the new rust crypto stack
2024-04-04 08:09:15 +00:00
David Baker
773e9bb015 Merge pull request #27283 from element-hq/renovate/actions-add-to-project-1.x
Update actions/add-to-project action to v1
2024-04-03 22:37:49 +00:00
David Baker
dbf2e8c927 Merge pull request #27282 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.4.0
2024-04-03 21:25:05 +00:00
David Baker
e794ac5ecb Merge pull request #27281 from element-hq/renovate/stylelint
Update dependency stylelint to v16.3.1
2024-04-03 20:08:27 +00:00
David Baker
f4d64dcb39 Merge pull request #27280 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-04-03 19:56:17 +00:00
David Baker
a1404722ba Merge pull request #27279 from element-hq/renovate/typescript
Update dependency typescript to v5.4.3
2024-04-03 19:45:42 +00:00
David Baker
9167d4ac56 Merge pull request #27278 from element-hq/renovate/definitelytyped
Update dependency @types/node to v16.18.93
2024-04-03 19:30:39 +00:00
renovate[bot]
c3376efa8d Update dependency stylelint to v16.3.1 2024-04-03 19:07:04 +00:00
renovate[bot]
2ad9c5685e Update actions/add-to-project action to v1 2024-04-03 18:46:24 +00:00
renovate[bot]
0565e614d3 Update typescript-eslint monorepo to v7.4.0 2024-04-03 18:46:16 +00:00
renovate[bot]
1126956d56 Update all non-major dependencies 2024-04-03 18:45:27 +00:00
renovate[bot]
aec32bbc35 Update dependency typescript to v5.4.3 2024-04-03 18:45:01 +00:00
renovate[bot]
424243c064 Update dependency @types/node to v16.18.93 2024-04-03 18:44:50 +00:00
David Baker
84f293fee2 Merge pull request #27276 from element-hq/renovate/babel-monorepo
Update babel monorepo to v7.24.3
2024-04-03 18:43:15 +00:00
renovate[bot]
39f51612f5 Update babel monorepo to v7.24.3 2024-04-03 17:36:12 +00:00
David Baker
f4155fa7c4 Merge pull request #27273 from element-hq/renovate/peter-evans-create-pull-request-digest
Update peter-evans/create-pull-request digest to 70a41ab
2024-04-03 17:08:55 +00:00
David Baker
c2fdd04681 Merge pull request #27272 from element-hq/renovate/sibz-github-status-action-digest
Update Sibz/github-status-action digest to faaa4d9
2024-04-03 16:40:59 +00:00
David Baker
c5da65ba60 Update the issue triage labeller for the new triage project
It was failing because the old project has been deleted, so update
it to the new one.
2024-04-03 17:39:28 +01:00
renovate[bot]
65165247c0 Update peter-evans/create-pull-request digest to 70a41ab 2024-04-03 15:57:26 +00:00
renovate[bot]
e89ba979cf Update Sibz/github-status-action digest to faaa4d9 2024-04-03 15:57:20 +00:00
Richard van der Hoff
cf605b5e6f Merge pull request #27264 from element-hq/rav/format
`translating.md`: add missing `.`
2024-04-03 06:08:46 +00:00
Richard van der Hoff
1984ba3b33 translating.md: comma splice
While we're here
2024-04-02 17:46:04 +01:00
RiotRobot
43db5a8731 v1.11.64-rc.0 2024-04-02 16:33:52 +00:00
RiotRobot
7c9f521f65 Upgrade dependency to matrix-react-sdk@3.97.0-rc.0 2024-04-02 16:26:43 +00:00
RiotRobot
9848bf8246 Upgrade dependency to matrix-js-sdk@32.0.0-rc.0 2024-04-02 16:17:09 +00:00
Richard van der Hoff
b0d8d4bbdb translating.md: add missing . 2024-04-02 16:27:52 +01:00
RiotRobot
4cd14b58e1 Reset matrix-js-sdk back to develop branch 2024-03-28 17:06:13 +00:00
RiotRobot
2853a23679 Reset matrix-react-sdk back to develop branch 2024-03-28 17:06:03 +00:00
RiotRobot
bd931ebd74 Merge branch 'master' into develop 2024-03-28 17:05:45 +00:00
RiotRobot
e2b5cea7df v1.11.63 2024-03-28 17:02:41 +00:00
RiotRobot
2fb41f19a7 Upgrade dependency to matrix-react-sdk@3.96.1 2024-03-28 16:56:42 +00:00
RiotRobot
0cd36558c5 Upgrade dependency to matrix-js-sdk@31.6.1 2024-03-28 16:46:25 +00:00
RiotRobot
f835c678bf Reset matrix-js-sdk back to develop branch 2024-03-26 17:02:44 +00:00
RiotRobot
44a2666183 Reset matrix-react-sdk back to develop branch 2024-03-26 17:02:34 +00:00
RiotRobot
1b81c276fc Merge branch 'master' into develop 2024-03-26 17:02:15 +00:00
RiotRobot
309bb7eb47 v1.11.62 2024-03-26 16:59:26 +00:00
RiotRobot
44fff3b45c Upgrade dependency to matrix-react-sdk@3.96.0 2024-03-26 16:38:44 +00:00
RiotRobot
7498afcb33 Upgrade dependency to matrix-js-sdk@31.6.0 2024-03-26 16:27:37 +00:00
Michael Telatynski
9091c074a8 Merge pull request #27239 from element-hq/renovate/npm-katex-vulnerability
Update dependency katex to v0.16.10 [SECURITY]
2024-03-25 22:55:05 +00:00
renovate[bot]
50a62f6105 Update dependency katex to v0.16.10 [SECURITY] 2024-03-25 22:30:23 +00:00
Michael Telatynski
ef29e98bdc Merge pull request #27234 from element-hq/dependabot/npm_and_yarn/webpack-dev-middleware-7.1.1
Bump webpack-dev-middleware from 7.0.0 to 7.1.1
2024-03-25 07:50:21 +00:00
dependabot[bot]
814aa778ea Bump webpack-dev-middleware from 7.0.0 to 7.1.1
Bumps [webpack-dev-middleware](https://github.com/webpack/webpack-dev-middleware) from 7.0.0 to 7.1.1.
- [Release notes](https://github.com/webpack/webpack-dev-middleware/releases)
- [Changelog](https://github.com/webpack/webpack-dev-middleware/blob/master/CHANGELOG.md)
- [Commits](https://github.com/webpack/webpack-dev-middleware/compare/v7.0.0...v7.1.1)

---
updated-dependencies:
- dependency-name: webpack-dev-middleware
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-25 07:42:40 +00:00
ElementRobot
2723a23ea7 Merge pull request #27226 from element-hq/actions/localazy-download
Localazy Download
2024-03-22 06:18:12 +00:00
t3chguy
23bc0d7f3d [create-pull-request] automated change 2024-03-22 06:07:23 +00:00
Michael Telatynski
573478a630 Fix type inheritance for js-sdk declaration merging
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-20 15:35:27 +00:00
Michael Telatynski
271524e264 Merge pull request #27137 from element-hq/renovate/typescript
Update dependency typescript to v5.4.2
2024-03-19 18:17:50 +00:00
Michael Telatynski
18446de298 Merge pull request #27211 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-03-19 18:12:35 +00:00
renovate[bot]
a6a901109b Update all non-major dependencies 2024-03-19 18:00:34 +00:00
Michael Telatynski
7effb12bbe Merge pull request #27209 from element-hq/renovate/babel-monorepo
Update babel monorepo to v7.24.1
2024-03-19 17:24:40 +00:00
renovate[bot]
b625a8f41f Update babel monorepo to v7.24.1 2024-03-19 17:16:07 +00:00
Michael Telatynski
786cd12636 Merge pull request #27208 from element-hq/renovate/docker
Update docker
2024-03-19 16:54:03 +00:00
Michael Telatynski
122ecb05c9 Merge pull request #27214 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.2.0
2024-03-19 16:38:22 +00:00
Michael Telatynski
f07ea3d2cc Merge pull request #27213 from element-hq/renovate/stylelint
Update dependency stylelint-scss to v6.2.1
2024-03-19 16:33:03 +00:00
Michael Telatynski
37612eb41a Merge pull request #27212 from element-hq/renovate/matrix-org
Update dependency @matrix-org/react-sdk-module-api to v2.4.0
2024-03-19 16:32:17 +00:00
Michael Telatynski
24e17182b3 Merge pull request #27210 from element-hq/renovate/definitelytyped
Update definitelyTyped
2024-03-19 16:31:37 +00:00
renovate[bot]
7a8a72b1e8 Update typescript-eslint monorepo to v7.2.0 2024-03-19 16:16:16 +00:00
renovate[bot]
926d944c2a Update dependency stylelint-scss to v6.2.1 2024-03-19 16:15:47 +00:00
renovate[bot]
ddc22578f6 Update dependency @matrix-org/react-sdk-module-api to v2.4.0 2024-03-19 16:15:30 +00:00
renovate[bot]
8f24d68b53 Update definitelyTyped 2024-03-19 16:14:42 +00:00
renovate[bot]
5a97ad33a2 Update docker 2024-03-19 16:13:51 +00:00
RiotRobot
954589df1b v1.11.62-rc.0 2024-03-19 15:25:53 +00:00
RiotRobot
7c9e37a2c6 Upgrade dependency to matrix-react-sdk@3.96.0-rc.0 2024-03-19 15:20:25 +00:00
RiotRobot
913be315f3 Upgrade dependency to matrix-js-sdk@31.6.0-rc.0 2024-03-19 15:07:43 +00:00
Michael Telatynski
830e7c5c45 Merge pull request #27206 from element-hq/dependabot/npm_and_yarn/follow-redirects-1.15.6
Bump follow-redirects from 1.15.5 to 1.15.6
2024-03-19 11:00:36 +00:00
dependabot[bot]
d6671cca75 Bump follow-redirects from 1.15.5 to 1.15.6
Bumps [follow-redirects](https://github.com/follow-redirects/follow-redirects) from 1.15.5 to 1.15.6.
- [Release notes](https://github.com/follow-redirects/follow-redirects/releases)
- [Commits](https://github.com/follow-redirects/follow-redirects/compare/v1.15.5...v1.15.6)

---
updated-dependencies:
- dependency-name: follow-redirects
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-03-19 10:52:08 +00:00
Michael Telatynski
38dbedcd85 Fix deploying develop when the bundles are already present in R2 (#27200) 2024-03-18 11:25:38 +00:00
RiotRobot
4e492da1e4 Reset matrix-js-sdk back to develop branch 2024-03-14 17:39:52 +00:00
RiotRobot
5cfacc799d Reset matrix-react-sdk back to develop branch 2024-03-14 17:39:42 +00:00
RiotRobot
31d44b4c46 Merge branch 'master' into develop 2024-03-14 17:39:28 +00:00
RiotRobot
ba2336ac5c v1.11.61 2024-03-14 17:36:16 +00:00
RiotRobot
33ea45301e Upgrade dependency to matrix-react-sdk@3.95.0 2024-03-14 17:17:29 +00:00
RiotRobot
02a315814f v1.11.61-rc.0 2024-03-14 16:47:16 +00:00
RiotRobot
5fe009d094 Upgrade dependency to matrix-react-sdk@3.95.0-rc.0 2024-03-14 16:43:03 +00:00
Florian Duros
8082d07e7b Merge pull request #27188 from element-hq/florianduros/update-compound-design-token-subdependencies
Fix missing compound design tokens
2024-03-14 14:17:02 +00:00
Florian Duros
559c3788ac Update matrix-react-sdk deps 2024-03-14 14:50:56 +01:00
Michael Telatynski
54ba0873da Merge pull request #27162 from element-hq/renovate/svgr-webpack-8.x
Update dependency @svgr/webpack to v8
2024-03-12 22:31:53 +00:00
Michael Telatynski
28038cc53e svgo prefixIds
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-12 22:22:36 +00:00
Michael Telatynski
97c3da3789 Fix svgo plugins
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-12 20:48:01 +00:00
Michael Telatynski
40a6a4296b prettier
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-12 19:55:48 +00:00
Michael Telatynski
c5168ad100 Merge branch 'develop' of https://github.com/vector-im/element-web into renovate/svgr-webpack-8.x
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

# Conflicts:
#	yarn.lock
2024-03-12 19:52:40 +00:00
Michael Telatynski
89e455e9a7 Iterate
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-12 19:07:08 +00:00
Michael Telatynski
b68ff2fd88 Merge pull request #27163 from element-hq/renovate/postcss-mixins-10.x
Update dependency postcss-mixins to v10
2024-03-12 19:04:04 +00:00
renovate[bot]
00abe771bf Update dependency postcss-mixins to v10 2024-03-12 18:53:34 +00:00
renovate[bot]
1a2e1474f4 Update dependency @svgr/webpack to v8 2024-03-12 18:51:51 +00:00
RiotRobot
d0b87400d1 Reset matrix-js-sdk back to develop branch 2024-03-12 18:48:50 +00:00
RiotRobot
0977c3839a Reset matrix-react-sdk back to develop branch 2024-03-12 18:48:40 +00:00
RiotRobot
cd7bd1b253 Merge branch 'master' into develop 2024-03-12 18:48:26 +00:00
Michael Telatynski
43467fc7c5 Merge pull request #26748 from element-hq/renovate/postcss-hexrgba-bad-semver
Update dependency postcss-hexrgba to v2.1.0
2024-03-12 13:37:49 +00:00
Richard van der Hoff
7b9d7e37e4 Merge pull request #27152 from element-hq/richvdh-patch-1
Remove Element-R from Z-Labs labelling
2024-03-11 17:23:03 +00:00
Richard van der Hoff
072bc7fc8c Remove Element-R from Z-Labs labelling 2024-03-11 12:38:20 +00:00
Florian Duros
8d04ce4255 Merge pull request #27149 from element-hq/florianduros/ci/automate-project-columns
Remove process to move issue to the old triage board (which has been …
2024-03-11 09:42:31 +00:00
Florian Duros
b97f4b31fa Remove process to move issue to the old triage board (which has been deleted) 2024-03-11 10:08:21 +01:00
Timo
a0c90f9657 Merge pull request #27101 from element-hq/toger5/docs-for-element-call-guest-spa
Add docs for element call external conference configuration (single-page app URL)
2024-03-08 11:34:05 +00:00
renovate[bot]
9b01f375e9 Update dependency postcss-hexrgba to v2.1.0 2024-03-07 11:38:08 +00:00
Michael Telatynski
0539c99cf8 Merge pull request #26751 from element-hq/renovate/postcss-easings-4.x
Update dependency postcss-easings to v4
2024-03-07 11:15:47 +00:00
Michael Telatynski
842fa767b8 Merge pull request #26743 from element-hq/renovate/postcss-nested-6.x
Update dependency postcss-nested to v6
2024-03-07 11:15:27 +00:00
renovate[bot]
aa427ecaf3 Update dependency typescript to v5.4.2 2024-03-07 11:15:09 +00:00
Timo K
5e72da399e final touches
Signed-off-by: Timo K <toger5@hotmail.de>
2024-03-06 11:33:27 +01:00
Timo
1c562a0d2d Update docs/config.md
Co-authored-by: Richard van der Hoff <1389908+richvdh@users.noreply.github.com>
2024-03-06 11:31:23 +01:00
Michael Telatynski
f01d69f90b Merge pull request #27117 from element-hq/renovate/all-minor-patch
Update all non-major dependencies
2024-03-05 16:51:21 +00:00
Michael Telatynski
c9d40992a1 Hold back css deps
Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
2024-03-05 16:35:59 +00:00
Michael Telatynski
986ea30ef5 Merge pull request #27116 from element-hq/renovate/docker
Update docker
2024-03-05 15:46:51 +00:00
Michael Telatynski
110e5163e0 Merge pull request #27053 from element-hq/renovate/webpack-dev-server-5.x
Update dependency webpack-dev-server to v5
2024-03-05 15:36:15 +00:00
renovate[bot]
26999ee978 Update dependency webpack-dev-server to v5 2024-03-05 15:17:43 +00:00
Michael Telatynski
ed2d6d68bb Merge pull request #27119 from element-hq/renovate/typescript-eslint-monorepo
Update typescript-eslint monorepo to v7.1.0
2024-03-05 15:06:45 +00:00
Michael Telatynski
f530e7e4b4 Merge pull request #27118 from element-hq/renovate/babel-monorepo
Update babel monorepo to v7.24.0
2024-03-05 15:01:11 +00:00
Michael Telatynski
b428f4f483 Merge pull request #26964 from element-hq/renovate/peter-evans-create-pull-request-6.x
Update peter-evans/create-pull-request action to v6
2024-03-05 14:45:26 +00:00
renovate[bot]
4a6ac5f8d2 Update typescript-eslint monorepo to v7.1.0 2024-03-05 14:44:31 +00:00
Michael Telatynski
5360dfa9a4 Merge pull request #26961 from element-hq/renovate/definitelytyped
Update definitelyTyped
2024-03-05 14:44:31 +00:00
renovate[bot]
ca93577cd1 Update babel monorepo to v7.24.0 2024-03-05 14:44:04 +00:00
renovate[bot]
e5e536a279 Update all non-major dependencies 2024-03-05 14:43:40 +00:00
renovate[bot]
1f181f1c0a Update docker 2024-03-05 14:43:09 +00:00
renovate[bot]
3c41b70932 Update definitelyTyped 2024-03-01 22:44:53 +00:00
Timo K
d1d909105f review
Signed-off-by: Timo K <toger5@hotmail.de>
2024-03-01 19:22:41 +01:00
Timo K
831eddfbd4 Add docs for element call guest spa.
Signed-off-by: Timo K <toger5@hotmail.de>
2024-03-01 14:33:46 +01:00
renovate[bot]
4a014ea056 Update peter-evans/create-pull-request action to v6 2024-02-28 01:04:13 +00:00
renovate[bot]
64cec89085 Update dependency postcss-nested to v6 2024-02-23 11:23:51 +00:00
renovate[bot]
f502a4049a Update dependency postcss-easings to v4 2024-02-23 11:23:38 +00:00
Valere
18b9052c57 Migrate 10% of existing users to rust in app 2024-02-19 10:25:40 +01:00
许煜恒
b98289c660 Remove (almost) all <audio> tags
Not sure what `remoteAudio` does, seems only used in tests,
so I left it there.
2023-06-27 12:33:04 +08:00
许煜恒
85dbaaa5ff Merge branch 'develop' of github.com:vector-im/element-web into superkenvery/webaudioapi 2023-06-26 23:10:51 +08:00
许煜恒
29c176b521 Remove message audio element (for another pr) 2023-05-30 18:51:11 +08:00
47 changed files with 3758 additions and 4570 deletions

View File

@@ -88,6 +88,7 @@ module.exports = {
"@typescript-eslint/explicit-function-return-type": "off",
"@typescript-eslint/explicit-member-accessibility": "off",
"@typescript-eslint/ban-ts-comment": "off",
"@typescript-eslint/no-floating-promises": "off",
},
},
],

3
.github/cfp_headers vendored
View File

@@ -11,3 +11,6 @@
/apple-app-site-association
Content-Type: application/json
/.well-known/assetlinks.json
Content-Type: application/json

3
.github/labels.yml vendored
View File

@@ -261,3 +261,6 @@
color: "ededed"
- name: "Z-t3chguy"
color: "ededed"
- name: "Z-Flaky-Test-Disabled"
description: "The flaking test has been disabled"
color: "ededed"

View File

@@ -37,6 +37,7 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
# Workaround for yarn install timeouts, especially on Windows
- run: yarn config set network-timeout 300000

View File

@@ -26,6 +26,7 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
- name: Install Dependencies
run: "./scripts/layered.sh"
@@ -84,14 +85,21 @@ jobs:
AWS_ACCESS_KEY_ID: ${{ secrets.CF_R2_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.CF_R2_TOKEN }}
# We may be trying to deploy the same webapp bundles again, we need to ensure that the live bundles
# are not present in the _redirects file and instead accessed directly from Cloudflare Pages.
- name: Trim _redirects
working-directory: _deploy
run: |
find bundles -type d -mindepth 1 -maxdepth 1 -exec sed -i "\:{}:d" _redirects \;
- name: Wait for other steps to succeed
uses: t3chguy/wait-on-check-action@05861d3a448898eb33dfce34153bd1ecb9422fb9 # fork
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
with:
ref: ${{ github.sha }}
running-workflow-name: "Build & Deploy develop.element.io"
repo-token: ${{ secrets.GITHUB_TOKEN }}
wait-interval: 10
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release|prepare).)*$
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release|prepare|GitHub Pages).)*$
# We keep the latest develop.tar.gz on R2 instead of relying on the github artifact uploaded earlier
# as the expires after 24h and requires auth to download.

View File

@@ -7,6 +7,9 @@ on:
# This job can take a while, and we have usage limits, so just publish develop only twice a day
- cron: "0 7/12 * * *"
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
permissions:
id-token: write # needed for signing the images with GitHub OIDC Token
jobs:
buildx:
name: Docker Buildx
@@ -26,6 +29,9 @@ jobs:
with:
fetch-depth: 0 # needed for docker-package to be able to calculate the version
- name: Install Cosign
uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3
- name: Prepare
if: matrix.prepare
run: ${{ matrix.prepare }}
@@ -34,19 +40,19 @@ jobs:
uses: docker/setup-qemu-action@68827325e0b33c7199eb31dd4e31fbe9023e06e3 # v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@f95db51fddba0c2d1ec667646a06c2ce06100226 # v3
uses: docker/setup-buildx-action@d70bba72b1f3fd22344832f00baa16ece964efeb # v3
with:
install: true
- name: Login to Docker Hub
uses: docker/login-action@343f7c4344506bcbf9b4de18042ae17996df046d # v3
uses: docker/login-action@0d4c9c5ea7693da7b068278f7b52bda2a190a446 # v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Docker meta
id: meta
uses: docker/metadata-action@dbef88086f6cef02e264edb7dbf63250c17cef6c # v5
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
with:
images: |
vectorim/element-web
@@ -58,7 +64,8 @@ jobs:
${{ matrix.flavor }}
- name: Build and push
uses: docker/build-push-action@4a13e500e55cf31b7a5d59a38ab2040ab0f42f56 # v5
id: build-and-push
uses: docker/build-push-action@31159d49c0d4756269a0940a750801a1ea5d7003 # v6
with:
context: .
push: true
@@ -66,6 +73,17 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
- name: Sign the images with GitHub OIDC Token
env:
DIGEST: ${{ steps.build-and-push.outputs.digest }}
TAGS: ${{ steps.meta.outputs.tags }}
run: |
images=""
for tag in ${TAGS}; do
images+="${tag}@${DIGEST} "
done
cosign sign --yes ${images}
- name: Update repo description
if: matrix.variant == 'vanilla'
uses: peter-evans/dockerhub-description@e98e4d1628a5f3be2be7c231e50981aee98723ae # v4

View File

@@ -55,7 +55,7 @@ jobs:
echo "- [Automations](automations.md)" >> docs/SUMMARY.md
- name: Setup mdBook
uses: peaceiris/actions-mdbook@v1
uses: peaceiris/actions-mdbook@v2
with:
mdbook-version: "0.4.10"

View File

@@ -1,17 +0,0 @@
name: Build downstream artifacts
on:
merge_group:
types: [checks_requested]
pull_request: {}
push:
branches: [develop, master]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-element-web:
name: Build element-web
uses: matrix-org/matrix-react-sdk/.github/workflows/element-web.yaml@develop
with:
element-web-sha: ${{ github.sha }}
react-sdk-repository: matrix-org/matrix-react-sdk

View File

@@ -3,10 +3,11 @@
name: matrix-react-sdk End to End Tests
on:
workflow_run:
workflows: ["Build downstream artifacts"]
types:
- completed
merge_group:
types: [checks_requested]
pull_request: {}
push:
branches: [develop, master]
concurrency:
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }}
@@ -15,44 +16,14 @@ concurrency:
jobs:
playwright:
name: Playwright
# We only want to run the playwright tests on merge queue to prevent regressions
# from creeping in. They take a long time to run and consume multiple concurrent runners.
if: github.event.workflow_run.event == 'merge_group'
uses: matrix-org/matrix-react-sdk/.github/workflows/end-to-end-tests.yaml@develop
permissions:
actions: read
issues: read
statuses: write
pull-requests: read
deployments: write
with:
element-web-sha: ${{ github.sha }}
react-sdk-repository: matrix-org/matrix-react-sdk
secrets:
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
# We want to make the Playwright tests a required check for the merge queue.
#
# Unfortunately, github doesn't distinguish between "checks needed for branch
# protection" (ie, the things that must pass before the PR will even be added
# to the merge queue) and "checks needed in the merge queue". We just have to add
# the check to the branch protection list.
#
# Ergo, if we know we're not going to run the Playwright tests, we need to add a
# passing status check manually.
mark_skipped:
if: github.event.workflow_run.event != 'merge_group'
permissions:
statuses: write
runs-on: ubuntu-latest
steps:
- uses: Sibz/github-status-action@071b5370da85afbb16637d6eed8524a06bc2053e # v1
with:
authToken: "${{ secrets.GITHUB_TOKEN }}"
state: success
description: Playwright skipped
# Keep in step with the `context` that is updated by `Sibz/github-status-action`
# in matrix-org/matrix-react-sdk/.github/workflows/end-to-end-tests.yaml.
context: "${{ github.workflow }} / end-to-end-tests"
sha: "${{ github.event.workflow_run.head_sha }}"
# We only want to run the playwright tests on merge queue to prevent regressions
# from creeping in. They take a long time to run and consume multiple concurrent runners.
skip: ${{ github.event_name != 'merge_group' }}

View File

@@ -20,7 +20,6 @@ jobs:
GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
with:
final: ${{ inputs.mode == 'final' }}
include-changes: matrix-react-sdk
gpg-fingerprint: ${{ vars.GPG_FINGERPRINT }}
asset-path: dist/*.tar.gz
expected-asset-count: 3
@@ -31,11 +30,13 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Notify element-desktop repo that element-web release has completed to re-trigger release-drafter
uses: peter-evans/repository-dispatch@ff45666b9427631e3450c54a1bcbee4d9ff4d7c0 # v3
uses: benc-uk/workflow-dispatch@25b02cc069be46d637e8fe2f1e8484008e9e9609 # v1
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
repository: element-hq/element-desktop
event-type: upstream-release-notify
workflow: release-drafter.yml
repo: element-hq/element-desktop
ref: staging
# Required when using the `repo` option. Either a PAT or a token generated from the GitHub app or CLI
token: "${{ secrets.ELEMENT_BOT_TOKEN }}"
check:
name: Post release checks

View File

@@ -21,6 +21,7 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
- name: Install Dependencies
run: "./scripts/layered.sh"
@@ -43,6 +44,7 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
# Does not need branch matching as only analyses this layer
- name: Install Deps
@@ -60,6 +62,7 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
# Needs branch matching as it inherits .stylelintrc.js from matrix-react-sdk
- name: Install Dependencies
@@ -77,6 +80,7 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
# Does not need branch matching as only analyses this layer
- name: Install Deps
@@ -94,6 +98,7 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
- name: Install Deps
run: "scripts/layered.sh"

View File

@@ -23,6 +23,7 @@ jobs:
uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
- name: Install Dependencies
run: "./scripts/layered.sh"
@@ -49,7 +50,7 @@ jobs:
needs: jest
steps:
- name: Skip SonarCloud
uses: Sibz/github-status-action@071b5370da85afbb16637d6eed8524a06bc2053e # v1
uses: Sibz/github-status-action@faaa4d96fecf273bd762985e0e7f9f933c774918 # v1
with:
authToken: ${{ secrets.GITHUB_TOKEN }}
state: success

View File

@@ -6,15 +6,6 @@ on:
jobs:
automate-project-columns:
runs-on: ubuntu-latest
steps:
- uses: alex-page/github-project-automation-plus@303f24a24c67ce7adf565a07e96720faf126fe36
with:
project: Issue triage
column: Incoming
repo-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
automate-project-columns-next:
runs-on: ubuntu-latest
steps:
- uses: actions/add-to-project@main

View File

@@ -24,8 +24,7 @@ jobs:
contains(github.event.issue.labels.*.name, 'A-Video-Rooms') ||
contains(github.event.issue.labels.*.name, 'A-Message-Starring') ||
contains(github.event.issue.labels.*.name, 'A-Rich-Text-Editor') ||
contains(github.event.issue.labels.*.name, 'A-Element-Call') ||
contains(github.event.issue.labels.*.name, 'A-Element-R')
contains(github.event.issue.labels.*.name, 'A-Element-Call')
steps:
- uses: actions/github-script@v7
with:
@@ -61,8 +60,8 @@ jobs:
- uses: konradpabjan/move-labeled-or-milestoned-issue@190352295fe309fcb113b49193bc81d9aaa9cb01
with:
action-token: "${{ secrets.ELEMENT_BOT_TOKEN }}"
project-url: "https://github.com/element-hq/element-web/projects/27"
column-name: "Need info"
project-url: "https://github.com/orgs/element-hq/projects/120"
column-name: "Needs info"
label-name: "X-Needs-Info"
add_priority_design_issues_to_project:
@@ -149,7 +148,7 @@ jobs:
contains(github.event.issue.labels.*.name, 'A-Element-R')
steps:
- id: add_to_project
uses: actions/add-to-project@v0.5.0
uses: actions/add-to-project@v1.0.2
with:
project-url: ${{ env.PROJECT_URL }}
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}

View File

@@ -0,0 +1,17 @@
name: Close stale flaky issues
on:
schedule:
- cron: "30 1 * * *"
jobs:
close:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- uses: actions/stale@v9
with:
only-labels: "Z-Flaky-Test"
days-before-stale: 14
days-before-close: 0
close-issue-message: "This flaky test issue has not been updated in 14 days. It is being closed as presumed resolved."
exempt-issue-labels: "Z-Flaky-Test-Disabled"

View File

@@ -13,6 +13,7 @@ jobs:
- uses: actions/setup-node@v4
with:
cache: "yarn"
node-version: "lts/*"
- name: Install Deps
run: "yarn install --frozen-lockfile"
@@ -21,7 +22,7 @@ jobs:
run: "yarn update:jitsi"
- name: Create Pull Request
uses: peter-evans/create-pull-request@153407881ec5c347639a548ade7d8ad1d6740e38 # v5
uses: peter-evans/create-pull-request@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6
with:
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
branch: actions/jitsi-update

View File

@@ -1,3 +1,201 @@
Changes in [1.11.69](https://github.com/element-hq/element-web/releases/tag/v1.11.69) (2024-06-18)
==================================================================================================
## ✨ Features
* Change avatar setting component to use a menu ([#12585](https://github.com/matrix-org/matrix-react-sdk/pull/12585)). Contributed by @dbkr.
* New user profile UI in User Settings ([#12548](https://github.com/matrix-org/matrix-react-sdk/pull/12548)). Contributed by @dbkr.
* MSC4108 support OIDC QR code login ([#12370](https://github.com/matrix-org/matrix-react-sdk/pull/12370)). Contributed by @t3chguy.
## 🐛 Bug Fixes
* Fix image upload preview size ([#12612](https://github.com/matrix-org/matrix-react-sdk/pull/12612)). Contributed by @RiotRobot.
* Fix screen sharing in recent Chrome (https://github.com/matrix-org/matrix-js-sdk/pull/4243).
* Fix roving tab index crash `compareDocumentPosition` ([#12594](https://github.com/matrix-org/matrix-react-sdk/pull/12594)). Contributed by @t3chguy.
* Keep dialog glass border on narrow screens ([#12591](https://github.com/matrix-org/matrix-react-sdk/pull/12591)). Contributed by @dbkr.
* 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.
* Add hover / active state on avatar setting upload button ([#12590](https://github.com/matrix-org/matrix-react-sdk/pull/12590)). Contributed by @dbkr.
* Fix EditInPlace button styles ([#12589](https://github.com/matrix-org/matrix-react-sdk/pull/12589)). Contributed by @dbkr.
* Fix incorrect assumptions about required fields in /search response ([#12575](https://github.com/matrix-org/matrix-react-sdk/pull/12575)). Contributed by @t3chguy.
* Fix display of no avatar in avatar setting controls ([#12558](https://github.com/matrix-org/matrix-react-sdk/pull/12558)). Contributed by @dbkr.
* 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.
Changes in [1.11.68](https://github.com/element-hq/element-web/releases/tag/v1.11.68) (2024-06-04)
==================================================================================================
## ✨ Features
* Tooltip: Improve accessibility for context menus ([#12462](https://github.com/matrix-org/matrix-react-sdk/pull/12462)). Contributed by @florianduros.
* Tooltip: Improve accessibility of space panel ([#12525](https://github.com/matrix-org/matrix-react-sdk/pull/12525)). Contributed by @florianduros.
## 🐛 Bug Fixes
* Close the release announcement when a dialog is opened ([#12559](https://github.com/matrix-org/matrix-react-sdk/pull/12559)). Contributed by @florianduros.
* Tooltip: close field tooltip when ESC is pressed ([#12553](https://github.com/matrix-org/matrix-react-sdk/pull/12553)). Contributed by @florianduros.
* Fix tabbedview breakpoint width ([#12556](https://github.com/matrix-org/matrix-react-sdk/pull/12556)). Contributed by @dbkr.
* Fix E2E icon display in room header ([#12545](https://github.com/matrix-org/matrix-react-sdk/pull/12545)). Contributed by @florianduros.
* Tooltip: Improve placement for space settings ([#12541](https://github.com/matrix-org/matrix-react-sdk/pull/12541)). Contributed by @florianduros.
* Fix deformed avatar in a call in a narrow timeline ([#12538](https://github.com/matrix-org/matrix-react-sdk/pull/12538)). Contributed by @florianduros.
* Shown own sent state indicator even when showReadReceipts is disabled ([#12540](https://github.com/matrix-org/matrix-react-sdk/pull/12540)). Contributed by @t3chguy.
* Ensure we do not fire the verification mismatch modal multiple times ([#12526](https://github.com/matrix-org/matrix-react-sdk/pull/12526)). Contributed by @t3chguy.
* Fix avatar in chat export ([#12537](https://github.com/matrix-org/matrix-react-sdk/pull/12537)). Contributed by @florianduros.
* Use `*` for italics as it doesn't break when used mid-word ([#12523](https://github.com/matrix-org/matrix-react-sdk/pull/12523)). Contributed by @t3chguy.
Changes in [1.11.67](https://github.com/element-hq/element-web/releases/tag/v1.11.67) (2024-05-22)
==================================================================================================
## ✨ Features
* Tooltip: Improve the accessibility of the composer and the rich text editor ([#12459](https://github.com/matrix-org/matrix-react-sdk/pull/12459)). Contributed by @florianduros.
* Allow explicit configuration of OIDC dynamic registration metadata ([#12514](https://github.com/matrix-org/matrix-react-sdk/pull/12514)). Contributed by @t3chguy.
* Tooltip: improve accessibility for messages ([#12487](https://github.com/matrix-org/matrix-react-sdk/pull/12487)). Contributed by @florianduros.
* Collapse UserSettings tabs to just icons on narrow screens ([#12505](https://github.com/matrix-org/matrix-react-sdk/pull/12505)). Contributed by @dbkr.
* Add room topic to right panel room info ([#12503](https://github.com/matrix-org/matrix-react-sdk/pull/12503)). Contributed by @t3chguy.
* OIDC: pass `id_token` via `id_token_hint` on Manage Account interaction ([#12499](https://github.com/matrix-org/matrix-react-sdk/pull/12499)). Contributed by @t3chguy.
* Tooltip: improve accessibility in room ([#12493](https://github.com/matrix-org/matrix-react-sdk/pull/12493)). Contributed by @florianduros.
* Tooltip: improve accessibility for call and voice messages ([#12489](https://github.com/matrix-org/matrix-react-sdk/pull/12489)). Contributed by @florianduros.
* Move the active tab in user settings to the dialog title ([#12481](https://github.com/matrix-org/matrix-react-sdk/pull/12481)). Contributed by @dbkr.
* Tooltip: improve accessibility of spaces ([#12497](https://github.com/matrix-org/matrix-react-sdk/pull/12497)). Contributed by @florianduros.
* Tooltip: improve accessibility of the right panel ([#12490](https://github.com/matrix-org/matrix-react-sdk/pull/12490)). Contributed by @florianduros.
* MSC3575 (Sliding Sync) add well-known proxy support ([#12307](https://github.com/matrix-org/matrix-react-sdk/pull/12307)). Contributed by @EdGeraghty.
## 🐛 Bug Fixes
* Reuse single PlaybackWorker between Playback instances ([#12520](https://github.com/matrix-org/matrix-react-sdk/pull/12520)). Contributed by @t3chguy.
* Fix well-known lookup for sliding sync labs check ([#12519](https://github.com/matrix-org/matrix-react-sdk/pull/12519)). Contributed by @t3chguy.
* Fix `element-desktop-ssoid being` included in OIDC Authorization call ([#12495](https://github.com/matrix-org/matrix-react-sdk/pull/12495)). Contributed by @t3chguy.
* Fix beta notifications reconciliation for intentional mentions push rules ([#12510](https://github.com/matrix-org/matrix-react-sdk/pull/12510)). Contributed by @t3chguy.
* fix avatar stretched on 1:1 call ([#12494](https://github.com/matrix-org/matrix-react-sdk/pull/12494)). Contributed by @I-lander.
* Check native sliding sync support against an unstable feature flag ([#12498](https://github.com/matrix-org/matrix-react-sdk/pull/12498)). Contributed by @turt2live.
* Use OPTIONS for sliding sync detection poke ([#12492](https://github.com/matrix-org/matrix-react-sdk/pull/12492)). Contributed by @turt2live.
* TAC: hide tooltip when the release announcement is displayed ([#12472](https://github.com/matrix-org/matrix-react-sdk/pull/12472)). Contributed by @florianduros.
Changes in [1.11.66](https://github.com/element-hq/element-web/releases/tag/v1.11.66) (2024-05-07)
==================================================================================================
## ✨ Features
* Use a different error message for UTDs when you weren't in the room. ([#12453](https://github.com/matrix-org/matrix-react-sdk/pull/12453)). Contributed by @uhoreg.
* Take the Threads Activity Centre out of labs ([#12439](https://github.com/matrix-org/matrix-react-sdk/pull/12439)). Contributed by @dbkr.
* Expected UTDs: use a different message for UTDs sent before login ([#12391](https://github.com/matrix-org/matrix-react-sdk/pull/12391)). Contributed by @richvdh.
* Add `Tooltip` to `AccessibleButton` ([#12443](https://github.com/matrix-org/matrix-react-sdk/pull/12443)). Contributed by @florianduros.
* Add analytics to activity toggles ([#12418](https://github.com/matrix-org/matrix-react-sdk/pull/12418)). Contributed by @dbkr.
* Decrypt events in reverse order without copying the array ([#12445](https://github.com/matrix-org/matrix-react-sdk/pull/12445)). Contributed by @Johennes.
* Use new compound tooltip ([#12416](https://github.com/matrix-org/matrix-react-sdk/pull/12416)). Contributed by @florianduros.
* Expected UTDs: report a different Posthog code ([#12389](https://github.com/matrix-org/matrix-react-sdk/pull/12389)). Contributed by @richvdh.
## 🐛 Bug Fixes
* TAC: Fix accessibility issue when the Release announcement is displayed ([#12484](https://github.com/matrix-org/matrix-react-sdk/pull/12484)). Contributed by @RiotRobot.
* TAC: Close Release Announcement when TAC button is clicked ([#12485](https://github.com/matrix-org/matrix-react-sdk/pull/12485)). Contributed by @florianduros.
* MenuItem: fix caption usage ([#12455](https://github.com/matrix-org/matrix-react-sdk/pull/12455)). Contributed by @florianduros.
* Show the local echo in previews ([#12451](https://github.com/matrix-org/matrix-react-sdk/pull/12451)). Contributed by @langleyd.
* Fixed the drag and drop of X #27186 ([#12450](https://github.com/matrix-org/matrix-react-sdk/pull/12450)). Contributed by @asimdelvi.
* Move the TAC to above the button ([#12438](https://github.com/matrix-org/matrix-react-sdk/pull/12438)). Contributed by @dbkr.
* Use the same logic in previews as the timeline to hide events that should be hidden ([#12434](https://github.com/matrix-org/matrix-react-sdk/pull/12434)). Contributed by @langleyd.
* Fix selector so maths support doesn't mangle divs ([#12433](https://github.com/matrix-org/matrix-react-sdk/pull/12433)). Contributed by @uhoreg.
Changes in [1.11.65](https://github.com/element-hq/element-web/releases/tag/v1.11.65) (2024-04-23)
==================================================================================================
## ✨ Features
* Make empty state copy for TAC depend on the value of the setting ([#12419](https://github.com/matrix-org/matrix-react-sdk/pull/12419)). Contributed by @dbkr.
* Linkify User Interactive Authentication errors ([#12271](https://github.com/matrix-org/matrix-react-sdk/pull/12271)). Contributed by @t3chguy.
* Add support for device dehydration v2 ([#12316](https://github.com/matrix-org/matrix-react-sdk/pull/12316)). Contributed by @uhoreg.
* Replace `SecurityCustomisations` with `CryptoSetupExtension` ([#12342](https://github.com/matrix-org/matrix-react-sdk/pull/12342)). Contributed by @thoraj.
* Add activity toggle for TAC ([#12413](https://github.com/matrix-org/matrix-react-sdk/pull/12413)). Contributed by @dbkr.
* Humanize spell check language labels ([#12409](https://github.com/matrix-org/matrix-react-sdk/pull/12409)). Contributed by @t3chguy.
* Call Guest Access, give user the option to change the acces level so they can generate a call link. ([#12401](https://github.com/matrix-org/matrix-react-sdk/pull/12401)). Contributed by @toger5.
* TAC: Release Announcement ([#12380](https://github.com/matrix-org/matrix-react-sdk/pull/12380)). Contributed by @florianduros.
* Show the call and share button if the user can create a guest link. ([#12385](https://github.com/matrix-org/matrix-react-sdk/pull/12385)). Contributed by @toger5.
* Add analytics for mark all threads unread ([#12384](https://github.com/matrix-org/matrix-react-sdk/pull/12384)). Contributed by @dbkr.
* Add `EventType.RoomEncryption` to the auto approve capabilities of Element Call widgets ([#12386](https://github.com/matrix-org/matrix-react-sdk/pull/12386)). Contributed by @toger5.
## 🐛 Bug Fixes
* Fix link modal not shown after access upgrade ([#12411](https://github.com/matrix-org/matrix-react-sdk/pull/12411)). Contributed by @toger5.
* Fix thread navigation in timeline ([#12412](https://github.com/matrix-org/matrix-react-sdk/pull/12412)). Contributed by @florianduros.
* Fix inability to join a `knock` room via space hierarchy view ([#12404](https://github.com/matrix-org/matrix-react-sdk/pull/12404)). Contributed by @t3chguy.
* Focus the thread panel when clicking on an item in the TAC ([#12410](https://github.com/matrix-org/matrix-react-sdk/pull/12410)). Contributed by @dbkr.
* Fix space hierarchy tile busy state being stuck after join error ([#12405](https://github.com/matrix-org/matrix-react-sdk/pull/12405)). Contributed by @t3chguy.
* Fix room topic in-app links not being handled correctly on topic dialog ([#12406](https://github.com/matrix-org/matrix-react-sdk/pull/12406)). Contributed by @t3chguy.
Changes in [1.11.64](https://github.com/element-hq/element-web/releases/tag/v1.11.64) (2024-04-09)
==================================================================================================
## ✨ Features
* Mark all threads as read button ([#12378](https://github.com/matrix-org/matrix-react-sdk/pull/12378)). Contributed by @dbkr.
* Video call meta space ([#12297](https://github.com/matrix-org/matrix-react-sdk/pull/12297)). Contributed by @toger5.
* Add leave room warning for last admin ([#9452](https://github.com/matrix-org/matrix-react-sdk/pull/9452)). Contributed by @Arnei.
* Iterate styles around Link new device via QR ([#12356](https://github.com/matrix-org/matrix-react-sdk/pull/12356)). Contributed by @t3chguy.
* Improve code-splitting of highlight.js and maplibre-gs libs ([#12349](https://github.com/matrix-org/matrix-react-sdk/pull/12349)). Contributed by @t3chguy.
* Use data-mx-color for rainbows ([#12325](https://github.com/matrix-org/matrix-react-sdk/pull/12325)). Contributed by @tulir.
## 🐛 Bug Fixes
* Fix external guest access url for unencrypted rooms ([#12345](https://github.com/matrix-org/matrix-react-sdk/pull/12345)). Contributed by @toger5.
* Fix video rooms not showing share link button ([#12374](https://github.com/matrix-org/matrix-react-sdk/pull/12374)). Contributed by @toger5.
* Fix space topic jumping on hover/focus ([#12377](https://github.com/matrix-org/matrix-react-sdk/pull/12377)). Contributed by @t3chguy.
* Allow popping out a Jitsi widget to respect Desktop `web_base_url` config ([#12376](https://github.com/matrix-org/matrix-react-sdk/pull/12376)). Contributed by @t3chguy.
* Remove the Lazy Loading `InvalidStoreError` Dialogs ([#12358](https://github.com/matrix-org/matrix-react-sdk/pull/12358)). Contributed by @langleyd.
* Improve readability of badges and pills ([#12360](https://github.com/matrix-org/matrix-react-sdk/pull/12360)). Contributed by @robintown.
Changes in [1.11.63](https://github.com/element-hq/element-web/releases/tag/v1.11.63) (2024-03-28)
==================================================================================================
This is a hotfix release to fix a couple of issues: one where the client would sometimes call the client/server API to set a push rule in a loop, and one where authentication was not sent for widgets when it should have been.
## 🐛 Bug Fixes
* Revert "Make EC widget theme reactive - Update widget url when the theme changes" ([#12383](https://github.com/matrix-org/matrix-react-sdk/pull/12383)) in order to fix widgets that require authentication.
* Update to hotfixed js-sdk to fix an issue where Element could try to set a push rule in a loop.
Changes in [1.11.62](https://github.com/element-hq/element-web/releases/tag/v1.11.62) (2024-03-26)
==================================================================================================
## ✨ Features
* Change user permission by using a new apply button ([#12346](https://github.com/matrix-org/matrix-react-sdk/pull/12346)). Contributed by @florianduros.
* Mark as Unread ([#12254](https://github.com/matrix-org/matrix-react-sdk/pull/12254)). Contributed by @dbkr.
* Refine the colors of some more components ([#12343](https://github.com/matrix-org/matrix-react-sdk/pull/12343)). Contributed by @robintown.
* TAC: Order rooms by most recent after notification level ([#12329](https://github.com/matrix-org/matrix-react-sdk/pull/12329)). Contributed by @florianduros.
* Make EC widget theme reactive - Update widget url when the theme changes ([#12295](https://github.com/matrix-org/matrix-react-sdk/pull/12295)). Contributed by @toger5.
* Refine styles of menus, toasts, popovers, and modals ([#12332](https://github.com/matrix-org/matrix-react-sdk/pull/12332)). Contributed by @robintown.
* Element Call: fix widget shown while its still loading (`waitForIframeLoad=false`) ([#12292](https://github.com/matrix-org/matrix-react-sdk/pull/12292)). Contributed by @toger5.
* Improve Forward Dialog a11y by switching to roving tab index interactions ([#12306](https://github.com/matrix-org/matrix-react-sdk/pull/12306)). Contributed by @t3chguy.
* Call guest access link creation to join calls as a non registered user via the EC SPA ([#12259](https://github.com/matrix-org/matrix-react-sdk/pull/12259)). Contributed by @toger5.
* Use `strong` element to semantically denote visually emphasised content ([#12320](https://github.com/matrix-org/matrix-react-sdk/pull/12320)). Contributed by @t3chguy.
* Handle up/down arrow keys as well as left/right for horizontal toolbars for improved a11y ([#12305](https://github.com/matrix-org/matrix-react-sdk/pull/12305)). Contributed by @t3chguy.
## 🐛 Bug Fixes
* [Backport staging] Remove the glass border from modal spinners ([#12369](https://github.com/matrix-org/matrix-react-sdk/pull/12369)). Contributed by @RiotRobot.
* Fix incorrect check for private read receipt support ([#12348](https://github.com/matrix-org/matrix-react-sdk/pull/12348)). Contributed by @tulir.
* TAC: Fix hover state when expanded ([#12337](https://github.com/matrix-org/matrix-react-sdk/pull/12337)). Contributed by @florianduros.
* Fix the image view ([#12341](https://github.com/matrix-org/matrix-react-sdk/pull/12341)). Contributed by @robintown.
* Use correct push rule to evaluate room-wide mentions ([#12318](https://github.com/matrix-org/matrix-react-sdk/pull/12318)). Contributed by @t3chguy.
* Reset power selector on API failure to prevent state mismatch ([#12319](https://github.com/matrix-org/matrix-react-sdk/pull/12319)). Contributed by @t3chguy.
* Fix spotlight opening in TAC ([#12315](https://github.com/matrix-org/matrix-react-sdk/pull/12315)). Contributed by @florianduros.
Changes in [1.11.61](https://github.com/element-hq/element-web/releases/tag/v1.11.61) (2024-03-14)
==================================================================================================
* No changes
## 🐛 Bug Fixes
* Update `@vector-im/compound-design-tokens` in package.json ([#12340](https://github.com/matrix-org/matrix-react-sdk/pull/12340)).
Changes in [1.11.60](https://github.com/element-hq/element-web/releases/tag/v1.11.60) (2024-03-12)
==================================================================================================
## ✨ Features

View File

@@ -17,17 +17,17 @@ module.exports = {
],
plugins: [
"@babel/plugin-proposal-export-default-from",
"@babel/plugin-proposal-numeric-separator",
"@babel/plugin-proposal-class-properties",
"@babel/plugin-proposal-object-rest-spread",
"@babel/plugin-proposal-optional-chaining",
"@babel/plugin-proposal-nullish-coalescing-operator",
"@babel/plugin-transform-numeric-separator",
"@babel/plugin-transform-class-properties",
"@babel/plugin-transform-object-rest-spread",
"@babel/plugin-transform-optional-chaining",
"@babel/plugin-transform-nullish-coalescing-operator",
// transform logical assignment (??=, ||=, &&=). preset-env doesn't
// normally bother with these (presumably because all the target
// browsers support it natively), but they make our webpack version (or
// something downstream of babel, at least) fall over.
"@babel/plugin-proposal-logical-assignment-operators",
"@babel/plugin-transform-logical-assignment-operators",
"@babel/plugin-syntax-dynamic-import",
"@babel/plugin-transform-runtime",

View File

@@ -225,6 +225,12 @@ Unless otherwise specified, the following applies to all code:
}
```
37. Avoid functions whose fundamental behaviour varies with different parameter types.
Multiple return types are fine, but if the function's behaviour is going to change significantly,
have two separate functions. For example, `SDKConfig.get()` with a string param which returns the
type according to the param given is ok, but `SDKConfig.get()` with no args returning the whole
config object would not be: this should just be a separate function.
## React
Inheriting all the rules of TypeScript, the following additionally apply:

View File

@@ -250,17 +250,60 @@ When Element is deployed alongside a homeserver with SSO-only login, some option
user can be sent to in order to log them out of that system too, making logout symmetric between Element and the SSO system.
2. `sso_redirect_options`: Options to define how to handle unauthenticated users. If the object contains `"immediate": true`, then
all unauthenticated users will be automatically redirected to the SSO system to start their login. If instead you'd only like to
have users which land on the welcome page to be redirected, use `"on_welcome_page": true`. As an example:
have users which land on the welcome page to be redirected, use `"on_welcome_page": true`. Additionally, there is an option to
redirect anyone landing on the login page, by using `"on_login_page": true`. As an example:
```json
{
"sso_redirect_options": {
"immediate": false,
"on_welcome_page": true
"on_welcome_page": true,
"on_login_page": true
}
}
```
It is most common to use the `immediate` flag instead of `on_welcome_page`.
## Native OIDC
Native OIDC support is currently in labs and is subject to change.
Static OIDC Client IDs are preferred and can be specified under `oidc_static_clients` as a mapping from `issuer` to configuration object containing `client_id`.
Issuer must have a trailing forward slash. As an example:
```json
{
"oidc_static_clients": {
"https://auth.example.com/": {
"client_id": "example-client-id"
}
}
}
```
If a matching static client is not found, the app will attempt to dynamically register a client using metadata specified under `oidc_metadata`.
The app has sane defaults for the metadata properties below but on stricter policy identity providers they may not pass muster, e.g. `contacts` may be required.
The following subproperties are available:
1. `client_uri`: This is the base URI for the OIDC client registration, typically `logo_uri`, `tos_uri`, and `policy_uri` must be either on the same domain or a subdomain of this URI.
2. `logo_uri`: Optional URI for the client logo.
3. `tos_uri`: Optional URI for the client's terms of service.
4. `policy_uri`: Optional URI for the client's privacy policy.
5. `contacts`: Optional list of contact emails for the client.
As an example:
```json
{
"oidc_metadata": {
"client_uri": "https://example.com",
"logo_uri": "https://example.com/logo.png",
"tos_uri": "https://example.com/tos",
"policy_uri": "https://example.com/policy",
"contacts": ["support@example.com"]
}
}
```
## VoIP / Jitsi calls
Currently, Element uses Jitsi to offer conference calls in rooms, with an experimental Element Call implementation in the works.
@@ -344,6 +387,12 @@ The VoIP and Jitsi options are:
this number is exceeded, the user will not be able to join a given call.
- `brand`: Optional name for the app. Defaults to `Element Call`. This is
used throughout the application in various strings/locations.
- `guest_spa_url`: Optional URL for an Element Call single-page app (SPA),
for guest links. If this is set, Element Web will expose a "join" link
for public video rooms, which can then be shared to non-matrix users.
The target Element Call SPA is typically set up to use a homeserver that
allows users to register without email ("passwordless guest users") and to
federate.
## Bug reporting

View File

@@ -110,29 +110,6 @@ This is useful while we experiment with encryption and to make calling compatibl
Enables rendering of MD / HTML in room topics.
## Use the Rust cryptography implementation (`feature_rust_crypto`) [In Development]
Configures Element to use a new cryptography implementation based on the [matrix-rust-sdk](https://github.com/matrix-org/matrix-rust-sdk).
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.
This configuration value is now set to `true` by default. This means that without any additional configuration
every new login will use the new cryptography implementation.
For administrators looking to transition existing users to the new stack, the `RustCrypto.staged_rollout_percent` configuration is available.
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`,
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`.
This configuration should be placed under the `setting_defaults` section as shown:
```
"setting_defaults": {
"RustCrypto.staged_rollout_percent": 20
},
```
By adjusting the `RustCrypto.staged_rollout_percent` value, you can control the migration process according to your deployment strategy.
## New room header & details (`feature_new_room_decoration_ui`) [In Development]
Refactors visually the room header and room sidebar

View File

@@ -14,10 +14,9 @@
## How to check if your language already is being translated
Go to https://localazy.com/p/element-web
If your language is listed then you can get started, have a read of https://localazy.com/docs/general/translating-strings
if you need help getting started. If your language is not yet listed please express your wishes to start translating it in
the general discussion room linked above.
Go to https://localazy.com/p/element-web. If your language is listed then you can get started. Have a read
of https://localazy.com/docs/general/translating-strings if you need help getting started. If your language is not yet
listed please express your wishes to start translating it in the general discussion room linked above.
### What are `%(something)s`?

View File

@@ -43,5 +43,8 @@
"api_host": "https://posthog.element.io"
},
"privacy_policy_url": "https://element.io/cookie-policy",
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx"
"map_style_url": "https://api.maptiler.com/maps/streets/style.json?key=fU3vlMsMn4Jb6dnEIFsx",
"setting_defaults": {
"RustCrypto.staged_rollout_percent": 60
}
}

View File

@@ -48,6 +48,7 @@
},
"privacy_policy_url": "https://element.io/cookie-policy",
"features": {
"threadsActivityCentre": true,
"feature_video_rooms": true,
"feature_new_room_decoration_ui": true,
"feature_element_call_video_rooms": true

View File

@@ -1,6 +1,6 @@
{
"name": "element-web",
"version": "1.11.60",
"version": "1.11.69",
"description": "A feature-rich client for Matrix.org",
"author": "New Vector Ltd.",
"repository": {
@@ -67,37 +67,35 @@
"update:jitsi": "curl -s https://meet.element.io/libs/external_api.min.js > ./res/jitsi_external_api.min.js"
},
"resolutions": {
"@types/react-dom": "17.0.21",
"@types/react": "17.0.68"
"@types/react-dom": "17.0.25",
"@types/react": "17.0.80"
},
"dependencies": {
"@matrix-org/olm": "3.2.15",
"@matrix-org/react-sdk-module-api": "^2.3.0",
"gfm.css": "^1.1.2",
"jsrsasign": "^11.0.0",
"katex": "^0.16.0",
"lodash": "^4.17.21",
"matrix-js-sdk": "31.5.0",
"matrix-react-sdk": "3.94.0",
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
"matrix-react-sdk": "github:matrix-org/matrix-react-sdk#develop",
"matrix-widget-api": "^1.3.1",
"react": "17.0.2",
"react-dom": "17.0.2",
"ua-parser-js": "^1.0.0"
},
"devDependencies": {
"@action-validator/cli": "^0.5.3",
"@action-validator/core": "^0.5.3",
"@action-validator/cli": "^0.6.0",
"@action-validator/core": "^0.6.0",
"@babel/core": "^7.12.10",
"@babel/eslint-parser": "^7.12.10",
"@babel/eslint-plugin": "^7.12.10",
"@babel/plugin-proposal-class-properties": "^7.12.1",
"@babel/plugin-proposal-export-default-from": "^7.12.1",
"@babel/plugin-proposal-logical-assignment-operators": "^7.20.7",
"@babel/plugin-proposal-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-proposal-numeric-separator": "^7.12.7",
"@babel/plugin-proposal-object-rest-spread": "^7.12.1",
"@babel/plugin-proposal-optional-chaining": "^7.12.7",
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
"@babel/plugin-transform-class-properties": "^7.12.1",
"@babel/plugin-transform-logical-assignment-operators": "^7.20.7",
"@babel/plugin-transform-nullish-coalescing-operator": "^7.12.1",
"@babel/plugin-transform-numeric-separator": "^7.12.7",
"@babel/plugin-transform-object-rest-spread": "^7.12.1",
"@babel/plugin-transform-optional-chaining": "^7.12.7",
"@babel/plugin-transform-runtime": "^7.12.10",
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
@@ -107,7 +105,7 @@
"@casualbot/jest-sonar-reporter": "2.2.7",
"@principalstudio/html-webpack-inject-preload": "^1.2.7",
"@sentry/webpack-plugin": "^2.7.1",
"@svgr/webpack": "^5.5.0",
"@svgr/webpack": "^8.0.0",
"@testing-library/react": "^12.1.5",
"@types/commonmark": "^0.27.9",
"@types/content-type": "^1.1.8",
@@ -127,15 +125,16 @@
"@types/node-fetch": "^2.6.4",
"@types/pako": "^2.0.3",
"@types/qrcode": "^1.5.5",
"@types/react": "17.0.68",
"@types/react": "17.0.80",
"@types/react-beautiful-dnd": "^13.1.7",
"@types/react-dom": "17.0.21",
"@types/react-dom": "17.0.25",
"@types/react-transition-group": "^4.4.9",
"@types/sanitize-html": "^2.9.5",
"@types/sdp-transform": "^2.4.9",
"@types/semver": "^7.5.8",
"@types/tar-js": "^0.3.5",
"@types/ua-parser-js": "^0.7.36",
"@types/uuid": "^9.0.7",
"@types/uuid": "^10.0.0",
"@typescript-eslint/eslint-plugin": "^7.0.0",
"@typescript-eslint/parser": "^7.0.0",
"babel-jest": "^29.0.0",
@@ -146,19 +145,19 @@
"concurrently": "^8.0.0",
"copy-webpack-plugin": "^12.0.0",
"cronstrue": "^2.41.0",
"css-loader": "^6.0.0",
"css-minimizer-webpack-plugin": "^6.0.0",
"css-loader": "^7.0.0",
"css-minimizer-webpack-plugin": "^7.0.0",
"dotenv": "^16.0.2",
"eslint": "8.56.0",
"eslint": "8.57.0",
"eslint-config-google": "^0.14.0",
"eslint-config-prettier": "^9.0.0",
"eslint-plugin-deprecate": "0.8.4",
"eslint-plugin-deprecate": "0.8.5",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-matrix-org": "^1.0.0",
"eslint-plugin-react": "^7.28.0",
"eslint-plugin-react-hooks": "^4.3.0",
"eslint-plugin-unicorn": "^51.0.0",
"fake-indexeddb": "^5.0.0",
"eslint-plugin-unicorn": "^54.0.0",
"fake-indexeddb": "^6.0.0",
"fetch-mock": "9.11.0",
"fetch-mock-jest": "^1.5.1",
"file-loader": "^6.0.0",
@@ -170,41 +169,40 @@
"jest-raw-loader": "^1.0.1",
"matrix-mock-request": "^2.5.0",
"matrix-web-i18n": "^3.2.1",
"mini-css-extract-plugin": "^2.7.6",
"mini-css-extract-plugin": "2.8.0",
"minimist": "^1.2.6",
"mkdirp": "^3.0.0",
"modernizr": "^3.12.0",
"node-fetch": "^2.6.7",
"postcss": "8.4.33",
"postcss-easings": "^2.0.0",
"postcss-hexrgba": "2.0.1",
"postcss-easings": "^4.0.0",
"postcss-hexrgba": "2.1.0",
"postcss-import": "16.0.0",
"postcss-loader": "^8.1.0",
"postcss-mixins": "^6.2.3",
"postcss-nested": "^4.2.3",
"postcss-preset-env": "^9.3.0",
"postcss-loader": "8.1.0",
"postcss-mixins": "^10.0.0",
"postcss-nested": "^6.0.0",
"postcss-preset-env": "^9.5.14",
"postcss-scss": "^4.0.4",
"postcss-simple-vars": "^7.0.1",
"prettier": "3.2.5",
"prettier": "3.3.2",
"process": "^0.11.10",
"raw-loader": "^4.0.2",
"rimraf": "^5.0.0",
"semver": "^7.5.2",
"setimmediate": "^1.0.5",
"string-replace-loader": "3",
"style-loader": "3",
"style-loader": "4",
"stylelint": "^16.1.0",
"stylelint-config-standard": "^36.0.0",
"stylelint-scss": "^6.0.0",
"terser-webpack-plugin": "^5.3.9",
"ts-node": "^10.9.1",
"ts-prune": "^0.10.3",
"typescript": "5.3.3",
"typescript": "5.5.2",
"util": "^0.12.5",
"webpack": "^5.89.0",
"webpack-bundle-analyzer": "^4.8.0",
"webpack-cli": "^5.0.0",
"webpack-dev-server": "^4.15.1",
"webpack-dev-server": "^5.0.0",
"yaml": "^2.3.3"
},
"@casualbot/jest-sonar-reporter": {

View File

@@ -38,7 +38,7 @@ module.exports.pitch = function pitch(request) {
return cb(err);
}
if (entries[0]) {
return cb(null, `module.exports = __webpack_public_path__ + ${JSON.stringify(entries[0].files[0])};`);
return cb(null, `module.exports = __webpack_public_path__ + ${JSON.stringify([...entries[0].files][0])};`);
}
return cb(null, null);
});

View File

@@ -0,0 +1,62 @@
[
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "im.vector.app.debug",
"sha256_cert_fingerprints": [
"B0:B0:51:DC:56:5C:81:2F:E1:7F:6F:3E:94:5B:4D:79:04:71:23:AB:0D:A6:12:86:76:9E:B2:94:91:97:13:0E"
]
}
},
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "im.vector.app.nightly",
"sha256_cert_fingerprints": [
"CA:D3:85:16:84:3A:05:CC:EB:00:AB:7B:D3:80:0F:01:BA:8F:E0:4B:38:86:F3:97:D8:F7:9A:1B:C4:54:E4:0F"
]
}
},
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "im.vector.app",
"sha256_cert_fingerprints": [
"F3:FF:38:D2:E5:A6:38:84:86:4A:4E:0D:45:C5:3B:19:8E:7E:39:C0:50:5B:D9:63:F5:55:D6:53:2D:EA:BF:5F"
]
}
},
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "io.element.android.x.debug",
"sha256_cert_fingerprints": [
"B0:B0:51:DC:56:5C:81:2F:E1:7F:6F:3E:94:5B:4D:79:04:71:23:AB:0D:A6:12:86:76:9E:B2:94:91:97:13:0E"
]
}
},
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "io.element.android.x.nightly",
"sha256_cert_fingerprints": [
"CA:D3:85:16:84:3A:05:CC:EB:00:AB:7B:D3:80:0F:01:BA:8F:E0:4B:38:86:F3:97:D8:F7:9A:1B:C4:54:E4:0F"
]
}
},
{
"relation": ["delegate_permission/common.handle_all_urls"],
"target": {
"namespace": "android_app",
"package_name": "io.element.android.x",
"sha256_cert_fingerprints": [
"C6:DB:9B:9C:8C:BD:D6:5D:16:E8:EC:8C:8B:91:C8:31:B9:EF:C9:5C:BF:98:AE:41:F6:A9:D8:35:15:1A:7E:16"
]
}
}
]

File diff suppressed because one or more lines are too long

View File

@@ -1 +0,0 @@
self.addEventListener("fetch", () => {});

View File

@@ -194,9 +194,9 @@ export default class Favicon {
}
private setIcon(canvas: HTMLCanvasElement): void {
setImmediate(() => {
setTimeout(() => {
this.setIconSrc(canvas.toDataURL("image/png"));
});
}, 0);
}
private setIconSrc(url: string): void {

View File

@@ -14,6 +14,7 @@
"error": {
"app_launch_unexpected_error": "שגיאה לא צפויה במהלך טעינת האפליקציה. ראו קונסול לפרטים נוספים.",
"cannot_load_config": "לא ניתן לטעון את קובץ ההגדרות: יש לרענן את הדף כדי לנסות שנית.",
"invalid_configuration_mixed_server": "Invalid configuration: a default_hs_url can't be specified along with default_server_name or default_server_config",
"invalid_configuration_no_server": "תצורה שגויה: לא צוין שרת ברירת מחדל.",
"invalid_json": "האלמנט מכיל הגדרת JSON שגויה, אנא תקנו את הבעיה ואתחלו את הדף.",
"invalid_json_detail": "ההודעה מהמנתח היא: %(message)s",

View File

@@ -31,6 +31,7 @@
"summary": "您的瀏覽器無法執行 %(brand)s",
"title": "不支援的瀏覽器"
},
"powered_by_matrix": "由Matrix支持",
"powered_by_matrix_with_logo": "由 $matrixLogo 驅動的去中心化、加密的聊天與協作工具",
"unknown_device": "未知裝置",
"use_brand_on_mobile": "在行動裝置上使用 %(brand)s",

184
src/serviceworker/index.ts Normal file
View File

@@ -0,0 +1,184 @@
/*
Copyright 2024 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
import { idbLoad } from "matrix-react-sdk/src/utils/StorageAccess";
import { ACCESS_TOKEN_IV, tryDecryptToken } from "matrix-react-sdk/src/utils/tokens/tokens";
import { buildAndEncodePickleKey } from "matrix-react-sdk/src/utils/tokens/pickling";
const serverSupportMap: {
[serverUrl: string]: {
supportsAuthedMedia: boolean;
cacheExpiryTimeMs: number;
};
} = {};
self.addEventListener("install", (event) => {
// We skipWaiting() to update the service worker more frequently, particularly in development environments.
// @ts-expect-error - service worker types are not available. See 'fetch' event handler.
event.waitUntil(skipWaiting());
});
self.addEventListener("activate", (event) => {
// We force all clients to be under our control, immediately. This could be old tabs.
// @ts-expect-error - service worker types are not available. See 'fetch' event handler.
event.waitUntil(clients.claim());
});
// @ts-expect-error - the service worker types conflict with the DOM types available through TypeScript. Many hours
// have been spent trying to convince the type system that there's no actual conflict, but it has yet to work. Instead
// of trying to make it do the thing, we force-cast to something close enough where we can (and ignore errors otherwise).
self.addEventListener("fetch", (event: FetchEvent) => {
// This is the authenticated media (MSC3916) check, proxying what was unauthenticated to the authenticated variants.
if (event.request.method !== "GET") {
return; // not important to us
}
// Note: ideally we'd keep the request headers etc, but in practice we can't even see those details.
// See https://stackoverflow.com/a/59152482
let url = event.request.url;
// We only intercept v3 download and thumbnail requests as presumably everything else is deliberate.
// For example, `/_matrix/media/unstable` or `/_matrix/media/v3/preview_url` are something well within
// the control of the application, and appear to be choices made at a higher level than us.
if (!url.includes("/_matrix/media/v3/download") && !url.includes("/_matrix/media/v3/thumbnail")) {
return; // not a URL we care about
}
// We need to call respondWith synchronously, otherwise we may never execute properly. This means
// later on we need to proxy the request through if it turns out the server doesn't support authentication.
event.respondWith(
(async (): Promise<Response> => {
let accessToken: string | undefined;
try {
// Figure out which homeserver we're communicating with
const csApi = url.substring(0, url.indexOf("/_matrix/media/v3"));
// Add jitter to reduce request spam, particularly to `/versions` on initial page load
await new Promise<void>((resolve) => setTimeout(() => resolve(), Math.random() * 10));
// Locate our access token, and populate the fetchConfig with the authentication header.
// @ts-expect-error - service worker types are not available. See 'fetch' event handler.
const client = await self.clients.get(event.clientId);
accessToken = await getAccessToken(client);
// Update or populate the server support map using a (usually) authenticated `/versions` call.
await tryUpdateServerSupportMap(csApi, accessToken);
// If we have server support (and a means of authentication), rewrite the URL to use MSC3916 endpoints.
if (serverSupportMap[csApi].supportsAuthedMedia && accessToken) {
url = url.replace(/\/media\/v3\/(.*)\//, "/client/v1/media/$1/");
} // else by default we make no changes
} catch (err) {
console.error("SW: Error in request rewrite.", err);
}
// Add authentication and send the request. We add authentication even if MSC3916 endpoints aren't
// being used to ensure patches like this work:
// https://github.com/matrix-org/synapse/commit/2390b66bf0ec3ff5ffb0c7333f3c9b239eeb92bb
return fetch(url, fetchConfigForToken(accessToken));
})(),
);
});
async function tryUpdateServerSupportMap(clientApiUrl: string, accessToken?: string): Promise<void> {
// only update if we don't know about it, or if the data is stale
if (serverSupportMap[clientApiUrl]?.cacheExpiryTimeMs > new Date().getTime()) {
return; // up to date
}
const config = fetchConfigForToken(accessToken);
const versions = await (await fetch(`${clientApiUrl}/_matrix/client/versions`, config)).json();
serverSupportMap[clientApiUrl] = {
supportsAuthedMedia: Boolean(versions?.versions?.includes("v1.11")),
cacheExpiryTimeMs: new Date().getTime() + 2 * 60 * 60 * 1000, // 2 hours from now
};
}
// Ideally we'd use the `Client` interface for `client`, but since it's not available (see 'fetch' listener), we use
// unknown for now and force-cast it to something close enough later.
async function getAccessToken(client: unknown): Promise<string | undefined> {
// Access tokens are encrypted at rest, so while we can grab the "access token", we'll need to do work to get the
// real thing.
const encryptedAccessToken = await idbLoad("account", "mx_access_token");
// We need to extract a user ID and device ID from localstorage, which means calling WebPlatform for the
// read operation. Service workers can't access localstorage.
const { userId, deviceId } = await askClientForUserIdParams(client);
// ... and this is why we need the user ID and device ID: they're index keys for the pickle key table.
const pickleKeyData = await idbLoad("pickleKey", [userId, deviceId]);
if (pickleKeyData && (!pickleKeyData.encrypted || !pickleKeyData.iv || !pickleKeyData.cryptoKey)) {
console.error("SW: Invalid pickle key loaded - ignoring");
return undefined;
}
// Finally, try decrypting the thing and return that. This may fail, but that's okay.
try {
const pickleKey = await buildAndEncodePickleKey(pickleKeyData, userId, deviceId);
return tryDecryptToken(pickleKey, encryptedAccessToken, ACCESS_TOKEN_IV);
} catch (e) {
console.error("SW: Error decrypting access token.", e);
return undefined;
}
}
// Ideally we'd use the `Client` interface for `client`, but since it's not available (see 'fetch' listener), we use
// unknown for now and force-cast it to something close enough inside the function.
async function askClientForUserIdParams(client: unknown): Promise<{ userId: string; deviceId: string }> {
return new Promise((resolve, reject) => {
// Dev note: this uses postMessage, which is a highly insecure channel. postMessage is typically visible to other
// tabs, windows, browser extensions, etc, making it far from ideal for sharing sensitive information. This is
// why our service worker calculates/decrypts the access token manually: we don't want the user's access token
// to be available to (potentially) malicious listeners. We do require some information for that decryption to
// work though, and request that in the least sensitive way possible.
//
// We could also potentially use some version of TLS to encrypt postMessage, though that feels way more involved
// than just reading IndexedDB ourselves.
// Avoid stalling the tab in case something goes wrong.
const timeoutId = setTimeout(() => reject(new Error("timeout in postMessage")), 1000);
// We don't need particularly good randomness here - we just use this to generate a request ID, so we know
// which postMessage reply is for our active request.
const responseKey = Math.random().toString(36);
// Add the listener first, just in case the tab is *really* fast.
const listener = (event: MessageEvent): void => {
if (event.data?.responseKey !== responseKey) return; // not for us
clearTimeout(timeoutId); // do this as soon as possible, avoiding a race between resolve and reject.
resolve(event.data); // "unblock" the remainder of the thread, if that were such a thing in JavaScript.
self.removeEventListener("message", listener); // cleanup, since we're not going to do anything else.
};
self.addEventListener("message", listener);
// Ask the tab for the information we need. This is handled by WebPlatform.
(client as Window).postMessage({ responseKey, type: "userinfo" });
});
}
function fetchConfigForToken(accessToken?: string): RequestInit | undefined {
if (!accessToken) {
return undefined; // no headers/config to specify
}
return {
headers: {
Authorization: `Bearer ${accessToken}`,
},
};
}

View File

@@ -89,9 +89,14 @@ export async function loadApp(fragParams: {}, matrixChatRef: React.Ref<MatrixCha
// XXX: This path matching is a bit brittle, but better to do it early instead of in the app code.
const isWelcomeOrLanding =
window.location.hash === "#/welcome" || window.location.hash === "#" || window.location.hash === "";
const isLoginPage = window.location.hash === "#/login";
if (!autoRedirect && ssoRedirects.on_welcome_page && isWelcomeOrLanding) {
autoRedirect = true;
}
if (!autoRedirect && ssoRedirects.on_login_page && isLoginPage) {
autoRedirect = true;
}
if (!hasPossibleToken && !isReturningFromSso && autoRedirect) {
logger.log("Bypassing app load to redirect to SSO");
const tempCli = createClient({

View File

@@ -81,31 +81,6 @@
<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;"/>
<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;"/>
<audio id="messageAudio">
<source src="media/message.ogg" type="audio/ogg" />
<source src="media/message.mp3" type="audio/mpeg" />
</audio>
<audio id="ringAudio" loop>
<source src="media/ring.ogg" type="audio/ogg" />
<source src="media/ring.mp3" type="audio/mpeg" />
</audio>
<audio id="ringbackAudio" loop>
<source src="media/ringback.ogg" type="audio/ogg" />
<source src="media/ringback.mp3" type="audio/mpeg" />
</audio>
<audio id="callendAudio">
<source src="media/callend.ogg" type="audio/ogg" />
<source src="media/callend.mp3" type="audio/mpeg" />
</audio>
<audio id="busyAudio">
<source src="media/busy.ogg" type="audio/ogg" />
<source src="media/busy.mp3" type="audio/mpeg" />
</audio>
<audio id="errorAudio">
<source src="media/error.ogg" type="audio/ogg" />
<source src="media/error.mp3" type="audio/mpeg" />
</audio>
<audio id="remoteAudio"></audio>
<!-- let CSS themes pass constants to the app -->
<div id="mx_theme_accentColor"></div><div id="mx_theme_secondaryAccentColor"></div><div id="mx_theme_tertiaryAccentColor"></div>

View File

@@ -19,19 +19,14 @@ limitations under the License.
*/
import { logger } from "matrix-js-sdk/src/logger";
import { extractErrorMessageFromError } from "matrix-react-sdk/src/components/views/dialogs/ErrorDialog";
// These are things that can run before the skin loads - be careful not to reference the react-sdk though.
import { parseQsFromFragment } from "./url_utils";
import "./modernizr";
// Make setImmediate available in bundle
import "setimmediate";
// Require common CSS here; this will make webpack process it into bundle.css.
// Our own CSS (which is themed) is imported via separate webpack entry points
// in webpack.config.js
require("gfm.css/gfm.css");
require("katex/dist/katex.css");
/**
@@ -60,8 +55,8 @@ function checkBrowserFeatures(): boolean {
return false;
}
// Custom checks atop Modernizr because it doesn't have ES2018/ES2019 checks
// in it for some features we depend on.
// Custom checks atop Modernizr because it doesn't have checks in it for
// some features we depend on.
// Modernizr requires rules to be lowercase with no punctuation.
// ES2018: http://262.ecma-international.org/9.0/#sec-promise.prototype.finally
window.Modernizr.addTest("promiseprototypefinally", () => typeof window.Promise?.prototype?.finally === "function");
@@ -74,6 +69,13 @@ function checkBrowserFeatures(): boolean {
);
// ES2019: http://262.ecma-international.org/10.0/#sec-object.fromentries
window.Modernizr.addTest("objectfromentries", () => typeof window.Object?.fromEntries === "function");
// ES2024: https://tc39.es/ecma262/2024/#sec-get-regexp.prototype.unicodesets
window.Modernizr.addTest(
"regexpunicodesets",
() => window.RegExp?.prototype && "unicodeSets" in window.RegExp.prototype,
);
// ES2024: https://402.ecma-international.org/9.0/#sec-intl.segmenter
window.Modernizr.addTest("intlsegmenter", () => typeof window.Intl?.Segmenter === "function");
const featureList = Object.keys(window.Modernizr) as Array<keyof ModernizrStatic>;
@@ -109,7 +111,6 @@ async function start(): Promise<void> {
rageshakePromise,
setupLogStorage,
preparePlatform,
loadOlm,
loadConfig,
loadLanguage,
loadTheme,
@@ -118,6 +119,7 @@ async function start(): Promise<void> {
showError,
showIncompatibleBrowser,
_t,
extractErrorMessageFromError,
} = await import(
/* webpackChunkName: "init" */
/* webpackPreload: true */
@@ -147,7 +149,6 @@ async function start(): Promise<void> {
}
}
const loadOlmPromise = loadOlm();
// set the platform for react sdk
preparePlatform();
// load config requires the platform to be ready
@@ -180,7 +181,7 @@ async function start(): Promise<void> {
// error handling begins here
// ##########################
if (!acceptBrowser) {
await new Promise<void>((resolve) => {
await new Promise<void>((resolve, reject) => {
logger.error("Browser is missing required features.");
// take to a different landing page to AWOOOOOGA at the user
showIncompatibleBrowser(() => {
@@ -189,7 +190,7 @@ async function start(): Promise<void> {
}
logger.log("User accepts the compatibility risks.");
resolve();
});
}).catch(reject);
});
}
@@ -214,7 +215,6 @@ async function start(): Promise<void> {
// app load critical path starts here
// assert things started successfully
// ##################################
await loadOlmPromise;
await loadModulesPromise;
await loadThemePromise;
await loadLanguagePromise;

View File

@@ -17,10 +17,6 @@ See the License for the specific language governing permissions and
limitations under the License.
*/
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
// @ts-ignore
import olmWasmPath from "@matrix-org/olm/olm.wasm";
import Olm from "@matrix-org/olm";
import * as ReactDOM from "react-dom";
import * as React from "react";
import * as languageHandler from "matrix-react-sdk/src/languageHandler";
@@ -76,48 +72,6 @@ export async function loadConfig(): Promise<void> {
}
}
export function loadOlm(): Promise<void> {
/* Load Olm. We try the WebAssembly version first, and then the legacy,
* asm.js version if that fails. For this reason we need to wait for this
* to finish before continuing to load the rest of the app. In future
* we could somehow pass a promise down to react-sdk and have it wait on
* that so olm can be loading in parallel with the rest of the app.
*
* We also need to tell the Olm js to look for its wasm file at the same
* level as index.html. It really should be in the same place as the js,
* ie. in the bundle directory, but as far as I can tell this is
* completely impossible with webpack. We do, however, use a hashed
* filename to avoid caching issues.
*/
return Olm.init({
locateFile: () => olmWasmPath,
})
.then(() => {
logger.log("Using WebAssembly Olm");
})
.catch((wasmLoadError) => {
logger.log("Failed to load Olm: trying legacy version", wasmLoadError);
return new Promise((resolve, reject) => {
const s = document.createElement("script");
s.src = "olm_legacy.js"; // XXX: This should be cache-busted too
s.onload = resolve;
s.onerror = reject;
document.body.appendChild(s);
})
.then(() => {
// Init window.Olm, ie. the one just loaded by the script tag,
// not 'Olm' which is still the failed wasm version.
return window.Olm.init();
})
.then(() => {
logger.log("Using legacy Olm");
})
.catch((legacyLoadError) => {
logger.log("Both WebAssembly and asm.js Olm failed!", legacyLoadError);
});
});
}
export async function loadLanguage(): Promise<void> {
const prefLang = SettingsStore.getValue("language", null, /*excludeDefault=*/ true);
let langs: string[] = [];
@@ -138,7 +92,7 @@ export async function loadLanguage(): Promise<void> {
}
export async function loadTheme(): Promise<void> {
setTheme();
return setTheme();
}
export async function loadApp(fragParams: {}): Promise<void> {
@@ -189,3 +143,5 @@ export async function loadModules(): Promise<void> {
}
export { _t } from "../languageHandler";
export { extractErrorMessageFromError } from "matrix-react-sdk/src/components/views/dialogs/ErrorDialog";

View File

@@ -177,17 +177,17 @@ const setupCompleted = (async (): Promise<string | void> => {
}
}
await widgetApi!.transport.reply(ev.detail, response);
widgetApi!.transport.reply(ev.detail, response);
});
};
handleAction(ElementWidgetActions.JoinCall, async ({ audioInput, videoInput }) => {
joinConference(audioInput as string | null, videoInput as string | null);
void joinConference(audioInput as string | null, videoInput as string | null);
});
handleAction(ElementWidgetActions.HangupCall, async ({ force }) => {
if (force === true) {
meetApi?.dispose();
notifyHangup();
void notifyHangup();
meetApi = undefined;
closeConference();
} else {
@@ -297,7 +297,7 @@ function toggleConferenceVisibility(inConference: boolean): void {
function skipToJitsiSplashScreen(): void {
// really just a function alias for self-documenting code
joinConference();
void joinConference();
}
/**
@@ -500,8 +500,8 @@ const onVideoConferenceJoined = (): void => {
if (widgetApi) {
// ignored promise because we don't care if it works
// noinspection JSIgnoredPromiseFromCall
widgetApi.setAlwaysOnScreen(true);
widgetApi.transport.send(ElementWidgetActions.JoinCall, {});
void widgetApi.setAlwaysOnScreen(true);
void widgetApi.transport.send(ElementWidgetActions.JoinCall, {});
}
// Video rooms should start in tile mode
@@ -509,7 +509,7 @@ const onVideoConferenceJoined = (): void => {
};
const onVideoConferenceLeft = (): void => {
notifyHangup();
void notifyHangup();
meetApi = undefined;
};
@@ -517,7 +517,7 @@ const onErrorOccurred = ({ error }: Parameters<ExternalAPIEventCallbacks["errorO
if (error.isFatal) {
// We got disconnected. Since Jitsi Meet might send us back to the
// prejoin screen, we're forced to act as if we hung up entirely.
notifyHangup(error.message);
void notifyHangup(error.message);
meetApi = undefined;
closeConference();
}
@@ -525,7 +525,7 @@ const onErrorOccurred = ({ error }: Parameters<ExternalAPIEventCallbacks["errorO
const onAudioMuteStatusChanged = ({ muted }: AudioMuteStatusChangedEvent): void => {
const action = muted ? ElementWidgetActions.MuteAudio : ElementWidgetActions.UnmuteAudio;
widgetApi?.transport.send(action, {});
void widgetApi?.transport.send(action, {});
};
const onVideoMuteStatusChanged = ({ muted }: VideoMuteStatusChangedEvent): void => {
@@ -535,15 +535,15 @@ const onVideoMuteStatusChanged = ({ muted }: VideoMuteStatusChangedEvent): void
// otherwise the React SDK will mistakenly think the user turned off
// their video by hand
setTimeout(() => {
if (meetApi) widgetApi?.transport.send(ElementWidgetActions.MuteVideo, {});
if (meetApi) void widgetApi?.transport.send(ElementWidgetActions.MuteVideo, {});
}, 200);
} else {
widgetApi?.transport.send(ElementWidgetActions.UnmuteVideo, {});
void widgetApi?.transport.send(ElementWidgetActions.UnmuteVideo, {});
}
};
const updateParticipants = (): void => {
widgetApi?.transport.send(ElementWidgetActions.CallParticipants, {
void widgetApi?.transport.send(ElementWidgetActions.CallParticipants, {
participants: meetApi?.getParticipantsInfo(),
});
};

View File

@@ -120,4 +120,4 @@ async function initPage(): Promise<void> {
}
}
initPage();
void initPage();

View File

@@ -167,15 +167,14 @@ export default class ElectronPlatform extends VectorBasePlatform {
});
});
window.electron.on("openDesktopCapturerSourcePicker", () => {
window.electron.on("openDesktopCapturerSourcePicker", async () => {
const { finished } = Modal.createDialog(DesktopCapturerSourcePicker);
finished.then(([source]) => {
if (!source) return;
this.ipc.call("callDisplayMediaCallback", source);
});
const [source] = await finished;
// getDisplayMedia promise does not return if no dummy is passed here as source
await this.ipc.call("callDisplayMediaCallback", source ?? { id: "", name: "", thumbnailURL: "" });
});
this.ipc.call("startSSOFlow", this.ssoID);
void this.ipc.call("startSSOFlow", this.ssoID);
BreadcrumbsStore.instance.on(UPDATE_EVENT, this.onBreadcrumbsUpdate);
}
@@ -195,7 +194,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
),
initial: getInitialLetter(r.name),
}));
this.ipc.call("breadcrumbs", rooms);
void this.ipc.call("breadcrumbs", rooms);
};
private onUpdateDownloaded = async (ev: Event, { releaseNotes, releaseName }: SquirrelUpdate): Promise<void> => {
@@ -261,7 +260,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
const handler = notification.onclick as Function;
notification.onclick = (): void => {
handler?.();
this.ipc.call("focusWindow");
void this.ipc.call("focusWindow");
};
return notification;
@@ -399,7 +398,7 @@ export default class ElectronPlatform extends VectorBasePlatform {
}
public navigateForwardBack(back: boolean): void {
this.ipc.call(back ? "navigateBack" : "navigateForward");
void this.ipc.call(back ? "navigateBack" : "navigateForward");
}
public overrideBrowserShortcuts(): boolean {
@@ -444,20 +443,29 @@ export default class ElectronPlatform extends VectorBasePlatform {
return (SdkConfig.get() as unknown as Record<string, string>)["web_base_url"] ?? "https://app.element.io";
}
public get defaultOidcClientUri(): string {
// Default to element.io as our scheme `io.element.desktop` is within its scope on default MAS policies
return "https://element.io";
}
public async getOidcClientMetadata(): Promise<OidcRegistrationClientMetadata> {
const baseMetadata = await super.getOidcClientMetadata();
const redirectUri = this.getSSOCallbackUrl();
redirectUri.searchParams.delete(SSO_ID_KEY); // it will be shuttled via the state param instead
return {
...baseMetadata,
applicationType: "native",
redirectUris: [redirectUri.href],
// XXX: This should be overridable in config
clientUri: "https://element.io",
};
}
public getOidcClientState(): string {
return `:${SSO_ID_KEY}:${this.ssoID}`;
}
/**
* The URL to return to after a successful OIDC authentication
*/
public getOidcCallbackUrl(): URL {
const url = super.getOidcCallbackUrl();
url.protocol = "io.element.desktop";
return url;
}
}

View File

@@ -1,7 +1,7 @@
/*
Copyright 2016 Aviral Dasgupta
Copyright 2016 OpenMarket Ltd
Copyright 2017-2020 New Vector Ltd
Copyright 2017-2020, 2024 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
@@ -44,9 +44,41 @@ export default class WebPlatform extends VectorBasePlatform {
public constructor() {
super();
// Register service worker if available on this platform
if ("serviceWorker" in navigator) {
navigator.serviceWorker.register("sw.js");
// Register the service worker in the background
this.tryRegisterServiceWorker().catch((e) => console.error("Error registering/updating service worker:", e));
}
private async tryRegisterServiceWorker(): Promise<void> {
if (!("serviceWorker" in navigator)) {
return; // not available on this platform - don't try to register the service worker
}
// sw.js is exported by webpack, sourced from `/src/serviceworker/index.ts`
const registration = await navigator.serviceWorker.register("sw.js");
if (!registration) {
// Registration didn't work for some reason - assume failed and ignore.
// This typically happens in Jest.
return;
}
await registration.update();
navigator.serviceWorker.addEventListener("message", this.onServiceWorkerPostMessage.bind(this));
}
private onServiceWorkerPostMessage(event: MessageEvent): void {
try {
if (event.data?.["type"] === "userinfo" && event.data?.["responseKey"]) {
const userId = localStorage.getItem("mx_user_id");
const deviceId = localStorage.getItem("mx_device_id");
event.source!.postMessage({
responseKey: event.data["responseKey"],
userId,
deviceId,
});
}
} catch (e) {
console.error("Error responding to service worker: ", e);
}
}
@@ -81,10 +113,10 @@ export default class WebPlatform extends VectorBasePlatform {
// annoyingly, the latest spec says this returns a
// promise, but this is only supported in Chrome 46
// and Firefox 47, so adapt the callback API.
return new Promise(function (resolve) {
return new Promise(function (resolve, reject) {
window.Notification.requestPermission((result) => {
resolve(result);
});
}).catch(reject);
});
}
@@ -116,7 +148,7 @@ export default class WebPlatform extends VectorBasePlatform {
// Ideally, loading an old copy would be impossible with the
// cache-control: nocache HTTP header set, but Firefox doesn't always obey it :/
console.log("startUpdater, current version is " + getNormalizedAppVersion(WebPlatform.VERSION));
this.pollForUpdate((version: string, newVersion: string) => {
void this.pollForUpdate((version: string, newVersion: string) => {
const query = parseQs(location);
if (query.updated) {
console.log("Update reloaded but still on an old version, stopping");
@@ -175,7 +207,7 @@ export default class WebPlatform extends VectorBasePlatform {
public startUpdateCheck(): void {
super.startUpdateCheck();
this.pollForUpdate(showUpdateToast, hideUpdateToast).then((updateState) => {
void this.pollForUpdate(showUpdateToast, hideUpdateToast).then((updateState) => {
dis.dispatch<CheckUpdatesPayload>({
action: Action.CheckUpdates,
...updateState,

View File

@@ -35,7 +35,7 @@ export function initRageshake(): Promise<void> {
// we manually check persistence for rageshakes ourselves
const prom = rageshake.init(/*setUpPersistence=*/ false);
prom.then(
() => {
async () => {
logger.log("Initialised rageshake.");
logger.log(
"To fix line numbers in Chrome: " +
@@ -48,7 +48,7 @@ export function initRageshake(): Promise<void> {
rageshake.flush();
});
rageshake.cleanup();
await rageshake.cleanup();
},
(err) => {
logger.error("Failed to initialise rageshake: " + err);

View File

@@ -1,692 +0,0 @@
/*
Copyright 2016 OpenMarket Ltd
Copyright 2020 New Vector Ltd
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
/* loading.js: test the myriad paths we have for loading the application */
import "fake-indexeddb/auto";
import React from "react";
import { render, screen, fireEvent, waitFor, RenderResult, waitForElementToBeRemoved } from "@testing-library/react";
import PlatformPeg from "matrix-react-sdk/src/PlatformPeg";
import { MatrixClientPeg } from "matrix-react-sdk/src/MatrixClientPeg";
import MatrixChat from "matrix-react-sdk/src/components/structures/MatrixChat";
import dis from "matrix-react-sdk/src/dispatcher/dispatcher";
import MockHttpBackend from "matrix-mock-request";
import { ValidatedServerConfig } from "matrix-react-sdk/src/utils/ValidatedServerConfig";
import { IndexedDBCryptoStore } from "matrix-js-sdk/src/crypto/store/indexeddb-crypto-store";
import { QueryDict, sleep } from "matrix-js-sdk/src/utils";
import { IConfigOptions } from "matrix-react-sdk/src/IConfigOptions";
import { ActionPayload } from "matrix-react-sdk/src/dispatcher/payloads";
import "../jest-mocks";
import WebPlatform from "../../src/vector/platform/WebPlatform";
import { parseQs, parseQsFromFragment } from "../../src/vector/url_utils";
import { cleanLocalstorage, deleteIndexedDB, waitForLoadingSpinner, waitForWelcomeComponent } from "../test-utils";
const DEFAULT_HS_URL = "http://my_server";
const DEFAULT_IS_URL = "http://my_is";
/** The matrix versions our mock server claims to support */
const SERVER_SUPPORTED_MATRIX_VERSIONS = ["v1.1", "v1.5", "v1.6", "v1.8", "v1.9"];
describe("loading:", function () {
let httpBackend: MockHttpBackend;
// an Object simulating the window.location
let windowLocation: Location | undefined;
// the mounted MatrixChat
let matrixChat: RenderResult | undefined;
// a promise which resolves when the MatrixChat calls onTokenLoginCompleted
let tokenLoginCompletePromise: Promise<void> | undefined;
beforeEach(function () {
httpBackend = new MockHttpBackend();
// @ts-ignore
window.fetch = httpBackend.fetchFn;
windowLocation = undefined;
matrixChat = undefined;
});
afterEach(async function () {
console.log(`${Date.now()}: loading: afterEach`);
matrixChat?.unmount();
// unmounting should have cleared the MatrixClientPeg
expect(MatrixClientPeg.get()).toBe(null);
// clear the indexeddbs so we can start from a clean slate next time.
await Promise.all([deleteIndexedDB("matrix-js-sdk:crypto"), deleteIndexedDB("matrix-js-sdk:riot-web-sync")]);
cleanLocalstorage();
console.log(`${Date.now()}: loading: afterEach complete`);
});
/* simulate the load process done by index.js
*
* TODO: it would be nice to factor some of this stuff out of index.js so
* that we can test it rather than our own implementation of it.
*/
function loadApp(
opts: {
queryString?: string;
uriFragment?: string;
config?: IConfigOptions;
} = {},
): void {
const queryString = opts.queryString || "";
const uriFragment = opts.uriFragment || "";
windowLocation = {
search: queryString,
hash: uriFragment,
toString: function (): string {
return this.search + this.hash;
},
} as Location;
function onNewScreen(screen: string): void {
console.log(Date.now() + " newscreen " + screen);
const hash = "#/" + screen;
windowLocation!.hash = hash;
console.log(Date.now() + " browser URI now " + windowLocation);
}
// Parse the given window.location and return parameters that can be used when calling
// MatrixChat.showScreen(screen, params)
function getScreenFromLocation(location: Location): { screen: string; params: QueryDict } {
const fragparts = parseQsFromFragment(location);
return {
screen: fragparts.location.substring(1),
params: fragparts.params,
};
}
const fragParts = parseQsFromFragment(windowLocation);
const config = {
default_hs_url: DEFAULT_HS_URL,
default_is_url: DEFAULT_IS_URL,
validated_server_config: {
hsUrl: DEFAULT_HS_URL,
hsName: "TEST_ENVIRONMENT",
hsNameIsDifferent: false, // yes, we lie
isUrl: DEFAULT_IS_URL,
} as ValidatedServerConfig,
embedded_pages: {
home_url: "data:text/html;charset=utf-8;base64,PGh0bWw+PC9odG1sPg==",
},
features: {
feature_rust_crypto: false,
},
...(opts.config ?? {}),
} as IConfigOptions;
PlatformPeg.set(new WebPlatform());
const params = parseQs(windowLocation);
tokenLoginCompletePromise = new Promise<void>((resolve) => {
matrixChat = render(
<MatrixChat
onNewScreen={onNewScreen}
config={config!}
realQueryParams={params}
startingFragmentQueryParams={fragParts.params}
enableGuest={true}
onTokenLoginCompleted={resolve}
initialScreenAfterLogin={getScreenFromLocation(windowLocation!)}
/>,
);
});
}
// set an expectation that we will get a call to /sync, then flush
// http requests until we do.
//
// returns a promise resolving to the received request
async function expectAndAwaitSync(opts?: { isGuest?: boolean }): Promise<any> {
let syncRequest: (typeof MockHttpBackend.prototype.requests)[number] | null = null;
httpBackend.when("GET", "/_matrix/client/versions").respond(200, {
versions: SERVER_SUPPORTED_MATRIX_VERSIONS,
unstable_features: {},
});
const isGuest = opts?.isGuest;
if (!isGuest) {
// the call to create the LL filter
httpBackend.when("POST", "/filter").respond(200, { filter_id: "llfid" });
httpBackend.when("GET", "/pushrules").respond(200, {});
}
httpBackend
.when("GET", "/sync")
.check((r) => {
syncRequest = r;
})
.respond(200, {});
for (let attempts = 10; attempts > 0; attempts--) {
console.log(Date.now() + " waiting for /sync");
if (syncRequest) {
return syncRequest;
}
await httpBackend.flush(undefined);
}
throw new Error("Gave up waiting for /sync");
}
describe("Clean load with no stored credentials:", function () {
it("gives a welcome page by default", function () {
loadApp();
return sleep(1)
.then(async () => {
// at this point, we're trying to do a guest registration;
// we expect a spinner
await waitForLoadingSpinner();
httpBackend
.when("POST", "/register")
.check(function (req) {
expect(req.queryParams?.kind).toEqual("guest");
})
.respond(403, "Guest access is disabled");
return httpBackend.flush(undefined);
})
.then(() => {
// Wait for another trip around the event loop for the UI to update
return waitForWelcomeComponent(matrixChat);
})
.then(() => {
return waitFor(() => expect(windowLocation?.hash).toEqual("#/welcome"));
});
});
it("should follow the original link after successful login", function () {
loadApp({
uriFragment: "#/room/!room:id",
});
// Pass the liveliness checks
httpBackend.when("GET", "/versions").respond(200, { versions: SERVER_SUPPORTED_MATRIX_VERSIONS });
httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {});
httpBackend
.when("GET", "/_matrix/client/unstable/org.matrix.msc2965/auth_issuer")
.respond(404, { errcode: "M_UNRECOGNIZED", error: "Unrecognized request" });
return sleep(1)
.then(async () => {
// at this point, we're trying to do a guest registration;
// we expect a spinner
await waitForLoadingSpinner();
httpBackend
.when("POST", "/register")
.check(function (req) {
expect(req.queryParams?.kind).toEqual("guest");
})
.respond(403, "Guest access is disabled");
return httpBackend.flush(undefined);
})
.then(() => {
// Wait for another trip around the event loop for the UI to update
return sleep(10);
})
.then(() => {
return moveFromWelcomeToLogin(matrixChat);
})
.then(() => {
return completeLogin(matrixChat!);
})
.then(() => {
// once the sync completes, we should have a room view
return awaitRoomView(matrixChat);
})
.then(() => {
httpBackend.verifyNoOutstandingExpectation();
expect(windowLocation?.hash).toEqual("#/room/!room:id");
// and the localstorage should have been updated
expect(localStorage.getItem("mx_user_id")).toEqual("@user:id");
expect(localStorage.getItem("mx_access_token")).toEqual("access_token");
expect(localStorage.getItem("mx_hs_url")).toEqual(DEFAULT_HS_URL);
expect(localStorage.getItem("mx_is_url")).toEqual(DEFAULT_IS_URL);
});
});
it.skip("should not register as a guest when using a #/login link", function () {
loadApp({
uriFragment: "#/login",
});
// Pass the liveliness checks
httpBackend.when("GET", "/versions").respond(200, { versions: SERVER_SUPPORTED_MATRIX_VERSIONS });
httpBackend.when("GET", "/_matrix/identity/v2").respond(200, {});
return awaitLoginComponent(matrixChat)
.then(async () => {
await waitForElementToBeRemoved(() => screen.queryAllByLabelText("Loading..."));
// we expect a single <Login> component
await screen.findByRole("main");
screen.getAllByText("Sign in");
// the only outstanding request should be a GET /login
// (in particular there should be no /register request for
// guest registration).
const allowedRequests = ["/_matrix/client/v3/login", "/versions", "/_matrix/identity/v2"];
for (const req of httpBackend.requests) {
if (req.method === "GET" && allowedRequests.find((p) => req.path.endsWith(p))) {
continue;
}
throw new Error(`Unexpected HTTP request to ${req}`);
}
return completeLogin(matrixChat!);
})
.then(() => {
expect(matrixChat?.container.querySelector(".mx_HomePage")).toBeTruthy();
expect(windowLocation?.hash).toEqual("#/home");
});
});
});
describe("MatrixClient rehydrated from stored credentials:", function () {
beforeEach(async function () {
localStorage.setItem("mx_hs_url", "http://localhost");
localStorage.setItem("mx_is_url", "http://localhost");
localStorage.setItem("mx_access_token", "access_token");
localStorage.setItem("mx_user_id", "@me:localhost");
localStorage.setItem("mx_device_id", "QWERTYUIOP");
localStorage.setItem("mx_last_room_id", "!last_room:id");
// Create a crypto store as well to satisfy storage consistency checks
const cryptoStore = new IndexedDBCryptoStore(indexedDB, "matrix-js-sdk:crypto");
await cryptoStore.startup();
});
it("shows the last known room by default", function () {
loadApp();
return awaitLoggedIn(matrixChat!)
.then(() => {
// we are logged in - let the sync complete
return expectAndAwaitSync();
})
.then(() => {
// once the sync completes, we should have a room view
return awaitRoomView(matrixChat);
})
.then(() => {
httpBackend.verifyNoOutstandingExpectation();
expect(windowLocation?.hash).toEqual("#/room/!last_room:id");
});
});
it("shows a home page by default if we have no joined rooms", function () {
localStorage.removeItem("mx_last_room_id");
loadApp();
return awaitLoggedIn(matrixChat!)
.then(() => {
// we are logged in - let the sync complete
return expectAndAwaitSync();
})
.then(() => {
// once the sync completes, we should have a home page
httpBackend.verifyNoOutstandingExpectation();
expect(matrixChat?.container.querySelector(".mx_HomePage")).toBeTruthy();
expect(windowLocation?.hash).toEqual("#/home");
});
});
it("shows a room view if we followed a room link", function () {
loadApp({
uriFragment: "#/room/!room:id",
});
return awaitLoggedIn(matrixChat!)
.then(() => {
// we are logged in - let the sync complete
return expectAndAwaitSync();
})
.then(() => {
// once the sync completes, we should have a room view
return awaitRoomView(matrixChat);
})
.then(() => {
httpBackend.verifyNoOutstandingExpectation();
expect(windowLocation?.hash).toEqual("#/room/!room:id");
});
});
describe("/#/login link:", function () {
beforeEach(function () {
loadApp({
uriFragment: "#/login",
});
// give the UI a chance to display
return expectAndAwaitSync();
});
it("does not show a login view", async function () {
await awaitRoomView(matrixChat);
await screen.getByRole("tree", { name: "Spaces" });
expect(screen.queryAllByText("Sign in")).toHaveLength(0);
});
});
});
describe("Guest auto-registration:", function () {
it("shows a welcome page by default", function () {
loadApp();
return sleep(1)
.then(async () => {
// at this point, we're trying to do a guest registration;
// we expect a spinner
await waitForLoadingSpinner();
httpBackend
.when("POST", "/register")
.check(function (req) {
expect(req.queryParams?.kind).toEqual("guest");
})
.respond(200, {
user_id: "@guest:localhost",
device_id: "QWERTYUIOP",
access_token: "secret_token",
});
return httpBackend.flush(undefined);
})
.then(() => {
return awaitLoggedIn(matrixChat!);
})
.then(() => {
// we are logged in - let the sync complete
return expectAndAwaitSync({ isGuest: true });
})
.then(() => {
// once the sync completes, we should have a welcome page
httpBackend.verifyNoOutstandingExpectation();
expect(matrixChat?.container.querySelector(".mx_Welcome")).toBeTruthy();
expect(windowLocation?.hash).toEqual("#/welcome");
});
});
it("uses the default homeserver to register with", function () {
loadApp();
return sleep(1)
.then(async () => {
// at this point, we're trying to do a guest registration;
// we expect a spinner
await waitForLoadingSpinner();
httpBackend
.when("POST", "/register")
.check(function (req) {
expect(req.path.startsWith(DEFAULT_HS_URL)).toBe(true);
expect(req.queryParams?.kind).toEqual("guest");
})
.respond(200, {
user_id: "@guest:localhost",
access_token: "secret_token",
});
return httpBackend.flush(undefined);
})
.then(() => {
return awaitLoggedIn(matrixChat!);
})
.then(() => {
return expectAndAwaitSync({ isGuest: true });
})
.then((req) => {
expect(req.path.startsWith(DEFAULT_HS_URL)).toBe(true);
// once the sync completes, we should have a welcome page
httpBackend.verifyNoOutstandingExpectation();
expect(matrixChat?.container.querySelector(".mx_Welcome")).toBeTruthy();
expect(windowLocation?.hash).toEqual("#/welcome");
expect(MatrixClientPeg.safeGet().baseUrl).toEqual(DEFAULT_HS_URL);
expect(MatrixClientPeg.safeGet().idBaseUrl).toEqual(DEFAULT_IS_URL);
});
});
it("shows a room view if we followed a room link", function () {
loadApp({
uriFragment: "#/room/!room:id",
});
return sleep(1)
.then(async () => {
// at this point, we're trying to do a guest registration;
// we expect a spinner
await waitForLoadingSpinner();
httpBackend
.when("POST", "/register")
.check(function (req) {
expect(req.queryParams?.kind).toEqual("guest");
})
.respond(200, {
user_id: "@guest:localhost",
access_token: "secret_token",
});
return httpBackend.flush(undefined);
})
.then(() => {
return awaitLoggedIn(matrixChat!);
})
.then(() => {
return expectAndAwaitSync({ isGuest: true });
})
.then(() => {
// once the sync completes, we should have a room view
return awaitRoomView(matrixChat);
})
.then(() => {
httpBackend.verifyNoOutstandingExpectation();
expect(windowLocation?.hash).toEqual("#/room/!room:id");
});
});
describe("Login as user", function () {
beforeEach(function () {
// first we have to load the homepage
loadApp();
httpBackend
.when("POST", "/register")
.check(function (req) {
expect(req.queryParams?.kind).toEqual("guest");
})
.respond(200, {
user_id: "@guest:localhost",
access_token: "secret_token",
});
return httpBackend
.flush(undefined)
.then(() => {
return awaitLoggedIn(matrixChat!);
})
.then(() => {
// we got a sync spinner - let the sync complete
return expectAndAwaitSync();
})
.then(async () => {
// once the sync completes, we should have a home page
await waitFor(() => matrixChat?.container.querySelector(".mx_HomePage"));
// we simulate a click on the 'login' button by firing off
// the relevant dispatch.
//
// XXX: is it an anti-pattern to access the react-sdk's
// dispatcher in this way? Is it better to find the login
// button and simulate a click? (we might have to arrange
// for it to be shown - it's not always, due to the
// collapsing left panel
dis.dispatch({ action: "start_login" });
return awaitLoginComponent(matrixChat);
});
});
it("should give us a login page", async function () {
// we expect a single <Login> component
await screen.findByRole("main");
screen.getAllByText("Sign in");
expect(windowLocation?.hash).toEqual("#/login");
});
});
});
describe("Token login:", function () {
it("logs in successfully", function () {
localStorage.setItem("mx_sso_hs_url", "https://homeserver");
localStorage.setItem("mx_sso_is_url", "https://idserver");
loadApp({
queryString: "?loginToken=secretToken",
});
return sleep(1)
.then(async () => {
// we expect a spinner while we're logging in
await waitForLoadingSpinner();
httpBackend
.when("POST", "/login")
.check(function (req) {
expect(req.path).toMatch(new RegExp("^https://homeserver/"));
expect(req.data.type).toEqual("m.login.token");
expect(req.data.token).toEqual("secretToken");
})
.respond(200, {
user_id: "@user:localhost",
device_id: "DEVICE_ID",
access_token: "access_token",
});
return httpBackend.flush(undefined);
})
.then(() => {
// at this point, MatrixChat should fire onTokenLoginCompleted, which
// makes index.js reload the app. We're not going to attempt to
// simulate the reload - just check that things are left in the
// right state for the reloaded app.
return tokenLoginCompletePromise;
})
.then(() => {
return expectAndAwaitSync().catch((e) => {
throw new Error("Never got /sync after login: did the client start?");
});
})
.then(() => {
// check that the localstorage has been set up in such a way that
// the reloaded app can pick up where we leave off.
expect(localStorage.getItem("mx_user_id")).toEqual("@user:localhost");
expect(localStorage.getItem("mx_access_token")).toEqual("access_token");
expect(localStorage.getItem("mx_hs_url")).toEqual("https://homeserver");
expect(localStorage.getItem("mx_is_url")).toEqual("https://idserver");
});
});
});
// check that we have a Login component, send a 'user:pass' login,
// and await the HTTP requests.
async function completeLogin(matrixChat: RenderResult): Promise<void> {
// When we switch to the login component, it'll hit the login endpoint
// for proof of life and to get flows. We'll only give it one option.
httpBackend.when("GET", "/login").respond(200, { flows: [{ type: "m.login.password" }] });
httpBackend.flush(undefined); // We already would have tried the GET /login request
httpBackend
.when("POST", "/login")
.check(function (req) {
expect(req.data.type).toEqual("m.login.password");
expect(req.data.identifier.type).toEqual("m.id.user");
expect(req.data.identifier.user).toEqual("user");
expect(req.data.password).toEqual("pass");
})
.respond(200, {
user_id: "@user:id",
device_id: "DEVICE_ID",
access_token: "access_token",
});
// Give the component some time to finish processing the login flows before continuing.
await waitFor(() => expect(matrixChat?.container.querySelector("#mx_LoginForm_username")).toBeTruthy());
// Enter login details
fireEvent.change(matrixChat.container.querySelector("#mx_LoginForm_username")!, { target: { value: "user" } });
fireEvent.change(matrixChat.container.querySelector("#mx_LoginForm_password")!, { target: { value: "pass" } });
fireEvent.click(screen.getByText("Sign in", { selector: ".mx_Login_submit" }));
return httpBackend
.flush(undefined)
.then(() => {
// Wait for another trip around the event loop for the UI to update
return sleep(1);
})
.then(() => {
return expectAndAwaitSync().catch((e) => {
throw new Error("Never got /sync after login: did the client start?");
});
})
.then(() => {
httpBackend.verifyNoOutstandingExpectation();
});
}
});
async function awaitLoggedIn(matrixChat: RenderResult): Promise<void> {
if (matrixChat.container.querySelector(".mx_MatrixChat_wrapper")) return; // already logged in
return new Promise((resolve) => {
const onAction = ({ action }: ActionPayload): void => {
if (action !== "on_logged_in") {
return;
}
console.log(Date.now() + ": Received on_logged_in action");
dis.unregister(dispatcherRef);
resolve(sleep(1));
};
const dispatcherRef = dis.register(onAction);
console.log(Date.now() + ": Waiting for on_logged_in action");
});
}
async function awaitRoomView(matrixChat?: RenderResult): Promise<void> {
await waitFor(() => matrixChat?.container.querySelector(".mx_RoomView"));
}
async function awaitLoginComponent(matrixChat?: RenderResult): Promise<void> {
await waitFor(() => matrixChat?.container.querySelector(".mx_AuthPage"));
}
function moveFromWelcomeToLogin(matrixChat?: RenderResult): Promise<void> {
dis.dispatch({ action: "start_login" });
return awaitLoginComponent(matrixChat);
}

View File

@@ -16,40 +16,6 @@ limitations under the License.
import { RenderResult, screen, waitFor } from "@testing-library/react";
export function cleanLocalstorage(): void {
window.localStorage.clear();
}
export function deleteIndexedDB(dbName: string): Promise<void> {
return new Promise<void>((resolve, reject) => {
if (!window.indexedDB) {
resolve();
return;
}
const startTime = Date.now();
console.log(`${startTime}: Removing indexeddb instance: ${dbName}`);
const req = window.indexedDB.deleteDatabase(dbName);
req.onblocked = (): void => {
console.log(`${Date.now()}: can't yet delete indexeddb ${dbName} because it is open elsewhere`);
};
req.onerror = (ev): void => {
reject(new Error(`${Date.now()}: unable to delete indexeddb ${dbName}: ${req.error?.message}`));
};
req.onsuccess = (): void => {
const now = Date.now();
console.log(`${now}: Removed indexeddb instance: ${dbName} in ${now - startTime} ms`);
resolve();
};
}).catch((e) => {
console.error(`${Date.now()}: Error removing indexeddb instance ${dbName}: ${e}`);
throw e;
});
}
// wait for loading page
export async function waitForLoadingSpinner(): Promise<void> {
await screen.findByRole("progressbar");

View File

@@ -6,13 +6,13 @@
"esModuleInterop": true,
"module": "es2022",
"moduleResolution": "node",
"target": "es2016",
"target": "es2018",
"noUnusedLocals": true,
"sourceMap": false,
"outDir": "./lib",
"declaration": true,
"jsx": "react",
"lib": ["es2021", "dom", "dom.iterable"],
"lib": ["es2022", "dom", "dom.iterable"],
"strict": true
},
"include": [
@@ -22,6 +22,7 @@
"./node_modules/matrix-react-sdk/src/@types/opus-recorder.d.ts",
"./node_modules/matrix-react-sdk/src/@types/png-chunks-extract.d.ts",
"./node_modules/matrix-react-sdk/src/@types/sanitize-html.d.ts",
"./node_modules/matrix-react-sdk/src/@types/matrix-js-sdk.d.ts",
"./src/**/*.ts",
"./src/**/*.tsx",
"./test/**/*.ts",

View File

@@ -153,6 +153,10 @@ module.exports = (env, argv) => {
mobileguide: "./src/vector/mobile_guide/index.ts",
jitsi: "./src/vector/jitsi/index.ts",
usercontent: "./node_modules/matrix-react-sdk/src/usercontent/index.ts",
serviceworker: {
import: "./src/serviceworker/index.ts",
filename: "sw.js", // update WebPlatform if this changes
},
...(useHMR ? {} : cssThemes),
},
@@ -270,10 +274,6 @@ module.exports = (env, argv) => {
// there is no need for webpack to parse them - they can just be
// included as-is.
/highlight\.js[\\/]lib[\\/]languages/,
// olm takes ages for webpack to process, and it's already heavily
// optimised, so there is little to gain by us uglifying it.
/olm[\\/](javascript[\\/])?olm\.js$/,
],
rules: [
useHMR && {
@@ -439,20 +439,6 @@ module.exports = (env, argv) => {
},
],
},
{
// the olm library wants to load its own wasm, rather than have webpack do it.
// We therefore use the `file-loader` to tell webpack to dump the contents to
// a separate file and return the name, and override the default `type` for `.wasm` files
// (which is `webassembly/experimental` under webpack 4) to stop webpack trying to interpret
// the filename as webassembly. (see also https://github.com/webpack/webpack/issues/6725)
test: /olm\.wasm$/,
loader: "file-loader",
type: "javascript/auto",
options: {
name: "[name].[hash:7].[ext]",
outputPath: ".",
},
},
{
// Fix up the name of the opus-recorder worker (react-sdk dependency).
// We more or less just want it to be clear it's for opus and not something else.
@@ -494,8 +480,11 @@ module.exports = (env, argv) => {
},
},
{
// Same deal as olm.wasm: the decoderWorker wants to load the wasm artifact
// itself.
// The decoderWorker wants to load its own wasm, rather than have webpack do it.
// We therefore use the `file-loader` to tell webpack to dump the contents to
// a separate file and return the name, and override the default `type` for `.wasm` files
// (which is `webassembly/experimental` under webpack 4) to stop webpack trying to interpret
// the filename as webassembly. (see also https://github.com/webpack/webpack/issues/6725)
test: /decoderWorker\.min\.wasm$/,
loader: "file-loader",
type: "javascript/auto",
@@ -543,10 +532,20 @@ module.exports = (env, argv) => {
// props set on the svg will override defaults
expandProps: "end",
svgoConfig: {
plugins: {
plugins: [
{
name: "preset-default",
params: {
overrides: {
removeViewBox: false,
},
},
},
// generates a viewbox if missing
removeDimensions: true,
},
{ name: "removeDimensions" },
// https://github.com/facebook/docusaurus/issues/8297
{ name: "prefixIds" },
],
},
/**
* Forwards the React ref to the root SVG element
@@ -643,8 +642,8 @@ module.exports = (env, argv) => {
// This exports our CSS using the splitChunks and loaders above.
new MiniCssExtractPlugin({
filename: useHMR ? "bundles/[name].css" : "bundles/[hash]/[name].css",
chunkFilename: useHMR ? "bundles/[name].css" : "bundles/[hash]/[name].css",
filename: useHMR ? "bundles/[name].css" : "bundles/[fullhash]/[name].css",
chunkFilename: useHMR ? "bundles/[name].css" : "bundles/[fullhash]/[name].css",
ignoreOrder: false, // Enable to remove warnings about conflicting order
}),
@@ -656,7 +655,7 @@ module.exports = (env, argv) => {
// HtmlWebpackPlugin will screw up our formatting like the names
// of the themes and which chunks we actually care about.
inject: false,
excludeChunks: ["mobileguide", "usercontent", "jitsi"],
excludeChunks: ["mobileguide", "usercontent", "jitsi", "serviceworker"],
minify: false,
templateParameters: {
og_image_url: ogImageUrl,
@@ -726,17 +725,16 @@ module.exports = (env, argv) => {
new CopyWebpackPlugin({
patterns: [
"res/apple-app-site-association",
{ from: ".well-known/**", context: path.resolve(__dirname, "res") },
"res/jitsi_external_api.min.js",
"res/jitsi_external_api.min.js.LICENSE.txt",
"res/manifest.json",
"res/sw.js",
"res/welcome.html",
{ from: "welcome/**", context: path.resolve(__dirname, "res") },
{ from: "themes/**", context: path.resolve(__dirname, "res") },
{ from: "vector-icons/**", context: path.resolve(__dirname, "res") },
{ from: "decoder-ring/**", context: path.resolve(__dirname, "res") },
{ from: "media/**", context: path.resolve(__dirname, "node_modules/matrix-react-sdk/res/") },
"node_modules/@matrix-org/olm/olm_legacy.js",
{ from: "config.json", noErrorOnMissing: true },
"contribute.json",
],
@@ -760,9 +758,9 @@ module.exports = (env, argv) => {
// directory and symlink it into place - this allows users who loaded
// an older version of the application to continue to access webpack
// chunks even after the app is redeployed.
filename: "bundles/[hash]/[name].js",
chunkFilename: "bundles/[hash]/[name].js",
webassemblyModuleFilename: "bundles/[hash]/[modulehash].wasm",
filename: "bundles/[fullhash]/[name].js",
chunkFilename: "bundles/[fullhash]/[name].js",
webassemblyModuleFilename: "bundles/[fullhash]/[modulehash].wasm",
},
// configuration for the webpack-dev-server

6515
yarn.lock

File diff suppressed because it is too large Load Diff