mirror of
https://github.com/element-hq/element-web.git
synced 2025-12-07 01:21:02 +00:00
Compare commits
617 Commits
t3chguy/re
...
robin/call
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
569d525c6e | ||
|
|
7799cb2ec5 | ||
|
|
e47d7aaaff | ||
|
|
8857c07acb | ||
|
|
28ed506fe1 | ||
|
|
76b3be6263 | ||
|
|
6c768b8b32 | ||
|
|
809ada17a4 | ||
|
|
c7762a80f1 | ||
|
|
261923832d | ||
|
|
3daa1bf06a | ||
|
|
e5c8d7dbf0 | ||
|
|
441119ca3a | ||
|
|
acb3e781a4 | ||
|
|
3fb1f6ef4d | ||
|
|
cbfbfad959 | ||
|
|
7546bbc1f0 | ||
|
|
6a10c86d7a | ||
|
|
6f9e3bfe3e | ||
|
|
61d55462df | ||
|
|
d391c69e53 | ||
|
|
a6afff9759 | ||
|
|
073d8e0b86 | ||
|
|
ecf5d720b0 | ||
|
|
b7fea97bb6 | ||
|
|
90801eb38b | ||
|
|
e02da752f0 | ||
|
|
dd2da5c132 | ||
|
|
52060235e4 | ||
|
|
8d67e88b1d | ||
|
|
a365533367 | ||
|
|
6dbc3b489a | ||
|
|
f822653d65 | ||
|
|
09db599fe0 | ||
|
|
c47ce59478 | ||
|
|
f9a85d37fa | ||
|
|
2abd5342c2 | ||
|
|
85f80b1d0a | ||
|
|
4b9382f888 | ||
|
|
03a5ee1c5b | ||
|
|
902146a829 | ||
|
|
43e918b71e | ||
|
|
53c97dfa50 | ||
|
|
f7b010a0b3 | ||
|
|
161323b595 | ||
|
|
8bf3ec29b9 | ||
|
|
039b95eba0 | ||
|
|
6b80d3fca0 | ||
|
|
784abbbe14 | ||
|
|
4d55e8f433 | ||
|
|
02990bd275 | ||
|
|
6fa8032caa | ||
|
|
67658aef56 | ||
|
|
f2fae82e32 | ||
|
|
ef69c0ddc7 | ||
|
|
bc7fe25974 | ||
|
|
426a2066d9 | ||
|
|
047e8e8a9c | ||
|
|
4de9fe60ae | ||
|
|
52b42c0b1c | ||
|
|
bb8b4d7991 | ||
|
|
ec994884fb | ||
|
|
4a8ba810a9 | ||
|
|
40a6c69f1a | ||
|
|
eed6b6df12 | ||
|
|
7b3ce5d9b2 | ||
|
|
8941724020 | ||
|
|
4a231c6450 | ||
|
|
3c690e685a | ||
|
|
53f83124a0 | ||
|
|
63a3a6c454 | ||
|
|
0358b7f93c | ||
|
|
4a381c2a10 | ||
|
|
7cafa0d1a4 | ||
|
|
9ae4388bef | ||
|
|
511c7ca6ab | ||
|
|
2dca721ae7 | ||
|
|
272bb6c5a2 | ||
|
|
fc0797a98d | ||
|
|
5a2edba21b | ||
|
|
9657d39cd6 | ||
|
|
1c4e35606c | ||
|
|
23a3bcfc73 | ||
|
|
25fba1f8ec | ||
|
|
409c0869ce | ||
|
|
c1cc6ab391 | ||
|
|
b4832fd936 | ||
|
|
6b3ae95e8b | ||
|
|
10e91b6e63 | ||
|
|
56083777ef | ||
|
|
70df19406e | ||
|
|
2673085afa | ||
|
|
d9001d177c | ||
|
|
7eb969bbc2 | ||
|
|
0a8393c9e1 | ||
|
|
0fa52e610e | ||
|
|
8cae1e9f5e | ||
|
|
1ea1d386ab | ||
|
|
afa6f377ea | ||
|
|
b7f8623617 | ||
|
|
e75ba356d3 | ||
|
|
4f1eac67a8 | ||
|
|
aa01b17f9e | ||
|
|
4cba79ddcc | ||
|
|
b64471e4f6 | ||
|
|
d3a6f34881 | ||
|
|
dcce9c70dc | ||
|
|
f06ed2fa1f | ||
|
|
099c3073b6 | ||
|
|
12932e2dc6 | ||
|
|
a7de29429c | ||
|
|
d3ea250d77 | ||
|
|
f243fee5a6 | ||
|
|
296d0074ed | ||
|
|
df83338f26 | ||
|
|
c0336f21f6 | ||
|
|
d88f47bdbc | ||
|
|
4a26414957 | ||
|
|
886d0e1241 | ||
|
|
c453d33456 | ||
|
|
ddf221b813 | ||
|
|
08238bb883 | ||
|
|
c390ec333e | ||
|
|
3c22e5dc68 | ||
|
|
f29ce94dd4 | ||
|
|
76485cfb17 | ||
|
|
c0567fc5f4 | ||
|
|
95da3834f2 | ||
|
|
b8a3468485 | ||
|
|
b7f6e0f88c | ||
|
|
b36d9ce32e | ||
|
|
9b6be0f5a9 | ||
|
|
cae0da8f00 | ||
|
|
25689de34a | ||
|
|
ce6cb47943 | ||
|
|
850c1a5b3a | ||
|
|
ec4ae9e58a | ||
|
|
a73eb378d7 | ||
|
|
197afd6a9e | ||
|
|
ac565dca80 | ||
|
|
a0044d6b5f | ||
|
|
68c03db557 | ||
|
|
9a109cdce8 | ||
|
|
a0ab88943b | ||
|
|
ad01218942 | ||
|
|
e1e4d26154 | ||
|
|
84c614676d | ||
|
|
29d9e98111 | ||
|
|
9f5f898ed8 | ||
|
|
78251a3a8a | ||
|
|
1b077c53f5 | ||
|
|
68828a2326 | ||
|
|
af8d93f58a | ||
|
|
c0a097867e | ||
|
|
0b13e57518 | ||
|
|
8615b411b2 | ||
|
|
3d31376b1d | ||
|
|
43e5124cd4 | ||
|
|
19674cca08 | ||
|
|
6ca6cb0fbe | ||
|
|
d92fc5a595 | ||
|
|
b9d411eecc | ||
|
|
3da6619bcf | ||
|
|
f33e7c9782 | ||
|
|
1ebae09834 | ||
|
|
790a976421 | ||
|
|
1e1d66924f | ||
|
|
63ecb48d7d | ||
|
|
5e3fc8aa19 | ||
|
|
56eafc908e | ||
|
|
1644169ff3 | ||
|
|
cf895b4296 | ||
|
|
e9d4f39e9d | ||
|
|
7c0ec21365 | ||
|
|
72df9c9076 | ||
|
|
e42ee727b4 | ||
|
|
7d30413178 | ||
|
|
8884e77ce3 | ||
|
|
58f812ffe6 | ||
|
|
ef1597ff2d | ||
|
|
e5ca7954c8 | ||
|
|
13913ba8b2 | ||
|
|
03a1b48e1f | ||
|
|
ef3bf59656 | ||
|
|
7a3202b537 | ||
|
|
dbce48b23d | ||
|
|
bb41616d5f | ||
|
|
c75f6dc3a1 | ||
|
|
880048d998 | ||
|
|
24685dc7d1 | ||
|
|
60f70b93e0 | ||
|
|
2559cba482 | ||
|
|
5882b004f5 | ||
|
|
37f8d70d89 | ||
|
|
e2bd040c88 | ||
|
|
381b2ea343 | ||
|
|
41944e5c6e | ||
|
|
540580504d | ||
|
|
1a21b718d8 | ||
|
|
2cddb16a9f | ||
|
|
671d6de805 | ||
|
|
0f8a2e93ce | ||
|
|
bff2d680e6 | ||
|
|
5a5db19c2c | ||
|
|
11a8723c73 | ||
|
|
e14a3b64c3 | ||
|
|
f99d7ce2bb | ||
|
|
585aa75525 | ||
|
|
effef7eaa7 | ||
|
|
9826a8851d | ||
|
|
ebef0d353e | ||
|
|
f1899b9eb1 | ||
|
|
027891a35a | ||
|
|
2f7c28ded0 | ||
|
|
b6aba1477b | ||
|
|
056ecbb138 | ||
|
|
7685e547de | ||
|
|
a0a4211447 | ||
|
|
0ad4e13e2d | ||
|
|
f406305510 | ||
|
|
6cb174e3d9 | ||
|
|
c569478240 | ||
|
|
2bd8e049c7 | ||
|
|
e8d69dc592 | ||
|
|
50ac509a01 | ||
|
|
3e27a0019d | ||
|
|
5caad70191 | ||
|
|
6846679d34 | ||
|
|
7e5420100a | ||
|
|
f75d1f5a5e | ||
|
|
66bbb84e56 | ||
|
|
48152d2cd1 | ||
|
|
0d50e34763 | ||
|
|
f157c90ba9 | ||
|
|
cccb847d4e | ||
|
|
a5b739c45a | ||
|
|
9b1e165e6c | ||
|
|
0e2b16abf1 | ||
|
|
f6e999c87d | ||
|
|
3983bd5646 | ||
|
|
e8402f1657 | ||
|
|
69237e7df2 | ||
|
|
cf1c0805f1 | ||
|
|
b6a1aea825 | ||
|
|
b97005c182 | ||
|
|
9599c57a20 | ||
|
|
3eb3b936d9 | ||
|
|
b488155910 | ||
|
|
afc0dd5f86 | ||
|
|
7acadc29cc | ||
|
|
a73faffe37 | ||
|
|
1e758cacae | ||
|
|
7b565e7997 | ||
|
|
b16088d098 | ||
|
|
29624f7bcb | ||
|
|
d8f6c12c3d | ||
|
|
69ee8fd96a | ||
|
|
3fb10baedf | ||
|
|
cf49f9e22c | ||
|
|
703149d76d | ||
|
|
bd3e93e8dd | ||
|
|
0555701829 | ||
|
|
417db4c9b2 | ||
|
|
4e151f8d03 | ||
|
|
afa7ec695d | ||
|
|
e98529824e | ||
|
|
16d2cccb73 | ||
|
|
9d5141cfaa | ||
|
|
1e42f28a69 | ||
|
|
4e1bd69e4d | ||
|
|
12943954c6 | ||
|
|
ec95435724 | ||
|
|
7e1927d388 | ||
|
|
0b24d33c64 | ||
|
|
db02f26005 | ||
|
|
b07d10cb23 | ||
|
|
179b17434e | ||
|
|
ab401160f8 | ||
|
|
5448de5dd6 | ||
|
|
be181d2c79 | ||
|
|
baaed75c4b | ||
|
|
cd7cf86b96 | ||
|
|
2c4a079153 | ||
|
|
9099338af8 | ||
|
|
f621c342ff | ||
|
|
4c1924311f | ||
|
|
a7e3764c27 | ||
|
|
07f1680ba0 | ||
|
|
3fbc9e6de6 | ||
|
|
117bee787f | ||
|
|
580213da5d | ||
|
|
22530d6ea5 | ||
|
|
e7d9df24e2 | ||
|
|
95c879c9e5 | ||
|
|
cbc1838755 | ||
|
|
c2799a1812 | ||
|
|
980b922348 | ||
|
|
ad77f7943b | ||
|
|
89d7dca464 | ||
|
|
aa44cadb02 | ||
|
|
941f4e1005 | ||
|
|
9b85c2d0fd | ||
|
|
1e0dfd0241 | ||
|
|
bea1b8eb85 | ||
|
|
d5db16ca24 | ||
|
|
edaf9773c0 | ||
|
|
7ea188cf89 | ||
|
|
a581e776a8 | ||
|
|
8d261d9819 | ||
|
|
299270e52d | ||
|
|
943b817194 | ||
|
|
2aa72bb40b | ||
|
|
a755e399cf | ||
|
|
8dff758153 | ||
|
|
cf3bdbdc7a | ||
|
|
ba98c2085d | ||
|
|
b330de5d6e | ||
|
|
b86bb5cc2f | ||
|
|
e835cab139 | ||
|
|
af3040fb62 | ||
|
|
b6ba3335ec | ||
|
|
6b7c94905f | ||
|
|
a4e8bb3f9a | ||
|
|
2b4000d47f | ||
|
|
01304439ee | ||
|
|
c659afa8db | ||
|
|
9cc5564d50 | ||
|
|
549300726f | ||
|
|
319dab5920 | ||
|
|
5c51d179b9 | ||
|
|
dbdb23f6bc | ||
|
|
5686666ad2 | ||
|
|
0c4189f2ed | ||
|
|
450cb608ec | ||
|
|
7e03f38a3b | ||
|
|
9bf3d22439 | ||
|
|
5547101bcc | ||
|
|
085854b125 | ||
|
|
ee24989f49 | ||
|
|
5a418f3f19 | ||
|
|
db5b3359c6 | ||
|
|
188f910dc7 | ||
|
|
619e41e3a2 | ||
|
|
c1838b34b6 | ||
|
|
1d51323451 | ||
|
|
d0d0b8212d | ||
|
|
974d3c175a | ||
|
|
d0e19d3e03 | ||
|
|
b016cf59e9 | ||
|
|
cfdfc4e640 | ||
|
|
d0fea745bb | ||
|
|
f3ef9e6602 | ||
|
|
af0391b86a | ||
|
|
36108c0c22 | ||
|
|
d2acce1221 | ||
|
|
b72c053d1a | ||
|
|
865c5b0e9c | ||
|
|
ce3fa2164f | ||
|
|
60b0e8b237 | ||
|
|
823828fc17 | ||
|
|
8774a68a13 | ||
|
|
4730352092 | ||
|
|
0429809c00 | ||
|
|
06fa3481df | ||
|
|
e75ff818d3 | ||
|
|
2c3e01a31c | ||
|
|
84709df3c9 | ||
|
|
00aadf1580 | ||
|
|
d8ebc68aa8 | ||
|
|
5d72735b1f | ||
|
|
2099aaa663 | ||
|
|
6d8cbf39f5 | ||
|
|
b87437d439 | ||
|
|
8619a22f57 | ||
|
|
418f121f96 | ||
|
|
351774d3e3 | ||
|
|
70f898c71d | ||
|
|
4f276c1690 | ||
|
|
2b4ce627b8 | ||
|
|
d68c5a26af | ||
|
|
95175caf0c | ||
|
|
08418c16c9 | ||
|
|
6798239aa8 | ||
|
|
9c74110969 | ||
|
|
1bee3becfb | ||
|
|
bfac727307 | ||
|
|
8e213c5d34 | ||
|
|
c34cbd011d | ||
|
|
e10ecc9a4d | ||
|
|
3dbcb5efa3 | ||
|
|
2b883a8aa0 | ||
|
|
bb54a0e063 | ||
|
|
af3a9777e8 | ||
|
|
61542ff3a8 | ||
|
|
ec460326f1 | ||
|
|
af846f8be9 | ||
|
|
de5ddcf6f7 | ||
|
|
8d28dd3784 | ||
|
|
df7703a4a5 | ||
|
|
fe7ac68478 | ||
|
|
bda045fad0 | ||
|
|
8a7cdaa3ef | ||
|
|
7796200562 | ||
|
|
80cd93678a | ||
|
|
b8c178d133 | ||
|
|
5f4d789259 | ||
|
|
85711be352 | ||
|
|
a891dcddc2 | ||
|
|
61947deef5 | ||
|
|
c1549e6aaa | ||
|
|
adfc66bd1b | ||
|
|
dbfb84eb77 | ||
|
|
3d48168394 | ||
|
|
9ddd5d96eb | ||
|
|
e6dc6b93a7 | ||
|
|
bd0bb879ec | ||
|
|
903928c33c | ||
|
|
0525887be4 | ||
|
|
4259e96c90 | ||
|
|
20532144d2 | ||
|
|
d2eeb3d8af | ||
|
|
b4445fed53 | ||
|
|
9860f9320a | ||
|
|
c8f46a0191 | ||
|
|
4285b4b140 | ||
|
|
de820e11fc | ||
|
|
94130be5a7 | ||
|
|
0333cba258 | ||
|
|
2ebc1b4a89 | ||
|
|
756ce2c639 | ||
|
|
c519361b4e | ||
|
|
15bd59b81a | ||
|
|
c74f9159ad | ||
|
|
2ac2bae4fa | ||
|
|
a478463b75 | ||
|
|
3f221891f7 | ||
|
|
a2a066d8b4 | ||
|
|
ede91bf921 | ||
|
|
fd7c50f61d | ||
|
|
3d6664109b | ||
|
|
7d20bd4d06 | ||
|
|
e0e522a0e9 | ||
|
|
8df26a54cf | ||
|
|
c2ce7dbc5e | ||
|
|
affa4e5211 | ||
|
|
04604e5171 | ||
|
|
0e38df84c8 | ||
|
|
2ce588ac64 | ||
|
|
cdfb58501d | ||
|
|
f89f050f07 | ||
|
|
eddaf7c47e | ||
|
|
3860226ee2 | ||
|
|
b907ec380f | ||
|
|
5d7c71210f | ||
|
|
d8844c682b | ||
|
|
72989ea646 | ||
|
|
95630f525f | ||
|
|
d5c111f656 | ||
|
|
7329a5f1fc | ||
|
|
2063624fb6 | ||
|
|
03a1d89785 | ||
|
|
5cdcf44b6f | ||
|
|
ca33d9165a | ||
|
|
2dffadc92e | ||
|
|
48fd330dd9 | ||
|
|
f0af77712f | ||
|
|
60ff33fecc | ||
|
|
3bcc27a444 | ||
|
|
7e33f03a02 | ||
|
|
0d5c9a338b | ||
|
|
d4ab40990b | ||
|
|
c8e4ffe1dd | ||
|
|
0ae74a9e1f | ||
|
|
ed9795137b | ||
|
|
4f8e9eb9ac | ||
|
|
08f41a48a8 | ||
|
|
9b316e8e7f | ||
|
|
72a2773629 | ||
|
|
abf6d58b7b | ||
|
|
cafa02ccc2 | ||
|
|
28640eec5f | ||
|
|
ce928e8d1f | ||
|
|
774b767b80 | ||
|
|
e7cd322559 | ||
|
|
ae3ca52bd2 | ||
|
|
d36cfc37e2 | ||
|
|
e3f8a7b13d | ||
|
|
048f88e10e | ||
|
|
9a126795a8 | ||
|
|
5b0aa511a6 | ||
|
|
346b45751c | ||
|
|
4f7c61ff68 | ||
|
|
da2e126ce1 | ||
|
|
18ef975386 | ||
|
|
ec96d33ed7 | ||
|
|
926c45488d | ||
|
|
b8e54750a0 | ||
|
|
84bd188dd7 | ||
|
|
ca239fee4d | ||
|
|
349c9b0c26 | ||
|
|
73db771ff3 | ||
|
|
f77d9b4bcb | ||
|
|
27b62d022e | ||
|
|
5c3a518576 | ||
|
|
3132fe3233 | ||
|
|
6e5f593c98 | ||
|
|
8bf3ec8376 | ||
|
|
eb938c21d6 | ||
|
|
e5c0cdc402 | ||
|
|
8a756b592c | ||
|
|
c67e67af4e | ||
|
|
7b1e303328 | ||
|
|
27a43e860a | ||
|
|
9b5d0866e0 | ||
|
|
86c6ba9dd7 | ||
|
|
0faf298e05 | ||
|
|
ef382584f0 | ||
|
|
d8d60170ac | ||
|
|
159d62f7d3 | ||
|
|
6424853f27 | ||
|
|
84b07cbbaa | ||
|
|
b03c84f51e | ||
|
|
ad2dda960e | ||
|
|
ee63710ef1 | ||
|
|
90f9f53bc1 | ||
|
|
3c00a40a1d | ||
|
|
54d7974863 | ||
|
|
1fd497fd55 | ||
|
|
26e961489f | ||
|
|
21a309290a | ||
|
|
08cb450d25 | ||
|
|
4bdd4f4f49 | ||
|
|
6d1b702214 | ||
|
|
bbe474ae57 | ||
|
|
bebf44d9ee | ||
|
|
231073c578 | ||
|
|
a00c343435 | ||
|
|
1e2e8844e5 | ||
|
|
6bc8080ec5 | ||
|
|
bff17ff470 | ||
|
|
c0a313abae | ||
|
|
db30bc51a1 | ||
|
|
c8c107405f | ||
|
|
6134cfd9c4 | ||
|
|
3f70105204 | ||
|
|
4ff08f942d | ||
|
|
29b75385a3 | ||
|
|
17de66140d | ||
|
|
f3d0fc4d68 | ||
|
|
0b636aec4b | ||
|
|
d0cddc5b66 | ||
|
|
cb0d72fc2f | ||
|
|
9a6be72c10 | ||
|
|
536d6ad360 | ||
|
|
b604a6ea8c | ||
|
|
da4672d715 | ||
|
|
74a919cb65 | ||
|
|
b92101a3da | ||
|
|
5057668705 | ||
|
|
931edd7419 | ||
|
|
044eaf7eb5 | ||
|
|
88c72a1514 | ||
|
|
d06cf09bf0 | ||
|
|
2f8e98242c | ||
|
|
1c6408081f | ||
|
|
3ff5a511e5 | ||
|
|
f3e976d67d | ||
|
|
21930a10ae | ||
|
|
82a6826a02 | ||
|
|
1c06ebadcd | ||
|
|
458b4a45e5 | ||
|
|
01039137b5 | ||
|
|
f86099c76e | ||
|
|
464be37815 | ||
|
|
f919d1654a | ||
|
|
7093c9a61b | ||
|
|
9ef3b0b994 | ||
|
|
6042625198 | ||
|
|
9d79a934bf | ||
|
|
a355292a7f | ||
|
|
24fabfff89 | ||
|
|
0b6ed44390 | ||
|
|
a6ce6dc7ab | ||
|
|
15984455af | ||
|
|
6e4bd564d5 | ||
|
|
aeabf3b188 | ||
|
|
c9d9c421bc | ||
|
|
d7d96b6b8b | ||
|
|
2631b908b6 | ||
|
|
502cc91dfe | ||
|
|
38e5eeea00 | ||
|
|
1ccbdb21e9 | ||
|
|
b1ef099cd6 | ||
|
|
00d46f1c8f | ||
|
|
8e304713a2 | ||
|
|
0899165d9e | ||
|
|
2d9982f9f0 | ||
|
|
b8fd98ab3c | ||
|
|
a27dfa1825 | ||
|
|
a3ece9d902 | ||
|
|
23613ac37e | ||
|
|
195337d865 | ||
|
|
4bb9f2ed7b | ||
|
|
e0ffddf3eb | ||
|
|
386b782f2a | ||
|
|
849f2c9818 | ||
|
|
8ebfaadeed | ||
|
|
1d49a46dd2 | ||
|
|
dabe6722aa | ||
|
|
10a63b3c23 | ||
|
|
9ce515a646 | ||
|
|
1df72ce2d0 | ||
|
|
6a960204b3 | ||
|
|
26cd13ae3c | ||
|
|
3793c6daca | ||
|
|
65f0d7930a | ||
|
|
8b914c02d0 |
@@ -7,3 +7,4 @@ test/end-to-end-tests/lib/
|
|||||||
src/component-index.js
|
src/component-index.js
|
||||||
# Auto-generated file
|
# Auto-generated file
|
||||||
src/modules.ts
|
src/modules.ts
|
||||||
|
src/modules.js
|
||||||
|
|||||||
@@ -1,60 +0,0 @@
|
|||||||
module.exports = {
|
|
||||||
plugins: ["matrix-org"],
|
|
||||||
extends: ["./.eslintrc.js"],
|
|
||||||
parserOptions: {
|
|
||||||
project: ["./tsconfig.module_system.json"],
|
|
||||||
},
|
|
||||||
overrides: [
|
|
||||||
{
|
|
||||||
files: ["module_system/**/*.{ts,tsx}"],
|
|
||||||
extends: ["plugin:matrix-org/typescript", "plugin:matrix-org/react"],
|
|
||||||
// NOTE: These rules are frozen and new rules should not be added here.
|
|
||||||
// New changes belong in https://github.com/matrix-org/eslint-plugin-matrix-org/
|
|
||||||
rules: {
|
|
||||||
// Things we do that break the ideal style
|
|
||||||
"prefer-promise-reject-errors": "off",
|
|
||||||
"quotes": "off",
|
|
||||||
|
|
||||||
// We disable this while we're transitioning
|
|
||||||
"@typescript-eslint/no-explicit-any": "off",
|
|
||||||
// We're okay with assertion errors when we ask for them
|
|
||||||
"@typescript-eslint/no-non-null-assertion": "off",
|
|
||||||
|
|
||||||
// Ban matrix-js-sdk/src imports in favour of matrix-js-sdk/src/matrix imports to prevent unleashing hell.
|
|
||||||
"no-restricted-imports": [
|
|
||||||
"error",
|
|
||||||
{
|
|
||||||
paths: [
|
|
||||||
{
|
|
||||||
name: "matrix-js-sdk",
|
|
||||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "matrix-js-sdk/",
|
|
||||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "matrix-js-sdk/src",
|
|
||||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "matrix-js-sdk/src/",
|
|
||||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
|
||||||
},
|
|
||||||
{
|
|
||||||
name: "matrix-js-sdk/src/index",
|
|
||||||
message: "Please use matrix-js-sdk/src/matrix instead",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
patterns: [
|
|
||||||
{
|
|
||||||
group: ["matrix-js-sdk/lib", "matrix-js-sdk/lib/", "matrix-js-sdk/lib/**"],
|
|
||||||
message: "Please use matrix-js-sdk/src/* instead",
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
],
|
|
||||||
},
|
|
||||||
},
|
|
||||||
],
|
|
||||||
};
|
|
||||||
81
.eslintrc.js
81
.eslintrc.js
@@ -1,5 +1,5 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
plugins: ["matrix-org"],
|
plugins: ["matrix-org", "eslint-plugin-react-compiler"],
|
||||||
extends: ["plugin:matrix-org/babel", "plugin:matrix-org/react", "plugin:matrix-org/a11y"],
|
extends: ["plugin:matrix-org/babel", "plugin:matrix-org/react", "plugin:matrix-org/a11y"],
|
||||||
parserOptions: {
|
parserOptions: {
|
||||||
project: ["./tsconfig.json"],
|
project: ["./tsconfig.json"],
|
||||||
@@ -42,6 +42,10 @@ module.exports = {
|
|||||||
name: "setImmediate",
|
name: "setImmediate",
|
||||||
message: "Use setTimeout instead.",
|
message: "Use setTimeout instead.",
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
name: "Buffer",
|
||||||
|
message: "Buffer is not available in the web.",
|
||||||
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
"import/no-duplicates": ["error"],
|
"import/no-duplicates": ["error"],
|
||||||
@@ -117,10 +121,6 @@ module.exports = {
|
|||||||
"!matrix-js-sdk/src/extensible_events_v1/PollResponseEvent",
|
"!matrix-js-sdk/src/extensible_events_v1/PollResponseEvent",
|
||||||
"!matrix-js-sdk/src/extensible_events_v1/PollEndEvent",
|
"!matrix-js-sdk/src/extensible_events_v1/PollEndEvent",
|
||||||
"!matrix-js-sdk/src/extensible_events_v1/InvalidEventError",
|
"!matrix-js-sdk/src/extensible_events_v1/InvalidEventError",
|
||||||
"!matrix-js-sdk/src/crypto",
|
|
||||||
"!matrix-js-sdk/src/crypto/keybackup",
|
|
||||||
"!matrix-js-sdk/src/crypto/deviceinfo",
|
|
||||||
"!matrix-js-sdk/src/crypto/dehydration",
|
|
||||||
"!matrix-js-sdk/src/oidc",
|
"!matrix-js-sdk/src/oidc",
|
||||||
"!matrix-js-sdk/src/oidc/discovery",
|
"!matrix-js-sdk/src/oidc/discovery",
|
||||||
"!matrix-js-sdk/src/oidc/authorize",
|
"!matrix-js-sdk/src/oidc/authorize",
|
||||||
@@ -170,6 +170,8 @@ module.exports = {
|
|||||||
"jsx-a11y/role-supports-aria-props": "off",
|
"jsx-a11y/role-supports-aria-props": "off",
|
||||||
|
|
||||||
"matrix-org/require-copyright-header": "error",
|
"matrix-org/require-copyright-header": "error",
|
||||||
|
|
||||||
|
"react-compiler/react-compiler": "error",
|
||||||
},
|
},
|
||||||
overrides: [
|
overrides: [
|
||||||
{
|
{
|
||||||
@@ -198,8 +200,13 @@ module.exports = {
|
|||||||
"@typescript-eslint/ban-ts-comment": "off",
|
"@typescript-eslint/ban-ts-comment": "off",
|
||||||
// We're okay with assertion errors when we ask for them
|
// We're okay with assertion errors when we ask for them
|
||||||
"@typescript-eslint/no-non-null-assertion": "off",
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
// We do this sometimes to brand interfaces
|
"@typescript-eslint/no-empty-object-type": [
|
||||||
"@typescript-eslint/no-empty-object-type": "off",
|
"error",
|
||||||
|
{
|
||||||
|
// We do this sometimes to brand interfaces
|
||||||
|
allowInterfaces: "with-single-extends",
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
// temporary override for offending icon require files
|
// temporary override for offending icon require files
|
||||||
@@ -245,6 +252,7 @@ module.exports = {
|
|||||||
// We don't need super strict typing in test utilities
|
// We don't need super strict typing in test utilities
|
||||||
"@typescript-eslint/explicit-function-return-type": "off",
|
"@typescript-eslint/explicit-function-return-type": "off",
|
||||||
"@typescript-eslint/explicit-member-accessibility": "off",
|
"@typescript-eslint/explicit-member-accessibility": "off",
|
||||||
|
"@typescript-eslint/no-empty-object-type": "off",
|
||||||
|
|
||||||
// Jest/Playwright specific
|
// Jest/Playwright specific
|
||||||
|
|
||||||
@@ -259,6 +267,10 @@ module.exports = {
|
|||||||
additionalTestBlockFunctions: ["beforeAll", "beforeEach", "oldBackendOnly"],
|
additionalTestBlockFunctions: ["beforeAll", "beforeEach", "oldBackendOnly"],
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|
||||||
|
// These are fine in tests
|
||||||
|
"no-restricted-globals": "off",
|
||||||
|
"react-compiler/react-compiler": "off",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -268,6 +280,61 @@ module.exports = {
|
|||||||
},
|
},
|
||||||
rules: {
|
rules: {
|
||||||
"react-hooks/rules-of-hooks": ["off"],
|
"react-hooks/rules-of-hooks": ["off"],
|
||||||
|
"@typescript-eslint/no-floating-promises": ["error"],
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
files: ["module_system/**/*.{ts,tsx}"],
|
||||||
|
parserOptions: {
|
||||||
|
project: ["./tsconfig.module_system.json"],
|
||||||
|
},
|
||||||
|
extends: ["plugin:matrix-org/typescript", "plugin:matrix-org/react"],
|
||||||
|
// NOTE: These rules are frozen and new rules should not be added here.
|
||||||
|
// New changes belong in https://github.com/matrix-org/eslint-plugin-matrix-org/
|
||||||
|
rules: {
|
||||||
|
// Things we do that break the ideal style
|
||||||
|
"prefer-promise-reject-errors": "off",
|
||||||
|
"quotes": "off",
|
||||||
|
|
||||||
|
// We disable this while we're transitioning
|
||||||
|
"@typescript-eslint/no-explicit-any": "off",
|
||||||
|
// We're okay with assertion errors when we ask for them
|
||||||
|
"@typescript-eslint/no-non-null-assertion": "off",
|
||||||
|
|
||||||
|
// Ban matrix-js-sdk/src imports in favour of matrix-js-sdk/src/matrix imports to prevent unleashing hell.
|
||||||
|
"no-restricted-imports": [
|
||||||
|
"error",
|
||||||
|
{
|
||||||
|
paths: [
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk/",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk/src",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk/src/",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "matrix-js-sdk/src/index",
|
||||||
|
message: "Please use matrix-js-sdk/src/matrix instead",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
patterns: [
|
||||||
|
{
|
||||||
|
group: ["matrix-js-sdk/lib", "matrix-js-sdk/lib/", "matrix-js-sdk/lib/**"],
|
||||||
|
message: "Please use matrix-js-sdk/src/* instead",
|
||||||
|
},
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
],
|
],
|
||||||
|
|||||||
23
.github/CODEOWNERS
vendored
23
.github/CODEOWNERS
vendored
@@ -3,16 +3,23 @@
|
|||||||
/package.json @element-hq/element-web-team
|
/package.json @element-hq/element-web-team
|
||||||
/yarn.lock @element-hq/element-web-team
|
/yarn.lock @element-hq/element-web-team
|
||||||
|
|
||||||
/src/SecurityManager.ts @element-hq/element-crypto-web-reviewers
|
/src/SecurityManager.ts @element-hq/element-crypto-web-reviewers
|
||||||
/test/SecurityManager-test.ts @element-hq/element-crypto-web-reviewers
|
/test/SecurityManager-test.ts @element-hq/element-crypto-web-reviewers
|
||||||
/src/async-components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
|
/src/async-components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
|
||||||
/src/components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
|
/src/components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
|
||||||
/test/components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
|
/test/components/views/dialogs/security/ @element-hq/element-crypto-web-reviewers
|
||||||
/src/stores/SetupEncryptionStore.ts @element-hq/element-crypto-web-reviewers
|
/src/stores/SetupEncryptionStore.ts @element-hq/element-crypto-web-reviewers
|
||||||
/test/stores/SetupEncryptionStore-test.ts @element-hq/element-crypto-web-reviewers
|
/test/stores/SetupEncryptionStore-test.ts @element-hq/element-crypto-web-reviewers
|
||||||
|
/src/components/views/settings/tabs/user/EncryptionUserSettingsTab.tsx @element-hq/element-crypto-web-reviewers
|
||||||
|
/src/components/views/settings/encryption/ @element-hq/element-crypto-web-reviewers
|
||||||
|
/test/unit-tests/components/views/settings/encryption/ @element-hq/element-crypto-web-reviewers
|
||||||
|
/src/components/views/dialogs/devtools/Crypto.tsx @element-hq/element-crypto-web-reviewers
|
||||||
|
/playwright/e2e/crypto/ @element-hq/element-crypto-web-reviewers
|
||||||
|
/playwright/e2e/settings/encryption-user-tab/ @element-hq/element-crypto-web-reviewers
|
||||||
|
|
||||||
# Ignore translations as those will be updated by GHA for Localazy download
|
# Ignore translations as those will be updated by GHA for Localazy download
|
||||||
/src/i18n/strings
|
/src/i18n/strings
|
||||||
|
/src/i18n/strings/en_EN.json @element-hq/element-web-reviewers
|
||||||
# Ignore the synapse plugin as this is updated by GHA for docker image updating
|
# Ignore the synapse plugin as this is updated by GHA for docker image updating
|
||||||
/playwright/plugins/homeserver/synapse/index.ts
|
/playwright/testcontainers/synapse.ts
|
||||||
|
|
||||||
|
|||||||
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
8
.github/PULL_REQUEST_TEMPLATE.md
vendored
@@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
## Checklist
|
## Checklist
|
||||||
|
|
||||||
- [ ] Tests written for new code (and old code if feasible).
|
- [ ] Tests written for new code (and old code if feasible).
|
||||||
- [ ] New or updated `public`/`exported` symbols have accurate [TSDoc](https://tsdoc.org/) documentation.
|
- [ ] New or updated `public`/`exported` symbols have accurate [TSDoc](https://tsdoc.org/) documentation.
|
||||||
- [ ] Linter and other CI checks pass.
|
- [ ] Linter and other CI checks pass.
|
||||||
- [ ] I have licensed the changes to Element by completing the [Contributor License Agreement (CLA)](https://cla-assistant.io/element-hq/element-web)
|
- [ ] I have licensed the changes to Element by completing the [Contributor License Agreement (CLA)](https://cla-assistant.io/element-hq/element-web)
|
||||||
|
|||||||
38
.github/actions/download-verify-element-tarball/action.yml
vendored
Normal file
38
.github/actions/download-verify-element-tarball/action.yml
vendored
Normal file
@@ -0,0 +1,38 @@
|
|||||||
|
name: Upload release assets
|
||||||
|
description: Uploads assets to an existing release and optionally signs them
|
||||||
|
inputs:
|
||||||
|
tag:
|
||||||
|
description: GitHub release tag to fetch assets from.
|
||||||
|
required: true
|
||||||
|
out-file-path:
|
||||||
|
description: Path to where the webapp should be extracted to.
|
||||||
|
required: true
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
steps:
|
||||||
|
- name: Download release tarball
|
||||||
|
uses: robinraju/release-downloader@a96f54c1b5f5e09e47d9504526e96febd949d4c2 # v1
|
||||||
|
with:
|
||||||
|
tag: ${{ inputs.tag }}
|
||||||
|
fileName: element-*.tar.gz*
|
||||||
|
out-file-path: ${{ runner.temp }}/download-verify-element-tarball
|
||||||
|
|
||||||
|
- name: Verify tarball
|
||||||
|
shell: bash
|
||||||
|
run: gpg --verify element-*.tar.gz.asc element-*.tar.gz
|
||||||
|
working-directory: ${{ runner.temp }}/download-verify-element-tarball
|
||||||
|
|
||||||
|
- name: Extract tarball
|
||||||
|
shell: bash
|
||||||
|
run: |
|
||||||
|
mkdir webapp
|
||||||
|
tar xvzf element-*.tar.gz -C webapp --strip-components=1
|
||||||
|
working-directory: ${{ runner.temp }}/download-verify-element-tarball
|
||||||
|
|
||||||
|
- name: Move webapp to out-file-path
|
||||||
|
shell: bash
|
||||||
|
run: mv ${{ runner.temp }}/download-verify-element-tarball/webapp ${{ inputs.out-file-path }}
|
||||||
|
|
||||||
|
- name: Clean up temp directory
|
||||||
|
shell: bash
|
||||||
|
run: rm -R ${{ runner.temp }}/download-verify-element-tarball
|
||||||
15
.github/labels.yml
vendored
15
.github/labels.yml
vendored
@@ -210,6 +210,9 @@
|
|||||||
- name: "X-Upcoming-Release-Blocker"
|
- name: "X-Upcoming-Release-Blocker"
|
||||||
description: "This does not affect the current release cycle but will affect the next one"
|
description: "This does not affect the current release cycle but will affect the next one"
|
||||||
color: "e99695"
|
color: "e99695"
|
||||||
|
- name: "X-Run-All-Tests"
|
||||||
|
description: "When applied to PRs, it'll run the full gamut of end-to-end tests on the PR"
|
||||||
|
color: "ff7979"
|
||||||
- name: "Z-Actions"
|
- name: "Z-Actions"
|
||||||
color: "ededed"
|
color: "ededed"
|
||||||
- name: "Z-Cache-Confusion"
|
- name: "Z-Cache-Confusion"
|
||||||
@@ -232,6 +235,18 @@
|
|||||||
- name: "Z-Flaky-Test"
|
- name: "Z-Flaky-Test"
|
||||||
description: "A test is raising false alarms"
|
description: "A test is raising false alarms"
|
||||||
color: "ededed"
|
color: "ededed"
|
||||||
|
- name: "Z-Flaky-Test-Chrome"
|
||||||
|
description: "Flaky playwright test in Chrome"
|
||||||
|
color: "ededed"
|
||||||
|
- name: "Z-Flaky-Test-Firefox"
|
||||||
|
description: "Flaky playwright test in Firefox"
|
||||||
|
color: "ededed"
|
||||||
|
- name: "Z-Flaky-Test-Webkit"
|
||||||
|
description: "Flaky playwright test in Webkit"
|
||||||
|
color: "ededed"
|
||||||
|
- name: "Z-Flaky-Jest-Test"
|
||||||
|
description: "A Jest test is raising false alarms"
|
||||||
|
color: "ededed"
|
||||||
- name: "Z-FOSDEM"
|
- name: "Z-FOSDEM"
|
||||||
description: "Issues in chat.fosdem.org"
|
description: "Issues in chat.fosdem.org"
|
||||||
color: "ededed"
|
color: "ededed"
|
||||||
|
|||||||
2
.github/workflows/backport.yml
vendored
2
.github/workflows/backport.yml
vendored
@@ -7,6 +7,8 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
backport:
|
backport:
|
||||||
name: Backport
|
name: Backport
|
||||||
|
|||||||
43
.github/workflows/build.yml
vendored
43
.github/workflows/build.yml
vendored
@@ -5,11 +5,15 @@ on:
|
|||||||
branches: [develop, master]
|
branches: [develop, master]
|
||||||
merge_group:
|
merge_group:
|
||||||
types: [checks_requested]
|
types: [checks_requested]
|
||||||
|
concurrency:
|
||||||
|
group: ${{ github.workflow }}-${{ github.head_ref || github.sha }}
|
||||||
|
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
|
||||||
# develop pushes and repository_dispatch handled in build_develop.yaml
|
# develop pushes and repository_dispatch handled in build_develop.yaml
|
||||||
env:
|
env:
|
||||||
# These must be set for fetchdep.sh to get the right branch
|
# These must be set for fetchdep.sh to get the right branch
|
||||||
REPOSITORY: ${{ github.repository }}
|
REPOSITORY: ${{ github.repository }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
permissions: {} # No permissions required
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: "Build on ${{ matrix.image }}"
|
name: "Build on ${{ matrix.image }}"
|
||||||
@@ -23,10 +27,17 @@ jobs:
|
|||||||
- macos-14
|
- macos-14
|
||||||
isDevelop:
|
isDevelop:
|
||||||
- ${{ github.event_name == 'push' && github.ref_name == 'develop' }}
|
- ${{ github.event_name == 'push' && github.ref_name == 'develop' }}
|
||||||
|
isPullRequest:
|
||||||
|
- ${{ github.event_name == 'pull_request' }}
|
||||||
# Skip the ubuntu-24.04 build for the develop branch as the dedicated CD build_develop workflow handles that
|
# Skip the ubuntu-24.04 build for the develop branch as the dedicated CD build_develop workflow handles that
|
||||||
|
# Skip the non-linux builds for pull requests as Windows is awfully slow, so run in merge queue only
|
||||||
exclude:
|
exclude:
|
||||||
- isDevelop: true
|
- isDevelop: true
|
||||||
image: ubuntu-24.04
|
image: ubuntu-24.04
|
||||||
|
- isPullRequest: true
|
||||||
|
image: windows-2022
|
||||||
|
- isPullRequest: true
|
||||||
|
image: macos-14
|
||||||
runs-on: ${{ matrix.image }}
|
runs-on: ${{ matrix.image }}
|
||||||
defaults:
|
defaults:
|
||||||
run:
|
run:
|
||||||
@@ -36,14 +47,38 @@ jobs:
|
|||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
with:
|
with:
|
||||||
cache: "yarn"
|
# Disable cache on Windows as it is slower than not caching
|
||||||
|
# https://github.com/actions/setup-node/issues/975
|
||||||
|
cache: ${{ runner.os != 'Windows' && 'yarn' || '' }}
|
||||||
node-version: "lts/*"
|
node-version: "lts/*"
|
||||||
|
|
||||||
# Workaround for yarn install timeouts, especially on Windows
|
# Workaround for yarn install timeouts, especially on Windows
|
||||||
- run: yarn config set network-timeout 300000
|
- run: yarn config set network-timeout 300000
|
||||||
|
|
||||||
- name: Install Dependencies
|
- name: Fetch layered build
|
||||||
run: "./scripts/layered.sh"
|
id: layered_build
|
||||||
|
env:
|
||||||
|
# tell layered.sh to check out the right sha of the JS-SDK & EW, if they were given one
|
||||||
|
JS_SDK_GITHUB_BASE_REF: ${{ inputs.matrix-js-sdk-sha }}
|
||||||
|
run: |
|
||||||
|
scripts/layered.sh
|
||||||
|
JSSDK_SHA=$(git -C matrix-js-sdk rev-parse --short=12 HEAD)
|
||||||
|
VECTOR_SHA=$(git rev-parse --short=12 HEAD)
|
||||||
|
echo "VERSION=$VECTOR_SHA--js-$JSSDK_SHA" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
- name: Copy config
|
||||||
|
run: cp element.io/develop/config.json config.json
|
||||||
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: "yarn build"
|
env:
|
||||||
|
CI_PACKAGE: true
|
||||||
|
VERSION: "${{ steps.layered_build.outputs.VERSION }}"
|
||||||
|
run: |
|
||||||
|
yarn build
|
||||||
|
|
||||||
|
- name: Upload Artifact
|
||||||
|
uses: actions/upload-artifact@v4
|
||||||
|
with:
|
||||||
|
name: webapp-${{ matrix.image }}
|
||||||
|
path: webapp
|
||||||
|
retention-days: 1
|
||||||
|
|||||||
1
.github/workflows/build_debian.yaml
vendored
1
.github/workflows/build_debian.yaml
vendored
@@ -3,6 +3,7 @@ on:
|
|||||||
release:
|
release:
|
||||||
types: [published]
|
types: [published]
|
||||||
concurrency: ${{ github.workflow }}
|
concurrency: ${{ github.workflow }}
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: Build package
|
name: Build package
|
||||||
|
|||||||
11
.github/workflows/build_develop.yml
vendored
11
.github/workflows/build_develop.yml
vendored
@@ -9,6 +9,7 @@ on:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.repository_owner }}-${{ github.workflow }}-${{ github.ref_name }}
|
group: ${{ github.repository_owner }}-${{ github.workflow }}-${{ github.ref_name }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: "Build & Deploy develop.element.io"
|
name: "Build & Deploy develop.element.io"
|
||||||
@@ -16,11 +17,21 @@ jobs:
|
|||||||
if: github.repository == 'element-hq/element-web'
|
if: github.repository == 'element-hq/element-web'
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
environment: develop
|
environment: develop
|
||||||
|
permissions:
|
||||||
|
checks: read
|
||||||
|
pages: write
|
||||||
|
deployments: write
|
||||||
env:
|
env:
|
||||||
R2_BUCKET: "element-web-develop"
|
R2_BUCKET: "element-web-develop"
|
||||||
R2_URL: ${{ vars.CF_R2_S3_API }}
|
R2_URL: ${{ vars.CF_R2_S3_API }}
|
||||||
R2_PUBLIC_URL: "https://element-web-develop.element.io"
|
R2_PUBLIC_URL: "https://element-web-develop.element.io"
|
||||||
steps:
|
steps:
|
||||||
|
# Workaround for https://www.cloudflarestatus.com/incidents/t5nrjmpxc1cj
|
||||||
|
- uses: unfor19/install-aws-cli-action@v1
|
||||||
|
with:
|
||||||
|
version: 2.22.35
|
||||||
|
verbose: false
|
||||||
|
arch: amd64
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- uses: actions/setup-node@v4
|
- uses: actions/setup-node@v4
|
||||||
|
|||||||
99
.github/workflows/deploy.yml
vendored
Normal file
99
.github/workflows/deploy.yml
vendored
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
# Manual deploy workflow for deploying to app.element.io & staging.element.io
|
||||||
|
# Runs automatically for staging.element.io when an RC or Release is published
|
||||||
|
# Note: Does *NOT* run automatically for app.element.io so that it gets tested on staging.element.io beforehand
|
||||||
|
name: Deploy release
|
||||||
|
run-name: Deploy ${{ github.ref_name }} to ${{ inputs.site || 'staging.element.io' }}
|
||||||
|
on:
|
||||||
|
release:
|
||||||
|
types: [published]
|
||||||
|
workflow_dispatch:
|
||||||
|
inputs:
|
||||||
|
site:
|
||||||
|
description: Which site to deploy to
|
||||||
|
required: true
|
||||||
|
default: staging.element.io
|
||||||
|
type: choice
|
||||||
|
options:
|
||||||
|
- staging.element.io
|
||||||
|
- app.element.io
|
||||||
|
skip-checks:
|
||||||
|
description: Skip CI on the tagged commit
|
||||||
|
required: true
|
||||||
|
default: false
|
||||||
|
type: boolean
|
||||||
|
concurrency: ${{ inputs.site || 'staging.element.io' }}
|
||||||
|
permissions: {}
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
name: "Deploy to Cloudflare Pages"
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
environment: ${{ inputs.site || 'staging.element.io' }}
|
||||||
|
permissions:
|
||||||
|
checks: read
|
||||||
|
deployments: write
|
||||||
|
env:
|
||||||
|
SITE: ${{ inputs.site || 'staging.element.io' }}
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
|
- name: Load GPG key
|
||||||
|
run: |
|
||||||
|
curl https://packages.element.io/element-release-key.gpg | gpg --import
|
||||||
|
gpg -k "$GPG_FINGERPRINT"
|
||||||
|
env:
|
||||||
|
GPG_FINGERPRINT: ${{ vars.GPG_FINGERPRINT }}
|
||||||
|
|
||||||
|
- name: Check current version on deployment
|
||||||
|
id: current_version
|
||||||
|
run: |
|
||||||
|
version=$(curl -s https://$SITE/version)
|
||||||
|
echo "version=${version#v}" >> $GITHUB_OUTPUT
|
||||||
|
|
||||||
|
# The current version bundle melding dance is skipped if the version we're deploying is the same
|
||||||
|
# as then we're just doing a re-deploy of the same version with potentially different configs.
|
||||||
|
- name: Download current version for its old bundles
|
||||||
|
id: current_download
|
||||||
|
if: steps.current_version.outputs.version != github.ref_name
|
||||||
|
uses: ./.github/actions/download-verify-element-tarball
|
||||||
|
with:
|
||||||
|
tag: v${{ steps.current_version.outputs.version }}
|
||||||
|
out-file-path: _current_version
|
||||||
|
|
||||||
|
- name: Download target version
|
||||||
|
uses: ./.github/actions/download-verify-element-tarball
|
||||||
|
with:
|
||||||
|
tag: ${{ github.ref_name }}
|
||||||
|
out-file-path: _deploy
|
||||||
|
|
||||||
|
- name: Merge current bundles into target
|
||||||
|
if: steps.current_download.outcome == 'success'
|
||||||
|
run: cp -vnpr _current_version/bundles/* _deploy/bundles/
|
||||||
|
|
||||||
|
- name: Copy config
|
||||||
|
run: cp element.io/app/config.json _deploy/config.json
|
||||||
|
|
||||||
|
- name: Populate 404.html
|
||||||
|
run: echo "404 Not Found" > _deploy/404.html
|
||||||
|
|
||||||
|
- name: Populate _headers
|
||||||
|
run: cp .github/cfp_headers _deploy/_headers
|
||||||
|
|
||||||
|
- name: Wait for other steps to succeed
|
||||||
|
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
|
||||||
|
if: inputs.skip-checks != true
|
||||||
|
with:
|
||||||
|
ref: ${{ github.sha }}
|
||||||
|
running-workflow-name: "Deploy to Cloudflare Pages"
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
wait-interval: 10
|
||||||
|
check-regexp: ^((?!SonarCloud|SonarQube|issue|board|label|Release|prepare|GitHub Pages).)*$
|
||||||
|
|
||||||
|
- name: Deploy to Cloudflare Pages
|
||||||
|
uses: cloudflare/pages-action@f0a1cd58cd66095dee69bfa18fa5efd1dde93bca # v1
|
||||||
|
with:
|
||||||
|
apiToken: ${{ secrets.CF_PAGES_TOKEN }}
|
||||||
|
accountId: ${{ secrets.CF_PAGES_ACCOUNT_ID }}
|
||||||
|
projectName: ${{ env.SITE == 'staging.element.io' && 'element-web-staging' || 'element-web' }}
|
||||||
|
directory: _deploy
|
||||||
|
gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
branch: main
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Dockerhub
|
name: Docker
|
||||||
on:
|
on:
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
push:
|
push:
|
||||||
@@ -7,27 +7,28 @@ on:
|
|||||||
# This job can take a while, and we have usage limits, so just publish develop only twice a day
|
# This job can take a while, and we have usage limits, so just publish develop only twice a day
|
||||||
- cron: "0 7/12 * * *"
|
- cron: "0 7/12 * * *"
|
||||||
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
|
concurrency: ${{ github.workflow }}-${{ github.ref_name }}
|
||||||
|
permissions: {}
|
||||||
permissions:
|
|
||||||
id-token: write # needed for signing the images with GitHub OIDC Token
|
|
||||||
jobs:
|
jobs:
|
||||||
buildx:
|
buildx:
|
||||||
name: Docker Buildx
|
name: Docker Buildx
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
environment: dockerhub
|
environment: dockerhub
|
||||||
|
permissions:
|
||||||
|
id-token: write # needed for signing the images with GitHub OIDC Token
|
||||||
|
packages: write # needed for publishing packages to GHCR
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
fetch-depth: 0 # needed for docker-package to be able to calculate the version
|
fetch-depth: 0 # needed for docker-package to be able to calculate the version
|
||||||
|
|
||||||
- name: Install Cosign
|
- name: Install Cosign
|
||||||
uses: sigstore/cosign-installer@4959ce089c160fddf62f7b42464195ba1a56d382 # v3
|
uses: sigstore/cosign-installer@c56c2d3e59e4281cc41dea2217323ba5694b171e # v3
|
||||||
|
|
||||||
- name: Set up QEMU
|
- name: Set up QEMU
|
||||||
uses: docker/setup-qemu-action@49b3bc8e6bdd4a60e6116a5414239cba5943d3cf # v3
|
uses: docker/setup-qemu-action@4574d27a4764455b42196d70a065bc6853246a25 # v3
|
||||||
|
|
||||||
- name: Set up Docker Buildx
|
- name: Set up Docker Buildx
|
||||||
uses: docker/setup-buildx-action@988b5a0280414f521da01fcc63a27aeeb4b104db # v3
|
uses: docker/setup-buildx-action@f7ce87c1d6bead3e36075b2ce75da1f6cc28aaca # v3
|
||||||
with:
|
with:
|
||||||
install: true
|
install: true
|
||||||
|
|
||||||
@@ -37,12 +38,20 @@ jobs:
|
|||||||
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
username: ${{ secrets.DOCKERHUB_USERNAME }}
|
||||||
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
password: ${{ secrets.DOCKERHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Login to GitHub Container Registry
|
||||||
|
uses: docker/login-action@9780b0c442fbb1117ed29e0efdff1e18412f7567 # v3
|
||||||
|
with:
|
||||||
|
registry: ghcr.io
|
||||||
|
username: ${{ github.repository_owner }}
|
||||||
|
password: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Docker meta
|
- name: Docker meta
|
||||||
id: meta
|
id: meta
|
||||||
uses: docker/metadata-action@8e5442c4ef9f78752691e2d8f8d19755c6f78e81 # v5
|
uses: docker/metadata-action@369eb591f429131d6889c46b94e711f089e6ca96 # v5
|
||||||
with:
|
with:
|
||||||
images: |
|
images: |
|
||||||
vectorim/element-web
|
vectorim/element-web
|
||||||
|
ghcr.io/element-hq/element-web
|
||||||
tags: |
|
tags: |
|
||||||
type=ref,event=branch
|
type=ref,event=branch
|
||||||
type=ref,event=tag
|
type=ref,event=tag
|
||||||
@@ -51,7 +60,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Build and push
|
- name: Build and push
|
||||||
id: build-and-push
|
id: build-and-push
|
||||||
uses: docker/build-push-action@4f58ea79222b3b9dc2c8bbdd6debcef730109a75 # v6
|
uses: docker/build-push-action@ca877d9245402d1537745e0e356eab47c3520991 # v6
|
||||||
with:
|
with:
|
||||||
context: .
|
context: .
|
||||||
push: true
|
push: true
|
||||||
8
.github/workflows/docs.yml
vendored
8
.github/workflows/docs.yml
vendored
@@ -5,10 +5,7 @@ on:
|
|||||||
branches: [develop]
|
branches: [develop]
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
|
|
||||||
permissions:
|
permissions: {}
|
||||||
contents: read
|
|
||||||
pages: write
|
|
||||||
id-token: write
|
|
||||||
|
|
||||||
concurrency:
|
concurrency:
|
||||||
group: "pages"
|
group: "pages"
|
||||||
@@ -100,6 +97,9 @@ jobs:
|
|||||||
name: github-pages
|
name: github-pages
|
||||||
url: ${{ steps.deployment.outputs.page_url }}
|
url: ${{ steps.deployment.outputs.page_url }}
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
permissions:
|
||||||
|
pages: write
|
||||||
|
id-token: write
|
||||||
needs: build
|
needs: build
|
||||||
steps:
|
steps:
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
|
|||||||
@@ -11,20 +11,23 @@ concurrency:
|
|||||||
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }}
|
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch || github.run_id }}
|
||||||
cancel-in-progress: ${{ github.event.workflow_run.event == 'pull_request' }}
|
cancel-in-progress: ${{ github.event.workflow_run.event == 'pull_request' }}
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
report:
|
report:
|
||||||
if: github.event.workflow_run.conclusion != 'cancelled'
|
if: github.event.workflow_run.conclusion != 'cancelled'
|
||||||
name: Report results
|
name: Report results
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
environment: Netlify
|
environment: Netlify
|
||||||
permissions:
|
permissions:
|
||||||
statuses: write
|
statuses: write
|
||||||
deployments: write
|
deployments: write
|
||||||
|
actions: read
|
||||||
steps:
|
steps:
|
||||||
- name: Download HTML report
|
- name: Download HTML report
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run-id: ${{ github.event.workflow_run.id }}
|
run-id: ${{ github.event.workflow_run.id }}
|
||||||
name: html-report
|
name: html-report
|
||||||
path: playwright-report
|
path: playwright-report
|
||||||
|
|||||||
64
.github/workflows/end-to-end-tests.yaml
vendored
64
.github/workflows/end-to-end-tests.yaml
vendored
@@ -3,6 +3,9 @@
|
|||||||
# as an artifact and run end-to-end tests.
|
# as an artifact and run end-to-end tests.
|
||||||
name: End to End Tests
|
name: End to End Tests
|
||||||
on:
|
on:
|
||||||
|
# CRON to run all Projects at 6am UTC
|
||||||
|
schedule:
|
||||||
|
- cron: "0 6 * * *"
|
||||||
pull_request: {}
|
pull_request: {}
|
||||||
merge_group:
|
merge_group:
|
||||||
types: [checks_requested]
|
types: [checks_requested]
|
||||||
@@ -32,12 +35,19 @@ concurrency:
|
|||||||
env:
|
env:
|
||||||
# fetchdep.sh needs to know our PR number
|
# fetchdep.sh needs to know our PR number
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
# Use 6 runners in the default case, but 4 when running on a schedule where we run all 5 projects (20 runners total)
|
||||||
|
NUM_RUNNERS: ${{ github.event_name == 'schedule' && 4 || 6 }}
|
||||||
|
|
||||||
|
permissions: {} # No permissions required
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
build:
|
||||||
name: "Build Element-Web"
|
name: "Build Element-Web"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
if: inputs.skip != true
|
if: inputs.skip != true
|
||||||
|
outputs:
|
||||||
|
num-runners: ${{ env.NUM_RUNNERS }}
|
||||||
|
runners-matrix: ${{ steps.runner-vars.outputs.matrix }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout code
|
- name: Checkout code
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
@@ -69,7 +79,6 @@ jobs:
|
|||||||
VERSION: "${{ steps.layered_build.outputs.VERSION }}"
|
VERSION: "${{ steps.layered_build.outputs.VERSION }}"
|
||||||
run: |
|
run: |
|
||||||
yarn build
|
yarn build
|
||||||
echo $VERSION > webapp/version
|
|
||||||
|
|
||||||
- name: Upload Artifact
|
- name: Upload Artifact
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
@@ -78,11 +87,20 @@ jobs:
|
|||||||
path: webapp
|
path: webapp
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
|
- name: Calculate runner variables
|
||||||
|
id: runner-vars
|
||||||
|
uses: actions/github-script@v7
|
||||||
|
with:
|
||||||
|
script: |
|
||||||
|
const numRunners = parseInt(process.env.NUM_RUNNERS, 10);
|
||||||
|
const matrix = Array.from({ length: numRunners }, (_, i) => i + 1);
|
||||||
|
core.setOutput("matrix", JSON.stringify(matrix));
|
||||||
|
|
||||||
playwright:
|
playwright:
|
||||||
name: "Run Tests ${{ matrix.runner }}/${{ strategy.job-total }}"
|
name: "Run Tests [${{ matrix.project }}] ${{ matrix.runner }}/${{ needs.build.outputs.num-runners }}"
|
||||||
needs: build
|
needs: build
|
||||||
if: inputs.skip != true
|
if: inputs.skip != true
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
permissions:
|
permissions:
|
||||||
actions: read
|
actions: read
|
||||||
issues: read
|
issues: read
|
||||||
@@ -91,7 +109,25 @@ jobs:
|
|||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
# Run multiple instances in parallel to speed up the tests
|
# Run multiple instances in parallel to speed up the tests
|
||||||
runner: [1, 2, 3, 4, 5, 6]
|
runner: ${{ fromJSON(needs.build.outputs.runners-matrix) }}
|
||||||
|
project:
|
||||||
|
- Chrome
|
||||||
|
- Firefox
|
||||||
|
- WebKit
|
||||||
|
- Dendrite
|
||||||
|
- Pinecone
|
||||||
|
runAllTests:
|
||||||
|
- ${{ github.event_name == 'schedule' || contains(github.event.pull_request.labels.*.name, 'X-Run-All-Tests') }}
|
||||||
|
# Skip the Firefox & Safari runs unless this was a cron trigger or PR has X-Run-All-Tests label
|
||||||
|
exclude:
|
||||||
|
- runAllTests: false
|
||||||
|
project: Firefox
|
||||||
|
- runAllTests: false
|
||||||
|
project: WebKit
|
||||||
|
- runAllTests: false
|
||||||
|
project: Dendrite
|
||||||
|
- runAllTests: false
|
||||||
|
project: Pinecone
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
with:
|
with:
|
||||||
@@ -127,16 +163,26 @@ jobs:
|
|||||||
|
|
||||||
- name: Install Playwright browsers
|
- name: Install Playwright browsers
|
||||||
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
if: steps.playwright-cache.outputs.cache-hit != 'true'
|
||||||
run: yarn playwright install --with-deps
|
run: yarn playwright install --with-deps --no-shell
|
||||||
|
|
||||||
|
- name: Install system dependencies for WebKit
|
||||||
|
# Some WebKit dependencies seem to lay outside the cache and will need to be installed separately
|
||||||
|
if: matrix.project == 'WebKit' && steps.playwright-cache.outputs.cache-hit == 'true'
|
||||||
|
run: yarn playwright install-deps webkit
|
||||||
|
|
||||||
|
# We skip tests tagged with @mergequeue when running on PRs, but run them in MQ and everywhere else
|
||||||
- name: Run Playwright tests
|
- name: Run Playwright tests
|
||||||
run: yarn playwright test --shard ${{ matrix.runner }}/${{ strategy.job-total }}
|
run: |
|
||||||
|
yarn playwright test \
|
||||||
|
--shard "${{ matrix.runner }}/${{ needs.build.outputs.num-runners }}" \
|
||||||
|
--project="${{ matrix.project }}" \
|
||||||
|
${{ (github.event_name == 'pull_request' && matrix.runAllTests == false ) && '--grep-invert @mergequeue' || '' }}
|
||||||
|
|
||||||
- name: Upload blob report to GitHub Actions Artifacts
|
- name: Upload blob report to GitHub Actions Artifacts
|
||||||
if: always()
|
if: always()
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: all-blob-reports-${{ matrix.runner }}
|
name: all-blob-reports-${{ matrix.project }}-${{ matrix.runner }}
|
||||||
path: blob-report
|
path: blob-report
|
||||||
retention-days: 1
|
retention-days: 1
|
||||||
|
|
||||||
@@ -144,7 +190,7 @@ jobs:
|
|||||||
name: end-to-end-tests
|
name: end-to-end-tests
|
||||||
needs: playwright
|
needs: playwright
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
if: inputs.skip != true
|
if: inputs.skip != true
|
||||||
|
|||||||
1
.github/workflows/issue_closed.yml
vendored
1
.github/workflows/issue_closed.yml
vendored
@@ -4,6 +4,7 @@
|
|||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [closed]
|
types: [closed]
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
jobs:
|
jobs:
|
||||||
tidy:
|
tidy:
|
||||||
name: Tidy closed issues
|
name: Tidy closed issues
|
||||||
|
|||||||
2
.github/workflows/localazy_download.yaml
vendored
2
.github/workflows/localazy_download.yaml
vendored
@@ -3,6 +3,8 @@ on:
|
|||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 6 * * 1,3,5" # Every Monday, Wednesday and Friday at 6am UTC
|
- cron: "0 6 * * 1,3,5" # Every Monday, Wednesday and Friday at 6am UTC
|
||||||
|
permissions:
|
||||||
|
pull-requests: write # needed to auto-approve PRs
|
||||||
jobs:
|
jobs:
|
||||||
download:
|
download:
|
||||||
uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_download.yaml@main
|
uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_download.yaml@main
|
||||||
|
|||||||
1
.github/workflows/localazy_upload.yaml
vendored
1
.github/workflows/localazy_upload.yaml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
branches: [develop]
|
branches: [develop]
|
||||||
paths:
|
paths:
|
||||||
- "src/i18n/strings/en_EN.json"
|
- "src/i18n/strings/en_EN.json"
|
||||||
|
permissions: {} # No permissions needed
|
||||||
jobs:
|
jobs:
|
||||||
upload:
|
upload:
|
||||||
uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_upload.yaml@main
|
uses: matrix-org/matrix-web-i18n/.github/workflows/localazy_upload.yaml@main
|
||||||
|
|||||||
11
.github/workflows/netlify.yaml
vendored
11
.github/workflows/netlify.yaml
vendored
@@ -3,14 +3,17 @@
|
|||||||
name: Upload Preview Build to Netlify
|
name: Upload Preview Build to Netlify
|
||||||
on:
|
on:
|
||||||
workflow_run:
|
workflow_run:
|
||||||
workflows: ["End to End Tests"]
|
workflows: ["Build"]
|
||||||
types:
|
types:
|
||||||
- completed
|
- completed
|
||||||
jobs:
|
jobs:
|
||||||
deploy:
|
deploy:
|
||||||
if: github.event.workflow_run.conclusion != 'cancelled' && github.event.workflow_run.event == 'pull_request'
|
if: github.event.workflow_run.conclusion != 'cancelled' && github.event.workflow_run.event == 'pull_request'
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
environment: Netlify
|
environment: Netlify
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
deployments: write
|
||||||
steps:
|
steps:
|
||||||
- name: 📝 Create Deployment
|
- name: 📝 Create Deployment
|
||||||
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1
|
uses: bobheadxi/deployments@648679e8e4915b27893bd7dbc35cb504dc915bc8 # v1
|
||||||
@@ -27,9 +30,9 @@ jobs:
|
|||||||
- name: 📥 Download artifact
|
- name: 📥 Download artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
github-token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
run-id: ${{ github.event.workflow_run.id }}
|
run-id: ${{ github.event.workflow_run.id }}
|
||||||
name: webapp
|
name: webapp-ubuntu-24.04
|
||||||
path: webapp
|
path: webapp
|
||||||
|
|
||||||
- name: 📤 Deploy to Netlify
|
- name: 📤 Deploy to Netlify
|
||||||
|
|||||||
1
.github/workflows/pending-reviews.yaml
vendored
1
.github/workflows/pending-reviews.yaml
vendored
@@ -6,6 +6,7 @@ on:
|
|||||||
#schedule:
|
#schedule:
|
||||||
# - cron: "*/10 * * * *"
|
# - cron: "*/10 * * * *"
|
||||||
concurrency: ${{ github.workflow }}
|
concurrency: ${{ github.workflow }}
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
jobs:
|
jobs:
|
||||||
bot:
|
bot:
|
||||||
name: Pending reviews bot
|
name: Pending reviews bot
|
||||||
|
|||||||
@@ -3,9 +3,12 @@ on:
|
|||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 6 * * *" # Every day at 6am UTC
|
- cron: "0 6 * * *" # Every day at 6am UTC
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
update:
|
update:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -14,13 +17,13 @@ jobs:
|
|||||||
docker pull "$IMAGE"
|
docker pull "$IMAGE"
|
||||||
INSPECT=$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE")
|
INSPECT=$(docker inspect --format='{{index .RepoDigests 0}}' "$IMAGE")
|
||||||
DIGEST=${INSPECT#*@}
|
DIGEST=${INSPECT#*@}
|
||||||
sed -i "s/const DOCKER_TAG.*/const DOCKER_TAG = \"develop@$DIGEST\";/" playwright/plugins/homeserver/synapse/index.ts
|
sed -i "s/const TAG.*/const TAG = \"develop@$DIGEST\";/" playwright/testcontainers/synapse.ts
|
||||||
env:
|
env:
|
||||||
IMAGE: ghcr.io/element-hq/synapse:develop
|
IMAGE: ghcr.io/element-hq/synapse:develop
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
id: cpr
|
id: cpr
|
||||||
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7
|
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
branch: actions/playwright-image-updates
|
branch: actions/playwright-image-updates
|
||||||
|
|||||||
3
.github/workflows/pull_request.yaml
vendored
3
.github/workflows/pull_request.yaml
vendored
@@ -4,8 +4,11 @@ on:
|
|||||||
types: [opened, edited, labeled, unlabeled, synchronize]
|
types: [opened, edited, labeled, unlabeled, synchronize]
|
||||||
merge_group:
|
merge_group:
|
||||||
types: [checks_requested]
|
types: [checks_requested]
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
action:
|
action:
|
||||||
uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop
|
uses: matrix-org/matrix-js-sdk/.github/workflows/pull_request.yaml@develop
|
||||||
|
permissions:
|
||||||
|
pull-requests: write
|
||||||
secrets:
|
secrets:
|
||||||
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
|
|||||||
@@ -2,10 +2,11 @@ name: Pull Request Base Branch
|
|||||||
on:
|
on:
|
||||||
pull_request:
|
pull_request:
|
||||||
types: [opened, edited, synchronize]
|
types: [opened, edited, synchronize]
|
||||||
|
permissions: {} # No permissions required
|
||||||
jobs:
|
jobs:
|
||||||
check_base_branch:
|
check_base_branch:
|
||||||
name: Check PR base branch
|
name: Check PR base branch
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/github-script@v7
|
- uses: actions/github-script@v7
|
||||||
with:
|
with:
|
||||||
|
|||||||
3
.github/workflows/release-drafter.yml
vendored
3
.github/workflows/release-drafter.yml
vendored
@@ -4,6 +4,9 @@ on:
|
|||||||
branches: [staging]
|
branches: [staging]
|
||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
concurrency: ${{ github.workflow }}
|
concurrency: ${{ github.workflow }}
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
draft:
|
draft:
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
uses: matrix-org/matrix-js-sdk/.github/workflows/release-drafter-workflow.yml@develop
|
uses: matrix-org/matrix-js-sdk/.github/workflows/release-drafter-workflow.yml@develop
|
||||||
|
|||||||
1
.github/workflows/release-gitflow.yml
vendored
1
.github/workflows/release-gitflow.yml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
push:
|
push:
|
||||||
branches: [master]
|
branches: [master]
|
||||||
concurrency: ${{ github.repository }}-${{ github.workflow }}
|
concurrency: ${{ github.repository }}-${{ github.workflow }}
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
jobs:
|
jobs:
|
||||||
merge:
|
merge:
|
||||||
uses: matrix-org/matrix-js-sdk/.github/workflows/release-gitflow.yml@develop
|
uses: matrix-org/matrix-js-sdk/.github/workflows/release-gitflow.yml@develop
|
||||||
|
|||||||
11
.github/workflows/release.yml
vendored
11
.github/workflows/release.yml
vendored
@@ -11,9 +11,14 @@ on:
|
|||||||
- rc
|
- rc
|
||||||
- final
|
- final
|
||||||
concurrency: ${{ github.workflow }}
|
concurrency: ${{ github.workflow }}
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
release:
|
release:
|
||||||
uses: matrix-org/matrix-js-sdk/.github/workflows/release-make.yml@develop
|
uses: matrix-org/matrix-js-sdk/.github/workflows/release-make.yml@develop
|
||||||
|
permissions:
|
||||||
|
contents: write
|
||||||
|
issues: write
|
||||||
|
pull-requests: read
|
||||||
secrets:
|
secrets:
|
||||||
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
|
||||||
@@ -42,14 +47,16 @@ jobs:
|
|||||||
name: Post release checks
|
name: Post release checks
|
||||||
needs: release
|
needs: release
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
permissions:
|
||||||
|
checks: read
|
||||||
steps:
|
steps:
|
||||||
- name: Wait for dockerhub
|
- name: Wait for docker build
|
||||||
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
|
uses: t3chguy/wait-on-check-action@18541021811b56544d90e0f073401c2b99e249d6 # fork
|
||||||
with:
|
with:
|
||||||
ref: master
|
ref: master
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
wait-interval: 10
|
wait-interval: 10
|
||||||
check-name: "Docker Buildx (vanilla)"
|
check-name: "Docker Buildx"
|
||||||
allowed-conclusions: success
|
allowed-conclusions: success
|
||||||
|
|
||||||
- name: Wait for debian package
|
- name: Wait for debian package
|
||||||
|
|||||||
16
.github/workflows/release_prepare.yml
vendored
16
.github/workflows/release_prepare.yml
vendored
@@ -17,9 +17,25 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: boolean
|
type: boolean
|
||||||
default: true
|
default: true
|
||||||
|
permissions: {} # Uses ELEMENT_BOT_TOKEN instead
|
||||||
jobs:
|
jobs:
|
||||||
|
checks:
|
||||||
|
name: Sanity checks
|
||||||
|
strategy:
|
||||||
|
matrix:
|
||||||
|
repo:
|
||||||
|
- matrix-org/matrix-js-sdk
|
||||||
|
- element-hq/element-web
|
||||||
|
- element-hq/element-desktop
|
||||||
|
uses: matrix-org/matrix-js-sdk/.github/workflows/release-checks.yml@develop
|
||||||
|
secrets:
|
||||||
|
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
|
with:
|
||||||
|
repository: ${{ matrix.repo }}
|
||||||
|
|
||||||
prepare:
|
prepare:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
needs: checks
|
||||||
env:
|
env:
|
||||||
# The order is specified bottom-up to avoid any races for allchange
|
# The order is specified bottom-up to avoid any races for allchange
|
||||||
REPOS: matrix-js-sdk element-web element-desktop
|
REPOS: matrix-js-sdk element-web element-desktop
|
||||||
|
|||||||
5
.github/workflows/sonarqube.yml
vendored
5
.github/workflows/sonarqube.yml
vendored
@@ -7,11 +7,16 @@ on:
|
|||||||
concurrency:
|
concurrency:
|
||||||
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
|
group: ${{ github.workflow }}-${{ github.event.workflow_run.head_branch }}
|
||||||
cancel-in-progress: true
|
cancel-in-progress: true
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
sonarqube:
|
sonarqube:
|
||||||
name: 🩻 SonarQube
|
name: 🩻 SonarQube
|
||||||
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'merge_group'
|
if: github.event.workflow_run.conclusion == 'success' && github.event.workflow_run.event != 'merge_group'
|
||||||
uses: matrix-org/matrix-js-sdk/.github/workflows/sonarcloud.yml@develop
|
uses: matrix-org/matrix-js-sdk/.github/workflows/sonarcloud.yml@develop
|
||||||
|
permissions:
|
||||||
|
actions: read
|
||||||
|
statuses: write
|
||||||
|
id-token: write # sonar
|
||||||
secrets:
|
secrets:
|
||||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||||
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
ELEMENT_BOT_TOKEN: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
|
|||||||
33
.github/workflows/static_analysis.yaml
vendored
33
.github/workflows/static_analysis.yaml
vendored
@@ -16,6 +16,8 @@ env:
|
|||||||
REPOSITORY: ${{ github.repository }}
|
REPOSITORY: ${{ github.repository }}
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
|
||||||
|
permissions: {} # No permissions required
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
ts_lint:
|
ts_lint:
|
||||||
name: "Typescript Syntax Check"
|
name: "Typescript Syntax Check"
|
||||||
@@ -34,30 +36,11 @@ jobs:
|
|||||||
- name: Typecheck
|
- name: Typecheck
|
||||||
run: "yarn run lint:types"
|
run: "yarn run lint:types"
|
||||||
|
|
||||||
- name: Switch js-sdk to release mode
|
|
||||||
working-directory: node_modules/matrix-js-sdk
|
|
||||||
run: |
|
|
||||||
scripts/switch_package_to_release.cjs
|
|
||||||
yarn install
|
|
||||||
yarn run build:compile
|
|
||||||
yarn run build:types
|
|
||||||
|
|
||||||
- name: Typecheck (release mode)
|
|
||||||
run: "yarn run lint:types"
|
|
||||||
|
|
||||||
# Temporary while we directly import matrix-js-sdk/src/* which means we need
|
|
||||||
# certain @types/* packages to make sense of matrix-js-sdk types.
|
|
||||||
#- name: Typecheck (release mode; no yarn link)
|
|
||||||
# if: github.event_name != 'pull_request' && github.ref_name != 'master'
|
|
||||||
# run: |
|
|
||||||
# yarn unlink matrix-js-sdk
|
|
||||||
# yarn add github:matrix-org/matrix-js-sdk#develop
|
|
||||||
# yarn install --force
|
|
||||||
# yarn run lint:types
|
|
||||||
|
|
||||||
i18n_lint:
|
i18n_lint:
|
||||||
name: "i18n Check"
|
name: "i18n Check"
|
||||||
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main
|
uses: matrix-org/matrix-web-i18n/.github/workflows/i18n_check.yml@main
|
||||||
|
permissions:
|
||||||
|
pull-requests: read
|
||||||
with:
|
with:
|
||||||
hardcoded-words: "Element"
|
hardcoded-words: "Element"
|
||||||
allowed-hardcoded-keys: |
|
allowed-hardcoded-keys: |
|
||||||
@@ -71,7 +54,7 @@ jobs:
|
|||||||
|
|
||||||
rethemendex_lint:
|
rethemendex_lint:
|
||||||
name: "Rethemendex Check"
|
name: "Rethemendex Check"
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
@@ -145,7 +128,7 @@ jobs:
|
|||||||
node-version: "lts/*"
|
node-version: "lts/*"
|
||||||
|
|
||||||
- name: Install Deps
|
- name: Install Deps
|
||||||
run: "scripts/layered.sh"
|
run: "yarn install --frozen-lockfile"
|
||||||
|
|
||||||
- name: Dead Code Analysis
|
- name: Run linter
|
||||||
run: "yarn run analyse:unused-exports"
|
run: "yarn run lint:knip"
|
||||||
|
|||||||
3
.github/workflows/sync-labels.yml
vendored
3
.github/workflows/sync-labels.yml
vendored
@@ -8,6 +8,9 @@ on:
|
|||||||
- develop
|
- develop
|
||||||
paths:
|
paths:
|
||||||
- .github/labels.yml
|
- .github/labels.yml
|
||||||
|
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
sync-labels:
|
sync-labels:
|
||||||
uses: element-hq/element-meta/.github/workflows/sync-labels.yml@develop
|
uses: element-hq/element-meta/.github/workflows/sync-labels.yml@develop
|
||||||
|
|||||||
10
.github/workflows/tests.yml
vendored
10
.github/workflows/tests.yml
vendored
@@ -26,10 +26,12 @@ env:
|
|||||||
# fetchdep.sh needs to know our PR number
|
# fetchdep.sh needs to know our PR number
|
||||||
PR_NUMBER: ${{ github.event.pull_request.number }}
|
PR_NUMBER: ${{ github.event.pull_request.number }}
|
||||||
|
|
||||||
|
permissions: {}
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
jest:
|
jest:
|
||||||
name: Jest
|
name: Jest
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
strategy:
|
strategy:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
matrix:
|
matrix:
|
||||||
@@ -93,14 +95,16 @@ jobs:
|
|||||||
name: jest-tests
|
name: jest-tests
|
||||||
needs: jest
|
needs: jest
|
||||||
if: always()
|
if: always()
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-24.04
|
||||||
|
permissions:
|
||||||
|
statuses: write
|
||||||
steps:
|
steps:
|
||||||
- if: needs.jest.result != 'skipped' && needs.jest.result != 'success'
|
- if: needs.jest.result != 'skipped' && needs.jest.result != 'success'
|
||||||
run: exit 1
|
run: exit 1
|
||||||
|
|
||||||
- name: Skip SonarCloud in merge queue
|
- name: Skip SonarCloud in merge queue
|
||||||
if: github.event_name == 'merge_group' || inputs.disable_coverage == 'true'
|
if: github.event_name == 'merge_group' || inputs.disable_coverage == 'true'
|
||||||
uses: Sibz/github-status-action@faaa4d96fecf273bd762985e0e7f9f933c774918 # v1
|
uses: guibranco/github-status-action-v2@7ca807c2ba3401be532d29a876b93262108099fb
|
||||||
with:
|
with:
|
||||||
authToken: ${{ secrets.GITHUB_TOKEN }}
|
authToken: ${{ secrets.GITHUB_TOKEN }}
|
||||||
state: success
|
state: success
|
||||||
|
|||||||
2
.github/workflows/triage-assigned.yml
vendored
2
.github/workflows/triage-assigned.yml
vendored
@@ -4,6 +4,8 @@ on:
|
|||||||
issues:
|
issues:
|
||||||
types: [assigned]
|
types: [assigned]
|
||||||
|
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
web-app-team:
|
web-app-team:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|||||||
2
.github/workflows/triage-incoming.yml
vendored
2
.github/workflows/triage-incoming.yml
vendored
@@ -4,6 +4,8 @@ on:
|
|||||||
issues:
|
issues:
|
||||||
types: [opened]
|
types: [opened]
|
||||||
|
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
automate-project-columns:
|
automate-project-columns:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
|||||||
2
.github/workflows/triage-labelled.yml
vendored
2
.github/workflows/triage-labelled.yml
vendored
@@ -8,6 +8,8 @@ on:
|
|||||||
ELEMENT_BOT_TOKEN:
|
ELEMENT_BOT_TOKEN:
|
||||||
required: true
|
required: true
|
||||||
|
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
apply_Z-Labs_label:
|
apply_Z-Labs_label:
|
||||||
name: Add Z-Labs label for features behind labs flags
|
name: Add Z-Labs label for features behind labs flags
|
||||||
|
|||||||
@@ -3,6 +3,7 @@ on:
|
|||||||
pull_request_target:
|
pull_request_target:
|
||||||
types: [review_requested]
|
types: [review_requested]
|
||||||
|
|
||||||
|
permissions: {} # Uses ELEMENT_BOT_TOKEN instead
|
||||||
jobs:
|
jobs:
|
||||||
add_design_pr_to_project:
|
add_design_pr_to_project:
|
||||||
name: Move PRs asking for design review to the design board
|
name: Move PRs asking for design review to the design board
|
||||||
|
|||||||
18
.github/workflows/triage-stale-flaky-tests.yml
vendored
18
.github/workflows/triage-stale-flaky-tests.yml
vendored
@@ -1,18 +0,0 @@
|
|||||||
name: Close stale flaky issues
|
|
||||||
on:
|
|
||||||
schedule:
|
|
||||||
- cron: "30 1 * * *"
|
|
||||||
jobs:
|
|
||||||
close:
|
|
||||||
runs-on: ubuntu-24.04
|
|
||||||
permissions:
|
|
||||||
actions: write
|
|
||||||
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"
|
|
||||||
27
.github/workflows/triage-stale.yml
vendored
Normal file
27
.github/workflows/triage-stale.yml
vendored
Normal file
@@ -0,0 +1,27 @@
|
|||||||
|
name: Close stale issues & PRs
|
||||||
|
on:
|
||||||
|
workflow_dispatch: {}
|
||||||
|
schedule:
|
||||||
|
- cron: "30 1 * * *"
|
||||||
|
permissions: {}
|
||||||
|
jobs:
|
||||||
|
close:
|
||||||
|
runs-on: ubuntu-24.04
|
||||||
|
permissions:
|
||||||
|
actions: write
|
||||||
|
issues: write
|
||||||
|
pull-requests: write
|
||||||
|
steps:
|
||||||
|
- uses: actions/stale@v9
|
||||||
|
with:
|
||||||
|
operations-per-run: 100
|
||||||
|
# Flaky test issue closing
|
||||||
|
only-issue-labels: "Z-Flaky-Test"
|
||||||
|
days-before-issue-stale: 14
|
||||||
|
days-before-issue-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"
|
||||||
|
# Stale PR closing
|
||||||
|
days-before-pr-stale: 180
|
||||||
|
days-before-pr-close: 0
|
||||||
|
close-pr-message: "This PR has been automatically closed because it has been stale for 180 days. If you wish to continue working on this PR, please ping a maintainer to reopen it."
|
||||||
4
.github/workflows/triage-unlabelled.yml
vendored
4
.github/workflows/triage-unlabelled.yml
vendored
@@ -3,11 +3,13 @@ name: Move unlabelled from needs info columns to triaged
|
|||||||
on:
|
on:
|
||||||
issues:
|
issues:
|
||||||
types: [unlabeled]
|
types: [unlabeled]
|
||||||
|
permissions: {}
|
||||||
jobs:
|
jobs:
|
||||||
Move_Unabeled_Issue_On_Project_Board:
|
Move_Unabeled_Issue_On_Project_Board:
|
||||||
name: Move no longer X-Needs-Info issues to Triaged
|
name: Move no longer X-Needs-Info issues to Triaged
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
|
permissions:
|
||||||
|
repository-projects: read
|
||||||
if: >
|
if: >
|
||||||
${{
|
${{
|
||||||
!contains(github.event.issue.labels.*.name, 'X-Needs-Info') }}
|
!contains(github.event.issue.labels.*.name, 'X-Needs-Info') }}
|
||||||
|
|||||||
3
.github/workflows/update-jitsi.yml
vendored
3
.github/workflows/update-jitsi.yml
vendored
@@ -4,6 +4,7 @@ on:
|
|||||||
workflow_dispatch: {}
|
workflow_dispatch: {}
|
||||||
schedule:
|
schedule:
|
||||||
- cron: "0 3 * * 0" # 3am every Sunday
|
- cron: "0 3 * * 0" # 3am every Sunday
|
||||||
|
permissions: {} # We use ELEMENT_BOT_TOKEN instead
|
||||||
jobs:
|
jobs:
|
||||||
update:
|
update:
|
||||||
runs-on: ubuntu-24.04
|
runs-on: ubuntu-24.04
|
||||||
@@ -22,7 +23,7 @@ jobs:
|
|||||||
run: "yarn update:jitsi"
|
run: "yarn update:jitsi"
|
||||||
|
|
||||||
- name: Create Pull Request
|
- name: Create Pull Request
|
||||||
uses: peter-evans/create-pull-request@5e914681df9dc83aa4e4905692ca88beb2f9e91f # v7
|
uses: peter-evans/create-pull-request@67ccf781d68cd99b580ae25a5c18a1cc84ffff1f # v7
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
token: ${{ secrets.ELEMENT_BOT_TOKEN }}
|
||||||
branch: actions/jitsi-update
|
branch: actions/jitsi-update
|
||||||
|
|||||||
1
.github/workflows/update-topics.yaml
vendored
1
.github/workflows/update-topics.yaml
vendored
@@ -15,6 +15,7 @@ on:
|
|||||||
required: true
|
required: true
|
||||||
type: string
|
type: string
|
||||||
concurrency: ${{ github.workflow }}
|
concurrency: ${{ github.workflow }}
|
||||||
|
permissions: {} # No permissions required
|
||||||
jobs:
|
jobs:
|
||||||
bot:
|
bot:
|
||||||
name: Release topic update
|
name: Release topic update
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -26,6 +26,7 @@ electron/pub
|
|||||||
/coverage
|
/coverage
|
||||||
# Auto-generated file
|
# Auto-generated file
|
||||||
/src/modules.ts
|
/src/modules.ts
|
||||||
|
/src/modules.js
|
||||||
/build_config.yaml
|
/build_config.yaml
|
||||||
/book
|
/book
|
||||||
/index.html
|
/index.html
|
||||||
|
|||||||
@@ -2,6 +2,6 @@
|
|||||||
"*": "prettier --write",
|
"*": "prettier --write",
|
||||||
"src/**/*.(ts|tsx)": ["eslint --fix"],
|
"src/**/*.(ts|tsx)": ["eslint --fix"],
|
||||||
"scripts/**/*.(ts|tsx)": ["eslint --fix"],
|
"scripts/**/*.(ts|tsx)": ["eslint --fix"],
|
||||||
"module_system/**/*.(ts|tsx)": ["eslint --fix --config .eslintrc-module_system.js module_system"],
|
"module_system/**/*.(ts|tsx)": ["eslint --fix"],
|
||||||
"*.pcss": ["stylelint --fix"]
|
"*.pcss": ["stylelint --fix"]
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -17,6 +17,7 @@ electron/pub
|
|||||||
/coverage
|
/coverage
|
||||||
# Auto-generated file
|
# Auto-generated file
|
||||||
/src/modules.ts
|
/src/modules.ts
|
||||||
|
/src/modules.js
|
||||||
/src/i18n/strings
|
/src/i18n/strings
|
||||||
/build_config.yaml
|
/build_config.yaml
|
||||||
# Raises an error because it contains a template var breaking the script tag
|
# Raises an error because it contains a template var breaking the script tag
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
extends: ["stylelint-config-standard"],
|
extends: ["stylelint-config-standard"],
|
||||||
customSyntax: require("postcss-scss"),
|
customSyntax: "postcss-scss",
|
||||||
plugins: ["stylelint-scss"],
|
plugins: ["stylelint-scss", "stylelint-value-no-unknown-custom-properties"],
|
||||||
rules: {
|
rules: {
|
||||||
"comment-empty-line-before": null,
|
"comment-empty-line-before": null,
|
||||||
"declaration-empty-line-before": null,
|
"declaration-empty-line-before": null,
|
||||||
@@ -33,18 +33,42 @@ module.exports = {
|
|||||||
"import-notation": null,
|
"import-notation": null,
|
||||||
"value-keyword-case": null,
|
"value-keyword-case": null,
|
||||||
"declaration-block-no-redundant-longhand-properties": null,
|
"declaration-block-no-redundant-longhand-properties": null,
|
||||||
"declaration-block-no-duplicate-properties": [
|
|
||||||
true,
|
|
||||||
// useful for fallbacks
|
|
||||||
{ ignore: ["consecutive-duplicates-with-different-values"] },
|
|
||||||
],
|
|
||||||
"shorthand-property-no-redundant-values": null,
|
"shorthand-property-no-redundant-values": null,
|
||||||
"property-no-vendor-prefix": null,
|
"property-no-vendor-prefix": null,
|
||||||
"value-no-vendor-prefix": null,
|
|
||||||
"selector-no-vendor-prefix": null,
|
"selector-no-vendor-prefix": null,
|
||||||
"media-feature-name-no-vendor-prefix": null,
|
"media-feature-name-no-vendor-prefix": null,
|
||||||
"number-max-precision": null,
|
"number-max-precision": null,
|
||||||
"no-invalid-double-slash-comments": true,
|
"no-invalid-double-slash-comments": true,
|
||||||
"media-feature-range-notation": null,
|
"media-feature-range-notation": null,
|
||||||
|
"declaration-property-value-no-unknown": null,
|
||||||
|
"declaration-property-value-keyword-no-deprecated": null,
|
||||||
|
"csstools/value-no-unknown-custom-properties": [
|
||||||
|
true,
|
||||||
|
{
|
||||||
|
importFrom: [
|
||||||
|
{ from: "res/css/_common.pcss", type: "css" },
|
||||||
|
{ from: "res/themes/light/css/_light.pcss", type: "css" },
|
||||||
|
// Right now our styles share vars all over the place, this is not ideal but acceptable for now
|
||||||
|
{ from: "res/css/views/rooms/_EventTile.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/rooms/_IRCLayout.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/rooms/_EventBubbleTile.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/rooms/_ReadReceiptGroup.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/rooms/_EditMessageComposer.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/right_panel/_BaseCard.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/messages/_MessageTimestamp.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/messages/_EventTileBubble.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/messages/_MessageActionBar.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/voip/LegacyCallView/_LegacyCallViewButtons.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/elements/_ToggleSwitch.pcss", type: "css" },
|
||||||
|
{ from: "res/css/views/settings/tabs/_SettingsTab.pcss", type: "css" },
|
||||||
|
{ from: "res/css/structures/_RoomView.pcss", type: "css" },
|
||||||
|
// Compound vars
|
||||||
|
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-base.css",
|
||||||
|
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-common-semantic.css",
|
||||||
|
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-base-mq.css",
|
||||||
|
"node_modules/@vector-im/compound-design-tokens/assets/web/css/cpd-theme-light-semantic-mq.css",
|
||||||
|
],
|
||||||
|
},
|
||||||
|
],
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
|||||||
227
CHANGELOG.md
227
CHANGELOG.md
@@ -1,3 +1,230 @@
|
|||||||
|
Changes in [1.11.92](https://github.com/element-hq/element-web/releases/tag/v1.11.92) (2025-02-11)
|
||||||
|
==================================================================================================
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
* [Backport staging] Log when we show, and hide, encryption setup toasts ([#29238](https://github.com/element-hq/element-web/pull/29238)). Contributed by @richvdh.
|
||||||
|
* Make profile header section match the designs ([#29163](https://github.com/element-hq/element-web/pull/29163)). Contributed by @MidhunSureshR.
|
||||||
|
* Always show back button in the right panel ([#29128](https://github.com/element-hq/element-web/pull/29128)). Contributed by @MidhunSureshR.
|
||||||
|
* Schedule dehydration on reload if the dehydration key is already cached locally ([#29021](https://github.com/element-hq/element-web/pull/29021)). Contributed by @uhoreg.
|
||||||
|
* update to twemoji 15.1.0 ([#29115](https://github.com/element-hq/element-web/pull/29115)). Contributed by @ara4n.
|
||||||
|
* Update matrix-widget-api ([#29112](https://github.com/element-hq/element-web/pull/29112)). Contributed by @toger5.
|
||||||
|
* Allow navigating through the memberlist using up/down keys ([#28949](https://github.com/element-hq/element-web/pull/28949)). Contributed by @MidhunSureshR.
|
||||||
|
* Style room header icons and facepile for toggled state ([#28968](https://github.com/element-hq/element-web/pull/28968)). Contributed by @MidhunSureshR.
|
||||||
|
* Move threads header below base card header ([#28969](https://github.com/element-hq/element-web/pull/28969)). Contributed by @MidhunSureshR.
|
||||||
|
* Add `Advanced` section to the user settings encryption tab ([#28804](https://github.com/element-hq/element-web/pull/28804)). Contributed by @florianduros.
|
||||||
|
* Fix outstanding UX issues with replies/mentions/keyword notifs ([#28270](https://github.com/element-hq/element-web/pull/28270)). Contributed by @taffyko.
|
||||||
|
* Distinguish room state and timeline events when dealing with widgets ([#28681](https://github.com/element-hq/element-web/pull/28681)). Contributed by @robintown.
|
||||||
|
* Switch OIDC primarily to new `/auth_metadata` API ([#29019](https://github.com/element-hq/element-web/pull/29019)). Contributed by @t3chguy.
|
||||||
|
* More memberlist changes ([#29069](https://github.com/element-hq/element-web/pull/29069)). Contributed by @MidhunSureshR.
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* [Backport staging] Wire up the "Forgot recovery key" button for the "Key storage out of sync" toast ([#29190](https://github.com/element-hq/element-web/pull/29190)). Contributed by @RiotRobot.
|
||||||
|
* Encryption tab: hide `Advanced` section when the key storage is out of sync ([#29129](https://github.com/element-hq/element-web/pull/29129)). Contributed by @florianduros.
|
||||||
|
* Fix share button in discovery settings being disabled incorrectly ([#29151](https://github.com/element-hq/element-web/pull/29151)). Contributed by @t3chguy.
|
||||||
|
* Ensure switching rooms does not wrongly focus timeline search ([#29153](https://github.com/element-hq/element-web/pull/29153)). Contributed by @t3chguy.
|
||||||
|
* Stop showing a dialog prompting the user to enter an old recovery key ([#29143](https://github.com/element-hq/element-web/pull/29143)). Contributed by @richvdh.
|
||||||
|
* Make themed widgets reflect the effective theme ([#28342](https://github.com/element-hq/element-web/pull/28342)). Contributed by @robintown.
|
||||||
|
* support non-VS16 emoji ligatures in TwemojiMozilla ([#29100](https://github.com/element-hq/element-web/pull/29100)). Contributed by @ara4n.
|
||||||
|
* e2e test: Verify session with the encryption tab instead of the security \& privacy tab ([#29090](https://github.com/element-hq/element-web/pull/29090)). Contributed by @florianduros.
|
||||||
|
* Work around cloudflare R2 / aws client incompatability ([#29086](https://github.com/element-hq/element-web/pull/29086)). Contributed by @dbkr.
|
||||||
|
* Fix identity server settings visibility ([#29083](https://github.com/element-hq/element-web/pull/29083)). Contributed by @dbkr.
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.91](https://github.com/element-hq/element-web/releases/tag/v1.11.91) (2025-01-28)
|
||||||
|
==================================================================================================
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
* Implement changes to memberlist from feedback ([#29029](https://github.com/element-hq/element-web/pull/29029)). Contributed by @MidhunSureshR.
|
||||||
|
* Add toast for recovery keys being out of sync ([#28946](https://github.com/element-hq/element-web/pull/28946)). Contributed by @dbkr.
|
||||||
|
* Refactor LegacyCallHandler event emitter to use TypedEventEmitter ([#29008](https://github.com/element-hq/element-web/pull/29008)). Contributed by @t3chguy.
|
||||||
|
* Add `Recovery` section in the new user settings `Encryption` tab ([#28673](https://github.com/element-hq/element-web/pull/28673)). Contributed by @florianduros.
|
||||||
|
* Retry loading chunks to make the app more resilient ([#29001](https://github.com/element-hq/element-web/pull/29001)). Contributed by @t3chguy.
|
||||||
|
* Clear account idb table on logout ([#28996](https://github.com/element-hq/element-web/pull/28996)). Contributed by @t3chguy.
|
||||||
|
* Implement new memberlist design with MVVM architecture ([#28874](https://github.com/element-hq/element-web/pull/28874)). Contributed by @MidhunSureshR.
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* [Backport staging] Switch to secure random strings ([#29035](https://github.com/element-hq/element-web/pull/29035)). Contributed by @RiotRobot.
|
||||||
|
* React to MatrixEvent sender/target being updated for rendering state events ([#28947](https://github.com/element-hq/element-web/pull/28947)). Contributed by @t3chguy.
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.90](https://github.com/element-hq/element-web/releases/tag/v1.11.90) (2025-01-14)
|
||||||
|
==================================================================================================
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
* Docker: run as non-root ([#28849](https://github.com/element-hq/element-web/pull/28849)). Contributed by @richvdh.
|
||||||
|
* Docker: allow configuration of HTTP listen port via env var ([#28840](https://github.com/element-hq/element-web/pull/28840)). Contributed by @richvdh.
|
||||||
|
* Update matrix-wysiwyg to consume WASM asset ([#28838](https://github.com/element-hq/element-web/pull/28838)). Contributed by @t3chguy.
|
||||||
|
* OIDC settings tweaks ([#28787](https://github.com/element-hq/element-web/pull/28787)). Contributed by @t3chguy.
|
||||||
|
* Delabs native OIDC support ([#28615](https://github.com/element-hq/element-web/pull/28615)). Contributed by @t3chguy.
|
||||||
|
* Move room header info button to right-most position ([#28754](https://github.com/element-hq/element-web/pull/28754)). Contributed by @t3chguy.
|
||||||
|
* Enable key backup by default ([#28691](https://github.com/element-hq/element-web/pull/28691)). Contributed by @dbkr.
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* Fix building the automations mermaid diagram ([#28881](https://github.com/element-hq/element-web/pull/28881)). Contributed by @dbkr.
|
||||||
|
* Playwright: wait for the network listener on the postgres db ([#28808](https://github.com/element-hq/element-web/pull/28808)). Contributed by @dbkr.
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.89](https://github.com/element-hq/element-web/releases/tag/v1.11.89) (2024-12-18)
|
||||||
|
==================================================================================================
|
||||||
|
This is a patch release to fix a bug which could prevent loading stored crypto state from storage, and also to fix URL previews when switching back to a room.
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* Upgrade matrix-sdk-crypto-wasm to 1.11.0 (https://github.com/matrix-org/matrix-js-sdk/pull/4593)
|
||||||
|
* Fix url preview display ([#28766](https://github.com/element-hq/element-web/pull/28766)).
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.88](https://github.com/element-hq/element-web/releases/tag/v1.11.88) (2024-12-17)
|
||||||
|
==================================================================================================
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
* Allow trusted Element Call widget to send and receive media encryption key to-device messages ([#28316](https://github.com/element-hq/element-web/pull/28316)). Contributed by @hughns.
|
||||||
|
* increase ringing timeout from 10 seconds to 90 seconds ([#28630](https://github.com/element-hq/element-web/pull/28630)). Contributed by @fkwp.
|
||||||
|
* Add `Close` tooltip to dialog ([#28617](https://github.com/element-hq/element-web/pull/28617)). Contributed by @florianduros.
|
||||||
|
* New UX for Share dialog ([#28598](https://github.com/element-hq/element-web/pull/28598)). Contributed by @florianduros.
|
||||||
|
* Improve performance of RoomContext in RoomHeader ([#28574](https://github.com/element-hq/element-web/pull/28574)). Contributed by @t3chguy.
|
||||||
|
* Remove `Features.RustCrypto` flag ([#28582](https://github.com/element-hq/element-web/pull/28582)). Contributed by @florianduros.
|
||||||
|
* Add Modernizr warning when running in non-secure context ([#28581](https://github.com/element-hq/element-web/pull/28581)). Contributed by @t3chguy.
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* Fix jumpy timeline when the pinned message banner is displayed ([#28654](https://github.com/element-hq/element-web/pull/28654)). Contributed by @florianduros.
|
||||||
|
* Fix font \& spaces in settings subsection ([#28631](https://github.com/element-hq/element-web/pull/28631)). Contributed by @florianduros.
|
||||||
|
* Remove manual device verification which is not supported by the new cryptography stack ([#28588](https://github.com/element-hq/element-web/pull/28588)). Contributed by @florianduros.
|
||||||
|
* Fix code block highlighting not working reliably with many code blocks ([#28613](https://github.com/element-hq/element-web/pull/28613)). Contributed by @t3chguy.
|
||||||
|
* Remove remaining reply fallbacks code ([#28610](https://github.com/element-hq/element-web/pull/28610)). Contributed by @t3chguy.
|
||||||
|
* Provide a way to activate GIFs via the keyboard for a11y ([#28611](https://github.com/element-hq/element-web/pull/28611)). Contributed by @t3chguy.
|
||||||
|
* Fix format bar position ([#28591](https://github.com/element-hq/element-web/pull/28591)). Contributed by @florianduros.
|
||||||
|
* Fix room taking long time to load ([#28579](https://github.com/element-hq/element-web/pull/28579)). Contributed by @florianduros.
|
||||||
|
* Show the correct shield status in tooltip for more conditions ([#28476](https://github.com/element-hq/element-web/pull/28476)). Contributed by @uhoreg.
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.87](https://github.com/element-hq/element-web/releases/tag/v1.11.87) (2024-12-03)
|
||||||
|
==================================================================================================
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
* Send and respect MSC4230 is\_animated flag ([#28513](https://github.com/element-hq/element-web/pull/28513)). Contributed by @t3chguy.
|
||||||
|
* Display a warning when an unverified user's identity changes ([#28211](https://github.com/element-hq/element-web/pull/28211)). Contributed by @uhoreg.
|
||||||
|
* Swap out Twitter link for Mastodon on auth footer ([#28508](https://github.com/element-hq/element-web/pull/28508)). Contributed by @t3chguy.
|
||||||
|
* Consider `org.matrix.msc3417.call` as video room in create room dialog ([#28497](https://github.com/element-hq/element-web/pull/28497)). Contributed by @t3chguy.
|
||||||
|
* Standardise icons using Compound Design Tokens ([#28217](https://github.com/element-hq/element-web/pull/28217)). Contributed by @t3chguy.
|
||||||
|
* Start sending stable `m.marked_unread` events ([#28478](https://github.com/element-hq/element-web/pull/28478)). Contributed by @tulir.
|
||||||
|
* Upgrade to compound-design-tokens v2 ([#28471](https://github.com/element-hq/element-web/pull/28471)). Contributed by @t3chguy.
|
||||||
|
* Standardise icons using Compound Design Tokens ([#28286](https://github.com/element-hq/element-web/pull/28286)). Contributed by @t3chguy.
|
||||||
|
* Remove reply fallbacks as per merged MSC2781 ([#28406](https://github.com/element-hq/element-web/pull/28406)). Contributed by @t3chguy.
|
||||||
|
* Use React Suspense when rendering async modals ([#28386](https://github.com/element-hq/element-web/pull/28386)). Contributed by @t3chguy.
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* Add spinner when room encryption is loading in room settings ([#28535](https://github.com/element-hq/element-web/pull/28535)). Contributed by @florianduros.
|
||||||
|
* Fix getOidcCallbackUrl for Element Desktop ([#28521](https://github.com/element-hq/element-web/pull/28521)). Contributed by @t3chguy.
|
||||||
|
* Filter out redacted poll votes to avoid crashing the Poll widget ([#28498](https://github.com/element-hq/element-web/pull/28498)). Contributed by @t3chguy.
|
||||||
|
* Fix force tab complete not working since switching to React 18 createRoot API ([#28505](https://github.com/element-hq/element-web/pull/28505)). Contributed by @t3chguy.
|
||||||
|
* Fix media captions in bubble layout ([#28480](https://github.com/element-hq/element-web/pull/28480)). Contributed by @tulir.
|
||||||
|
* Reset cross-signing before backup when resetting both ([#28402](https://github.com/element-hq/element-web/pull/28402)). Contributed by @uhoreg.
|
||||||
|
* Listen to events so that encryption icon updates when status changes ([#28407](https://github.com/element-hq/element-web/pull/28407)). Contributed by @uhoreg.
|
||||||
|
* Check that the file the user chose has a MIME type of `image/*` ([#28467](https://github.com/element-hq/element-web/pull/28467)). Contributed by @t3chguy.
|
||||||
|
* Fix download button size in message action bar ([#28472](https://github.com/element-hq/element-web/pull/28472)). Contributed by @t3chguy.
|
||||||
|
* Allow tab completing users in brackets ([#28460](https://github.com/element-hq/element-web/pull/28460)). Contributed by @t3chguy.
|
||||||
|
* Fix React 18 strict mode breaking spotlight dialog ([#28452](https://github.com/element-hq/element-web/pull/28452)). Contributed by @MidhunSureshR.
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.86](https://github.com/element-hq/element-web/releases/tag/v1.11.86) (2024-11-19)
|
||||||
|
==================================================================================================
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
* Deduplicate icons using Compound Design Tokens ([#28419](https://github.com/element-hq/element-web/pull/28419)). Contributed by @t3chguy.
|
||||||
|
* Let widget driver send error details ([#28357](https://github.com/element-hq/element-web/pull/28357)). Contributed by @AndrewFerr.
|
||||||
|
* Deduplicate icons using Compound Design Tokens ([#28381](https://github.com/element-hq/element-web/pull/28381)). Contributed by @t3chguy.
|
||||||
|
* Auto approvoce `io.element.call.reaction` capability for element call widgets ([#28401](https://github.com/element-hq/element-web/pull/28401)). Contributed by @toger5.
|
||||||
|
* Show message type prefix in thread root \& reply previews ([#28361](https://github.com/element-hq/element-web/pull/28361)). Contributed by @t3chguy.
|
||||||
|
* Support sending encrypted to device messages from widgets ([#28315](https://github.com/element-hq/element-web/pull/28315)). Contributed by @hughns.
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* Feed events to widgets as they are decrypted (even if out of order) ([#28376](https://github.com/element-hq/element-web/pull/28376)). Contributed by @robintown.
|
||||||
|
* Handle authenticated media when downloading from ImageView ([#28379](https://github.com/element-hq/element-web/pull/28379)). Contributed by @t3chguy.
|
||||||
|
* Ignore `m.3pid_changes` for Identity service 3PID changes ([#28375](https://github.com/element-hq/element-web/pull/28375)). Contributed by @t3chguy.
|
||||||
|
* Fix markdown escaping wrongly passing html through ([#28363](https://github.com/element-hq/element-web/pull/28363)). Contributed by @t3chguy.
|
||||||
|
* Remove "Upgrade your encryption" flow in `CreateSecretStorageDialog` ([#28290](https://github.com/element-hq/element-web/pull/28290)). Contributed by @florianduros.
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.85](https://github.com/element-hq/element-web/releases/tag/v1.11.85) (2024-11-12)
|
||||||
|
==================================================================================================
|
||||||
|
# Security
|
||||||
|
- Fixes for [CVE-2024-51750](https://www.cve.org/CVERecord?id=CVE-2024-51750) / [GHSA-w36j-v56h-q9pc](https://github.com/element-hq/element-web/security/advisories/GHSA-w36j-v56h-q9pc)
|
||||||
|
- Fixes for [CVE-2024-51749](https://www.cve.org/CVERecord?id=CVE-2024-51749) / [GHSA-5486-384g-mcx2](https://github.com/element-hq/element-web/security/advisories/GHSA-5486-384g-mcx2)
|
||||||
|
- Update JS SDK with the fixes for [CVE-2024-50336](https://www.cve.org/CVERecord?id=CVE-2024-50336) / [GHSA-xvg8-m4x3-w6xr](https://github.com/matrix-org/matrix-js-sdk/security/advisories/GHSA-xvg8-m4x3-w6xr)
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.84](https://github.com/element-hq/element-web/releases/tag/v1.11.84) (2024-11-05)
|
||||||
|
==================================================================================================
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
* Remove abandoned MSC3886, MSC3903, MSC3906 implementations ([#28274](https://github.com/element-hq/element-web/pull/28274)). Contributed by @t3chguy.
|
||||||
|
* Update to React 18 ([#24763](https://github.com/element-hq/element-web/pull/24763)). Contributed by @t3chguy.
|
||||||
|
* Deduplicate icons using Compound ([#28239](https://github.com/element-hq/element-web/pull/28239)). Contributed by @t3chguy.
|
||||||
|
* Replace legacy Tooltips with Compound tooltips ([#28231](https://github.com/element-hq/element-web/pull/28231)). Contributed by @t3chguy.
|
||||||
|
* Deduplicate icons using Compound Design Tokens ([#28219](https://github.com/element-hq/element-web/pull/28219)). Contributed by @t3chguy.
|
||||||
|
* Add reactions to html export ([#28210](https://github.com/element-hq/element-web/pull/28210)). Contributed by @langleyd.
|
||||||
|
* Remove feature\_dehydration ([#28173](https://github.com/element-hq/element-web/pull/28173)). Contributed by @florianduros.
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* Remove upgrade encryption in `DeviceListener` and `SetupEncryptionToast` ([#28299](https://github.com/element-hq/element-web/pull/28299)). Contributed by @florianduros.
|
||||||
|
* Fix 'remove alias' button in room settings ([#28269](https://github.com/element-hq/element-web/pull/28269)). Contributed by @Dev-Gurjar.
|
||||||
|
* Add back unencrypted path in `StopGapWidgetDriver.sendToDevice` ([#28295](https://github.com/element-hq/element-web/pull/28295)). Contributed by @florianduros.
|
||||||
|
* Fix other devices not being decorated as such ([#28279](https://github.com/element-hq/element-web/pull/28279)). Contributed by @t3chguy.
|
||||||
|
* Fix pill contrast in invitation dialog ([#28250](https://github.com/element-hq/element-web/pull/28250)). Contributed by @florianduros.
|
||||||
|
* Close right panel chat when minimising maximised voip widget ([#28241](https://github.com/element-hq/element-web/pull/28241)). Contributed by @t3chguy.
|
||||||
|
* Fix develop changelog parsing ([#28232](https://github.com/element-hq/element-web/pull/28232)). Contributed by @t3chguy.
|
||||||
|
* Fix Ctrl+F shortcut not working with minimised room summary card ([#28223](https://github.com/element-hq/element-web/pull/28223)). Contributed by @t3chguy.
|
||||||
|
* Fix network dropdown missing checkbox \& aria-checked ([#28220](https://github.com/element-hq/element-web/pull/28220)). Contributed by @t3chguy.
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.83](https://github.com/element-hq/element-web/releases/tag/v1.11.83) (2024-10-29)
|
||||||
|
==================================================================================================
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
* Enable Element Call by default on release instances ([#28314](https://github.com/element-hq/element-web/pull/28314)). Contributed by @t3chguy.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
Changes in [1.11.82](https://github.com/element-hq/element-web/releases/tag/v1.11.82) (2024-10-22)
|
||||||
|
==================================================================================================
|
||||||
|
## ✨ Features
|
||||||
|
|
||||||
|
* Deduplicate more icons using Compound Design Tokens ([#132](https://github.com/element-hq/matrix-react-sdk/pull/132)). Contributed by @t3chguy.
|
||||||
|
* Always show link new device flow even if unsupported ([#147](https://github.com/element-hq/matrix-react-sdk/pull/147)). Contributed by @t3chguy.
|
||||||
|
* Update design of files list in right panel ([#144](https://github.com/element-hq/matrix-react-sdk/pull/144)). Contributed by @t3chguy.
|
||||||
|
* Remove feature\_dehydration ([#138](https://github.com/element-hq/matrix-react-sdk/pull/138)). Contributed by @florianduros.
|
||||||
|
* Upgrade emojibase-bindings and remove local handling of emoticon variations ([#127](https://github.com/element-hq/matrix-react-sdk/pull/127)). Contributed by @langleyd.
|
||||||
|
* Add support for rendering media captions ([#43](https://github.com/element-hq/matrix-react-sdk/pull/43)). Contributed by @tulir.
|
||||||
|
* Replace composer icons with Compound variants ([#123](https://github.com/element-hq/matrix-react-sdk/pull/123)). Contributed by @t3chguy.
|
||||||
|
* Tweak default right panel size to be 320px except for maximised widgets at 420px ([#110](https://github.com/element-hq/matrix-react-sdk/pull/110)). Contributed by @t3chguy.
|
||||||
|
* Add a pinned message badge under a pinned message ([#118](https://github.com/element-hq/matrix-react-sdk/pull/118)). Contributed by @florianduros.
|
||||||
|
* Ditch right panel tabs and re-add close button ([#99](https://github.com/element-hq/matrix-react-sdk/pull/99)). Contributed by @t3chguy.
|
||||||
|
* Force verification even for refreshed clients ([#44](https://github.com/element-hq/matrix-react-sdk/pull/44)). Contributed by @dbkr.
|
||||||
|
* Update emoji text, border and background colour in timeline ([#119](https://github.com/element-hq/matrix-react-sdk/pull/119)). Contributed by @florianduros.
|
||||||
|
* Disable ICE fallback based on well-known configuration ([#111](https://github.com/element-hq/matrix-react-sdk/pull/111)). Contributed by @t3chguy.
|
||||||
|
* Remove legacy room header and promote beta room header ([#105](https://github.com/element-hq/matrix-react-sdk/pull/105)). Contributed by @t3chguy.
|
||||||
|
* Respect `io.element.jitsi` `useFor1To1Calls` in well-known ([#112](https://github.com/element-hq/matrix-react-sdk/pull/112)). Contributed by @t3chguy.
|
||||||
|
* Use Compound close icon in favour of mishmash of x/close icons ([#108](https://github.com/element-hq/matrix-react-sdk/pull/108)). Contributed by @t3chguy.
|
||||||
|
|
||||||
|
## 🐛 Bug Fixes
|
||||||
|
|
||||||
|
* Correct typo in option documentation ([#28148](https://github.com/element-hq/element-web/pull/28148)). Contributed by @AndrewKvalheim.
|
||||||
|
* Revert #124 and #135 ([#139](https://github.com/element-hq/matrix-react-sdk/pull/139)). Contributed by @dbkr.
|
||||||
|
* Add aria-label to e2e icon ([#136](https://github.com/element-hq/matrix-react-sdk/pull/136)). Contributed by @florianduros.
|
||||||
|
* Fix bell icons on room list hover being black squares ([#135](https://github.com/element-hq/matrix-react-sdk/pull/135)). Contributed by @dbkr.
|
||||||
|
* Fix vertical overflow on the mobile register screen ([#137](https://github.com/element-hq/matrix-react-sdk/pull/137)). Contributed by @langleyd.
|
||||||
|
* Allow to unpin redacted event ([#98](https://github.com/element-hq/matrix-react-sdk/pull/98)). Contributed by @florianduros.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Changes in [1.11.81](https://github.com/element-hq/element-web/releases/tag/v1.11.81) (2024-10-15)
|
Changes in [1.11.81](https://github.com/element-hq/element-web/releases/tag/v1.11.81) (2024-10-15)
|
||||||
==================================================================================================
|
==================================================================================================
|
||||||
This release fixes High severity vulnerability CVE-2024-47771 / GHSA-963w-49j9-gxj6
|
This release fixes High severity vulnerability CVE-2024-47771 / GHSA-963w-49j9-gxj6
|
||||||
|
|||||||
135
CONTRIBUTING.md
135
CONTRIBUTING.md
@@ -20,26 +20,26 @@ Definitely don't use the GitHub default of "Update file.ts".
|
|||||||
|
|
||||||
As for your PR description, it should include these things:
|
As for your PR description, it should include these things:
|
||||||
|
|
||||||
- References to any bugs fixed by the change (in GitHub's `Fixes` notation)
|
- References to any bugs fixed by the change (in GitHub's `Fixes` notation)
|
||||||
- Describe the why and what is changing in the PR description so it's easy for
|
- Describe the why and what is changing in the PR description so it's easy for
|
||||||
onlookers and reviewers to onboard and context switch. This information is
|
onlookers and reviewers to onboard and context switch. This information is
|
||||||
also helpful when we come back to look at this in 6 months and ask "why did
|
also helpful when we come back to look at this in 6 months and ask "why did
|
||||||
we do it like that?" we have a chance of finding out.
|
we do it like that?" we have a chance of finding out.
|
||||||
- Why didn't it work before? Why does it work now? What use cases does it
|
- Why didn't it work before? Why does it work now? What use cases does it
|
||||||
unlock?
|
unlock?
|
||||||
- If you find yourself adding information on how the code works or why you
|
- If you find yourself adding information on how the code works or why you
|
||||||
chose to do it the way you did, make sure this information is instead
|
chose to do it the way you did, make sure this information is instead
|
||||||
written as comments in the code itself.
|
written as comments in the code itself.
|
||||||
- Sometimes a PR can change considerably as it is developed. In this case,
|
- Sometimes a PR can change considerably as it is developed. In this case,
|
||||||
the description should be updated to reflect the most recent state of
|
the description should be updated to reflect the most recent state of
|
||||||
the PR. (It can be helpful to retain the old content under a suitable
|
the PR. (It can be helpful to retain the old content under a suitable
|
||||||
heading, for additional context.)
|
heading, for additional context.)
|
||||||
- Include both **before** and **after** screenshots to easily compare and discuss
|
- Include both **before** and **after** screenshots to easily compare and discuss
|
||||||
what's changing.
|
what's changing.
|
||||||
- Include a step-by-step testing strategy so that a reviewer can check out the
|
- Include a step-by-step testing strategy so that a reviewer can check out the
|
||||||
code locally and easily get to the point of testing your change.
|
code locally and easily get to the point of testing your change.
|
||||||
- Add comments to the diff for the reviewer that might help them to understand
|
- Add comments to the diff for the reviewer that might help them to understand
|
||||||
why the change is necessary or how they might better understand and review it.
|
why the change is necessary or how they might better understand and review it.
|
||||||
|
|
||||||
### Changelogs
|
### Changelogs
|
||||||
|
|
||||||
@@ -79,8 +79,8 @@ element-web notes: Fix a bug where the 'Herd' button only worked on Tuesdays
|
|||||||
|
|
||||||
This example is for Element Web. You can specify:
|
This example is for Element Web. You can specify:
|
||||||
|
|
||||||
- element-web
|
- element-web
|
||||||
- element-desktop
|
- element-desktop
|
||||||
|
|
||||||
If your PR introduces a breaking change, use the `Notes` section in the same
|
If your PR introduces a breaking change, use the `Notes` section in the same
|
||||||
way, additionally adding the `X-Breaking-Change` label (see below). There's no need
|
way, additionally adding the `X-Breaking-Change` label (see below). There's no need
|
||||||
@@ -96,10 +96,10 @@ Notes: Remove legacy `Camelopard` class. `Giraffe` should be used instead.
|
|||||||
|
|
||||||
Other metadata can be added using labels.
|
Other metadata can be added using labels.
|
||||||
|
|
||||||
- `X-Breaking-Change`: A breaking change - adding this label will mean the change causes a _major_ version bump.
|
- `X-Breaking-Change`: A breaking change - adding this label will mean the change causes a _major_ version bump.
|
||||||
- `T-Enhancement`: A new feature - adding this label will mean the change causes a _minor_ version bump.
|
- `T-Enhancement`: A new feature - adding this label will mean the change causes a _minor_ version bump.
|
||||||
- `T-Defect`: A bug fix (in either code or docs).
|
- `T-Defect`: A bug fix (in either code or docs).
|
||||||
- `T-Task`: No user-facing changes, eg. code comments, CI fixes, refactors or tests. Won't have a changelog entry unless you specify one.
|
- `T-Task`: No user-facing changes, eg. code comments, CI fixes, refactors or tests. Won't have a changelog entry unless you specify one.
|
||||||
|
|
||||||
If you don't have permission to add labels, your PR reviewer(s) can work with you
|
If you don't have permission to add labels, your PR reviewer(s) can work with you
|
||||||
to add them: ask in the PR description or comments.
|
to add them: ask in the PR description or comments.
|
||||||
@@ -189,89 +189,6 @@ give away to contributors - if you feel that Matrix-branded apparel is missing
|
|||||||
from your life, please mail us your shipping address to matrix at matrix.org
|
from your life, please mail us your shipping address to matrix at matrix.org
|
||||||
and we'll try to fix it :)
|
and we'll try to fix it :)
|
||||||
|
|
||||||
## Sign off
|
|
||||||
|
|
||||||
In order to have a concrete record that your contribution is intentional
|
|
||||||
and you agree to license it under the same terms as the project's license, we've
|
|
||||||
adopted the same lightweight approach that the Linux Kernel
|
|
||||||
(https://www.kernel.org/doc/html/latest/process/submitting-patches.html), Docker
|
|
||||||
(https://github.com/docker/docker/blob/master/CONTRIBUTING.md), and many other
|
|
||||||
projects use: the DCO (Developer Certificate of Origin:
|
|
||||||
http://developercertificate.org/). This is a simple declaration that you wrote
|
|
||||||
the contribution or otherwise have the right to contribute it to Matrix:
|
|
||||||
|
|
||||||
```
|
|
||||||
Developer Certificate of Origin
|
|
||||||
Version 1.1
|
|
||||||
|
|
||||||
Copyright (C) 2004, 2006 The Linux Foundation and its contributors.
|
|
||||||
660 York Street, Suite 102,
|
|
||||||
San Francisco, CA 94110 USA
|
|
||||||
|
|
||||||
Everyone is permitted to copy and distribute verbatim copies of this
|
|
||||||
license document, but changing it is not allowed.
|
|
||||||
|
|
||||||
Developer's Certificate of Origin 1.1
|
|
||||||
|
|
||||||
By making a contribution to this project, I certify that:
|
|
||||||
|
|
||||||
(a) The contribution was created in whole or in part by me and I
|
|
||||||
have the right to submit it under the open source license
|
|
||||||
indicated in the file; or
|
|
||||||
|
|
||||||
(b) The contribution is based upon previous work that, to the best
|
|
||||||
of my knowledge, is covered under an appropriate open source
|
|
||||||
license and I have the right under that license to submit that
|
|
||||||
work with modifications, whether created in whole or in part
|
|
||||||
by me, under the same open source license (unless I am
|
|
||||||
permitted to submit under a different license), as indicated
|
|
||||||
in the file; or
|
|
||||||
|
|
||||||
(c) The contribution was provided directly to me by some other
|
|
||||||
person who certified (a), (b) or (c) and I have not modified
|
|
||||||
it.
|
|
||||||
|
|
||||||
(d) I understand and agree that this project and the contribution
|
|
||||||
are public and that a record of the contribution (including all
|
|
||||||
personal information I submit with it, including my sign-off) is
|
|
||||||
maintained indefinitely and may be redistributed consistent with
|
|
||||||
this project or the open source license(s) involved.
|
|
||||||
```
|
|
||||||
|
|
||||||
If you agree to this for your contribution, then all that's needed is to
|
|
||||||
include the line in your commit or pull request comment:
|
|
||||||
|
|
||||||
```
|
|
||||||
Signed-off-by: Your Name <your@email.example.org>
|
|
||||||
```
|
|
||||||
|
|
||||||
We accept contributions under a legally identifiable name, such as your name on
|
|
||||||
government documentation or common-law names (names claimed by legitimate usage
|
|
||||||
or repute). Unfortunately, we cannot accept anonymous contributions at this
|
|
||||||
time.
|
|
||||||
|
|
||||||
Git allows you to add this signoff automatically when using the `-s` flag to
|
|
||||||
`git commit`, which uses the name and email set in your `user.name` and
|
|
||||||
`user.email` git configs.
|
|
||||||
|
|
||||||
If you forgot to sign off your commits before making your pull request and are
|
|
||||||
on Git 2.17+ you can mass signoff using rebase:
|
|
||||||
|
|
||||||
```
|
|
||||||
git rebase --signoff origin/develop
|
|
||||||
```
|
|
||||||
|
|
||||||
## Private sign off
|
|
||||||
|
|
||||||
If you would like to provide your legal name privately to the Matrix.org
|
|
||||||
Foundation (instead of in a public commit or comment), you can do so by emailing
|
|
||||||
your legal name and a link to the pull request to dco@matrix.org. It helps to
|
|
||||||
include "sign off" or similar in the subject line. You will then be instructed
|
|
||||||
further.
|
|
||||||
|
|
||||||
Once private sign off is complete, doing so for future contributions will not
|
|
||||||
be required.
|
|
||||||
|
|
||||||
# Review expectations
|
# Review expectations
|
||||||
|
|
||||||
See https://github.com/element-hq/element-meta/wiki/Review-process
|
See https://github.com/element-hq/element-meta/wiki/Review-process
|
||||||
|
|||||||
27
Dockerfile
27
Dockerfile
@@ -1,20 +1,17 @@
|
|||||||
# Builder
|
# Builder
|
||||||
FROM --platform=$BUILDPLATFORM node:22-bullseye as builder
|
FROM --platform=$BUILDPLATFORM node:22-bullseye AS builder
|
||||||
|
|
||||||
# Support custom branch of the js-sdk. This also helps us build images of element-web develop.
|
# Support custom branch of the js-sdk. This also helps us build images of element-web develop.
|
||||||
ARG USE_CUSTOM_SDKS=false
|
ARG USE_CUSTOM_SDKS=false
|
||||||
ARG JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git"
|
ARG JS_SDK_REPO="https://github.com/matrix-org/matrix-js-sdk.git"
|
||||||
ARG JS_SDK_BRANCH="master"
|
ARG JS_SDK_BRANCH="master"
|
||||||
|
|
||||||
RUN apt-get update && apt-get install -y git dos2unix
|
|
||||||
|
|
||||||
WORKDIR /src
|
WORKDIR /src
|
||||||
|
|
||||||
COPY . /src
|
COPY . /src
|
||||||
RUN dos2unix /src/scripts/docker-link-repos.sh && bash /src/scripts/docker-link-repos.sh
|
RUN /src/scripts/docker-link-repos.sh
|
||||||
RUN yarn --network-timeout=200000 install
|
RUN yarn --network-timeout=200000 install
|
||||||
|
RUN /src/scripts/docker-package.sh
|
||||||
RUN dos2unix /src/scripts/docker-package.sh /src/scripts/get-version-from-git.sh /src/scripts/normalize-version.sh && bash /src/scripts/docker-package.sh
|
|
||||||
|
|
||||||
# Copy the config now so that we don't create another layer in the app image
|
# Copy the config now so that we don't create another layer in the app image
|
||||||
RUN cp /src/config.sample.json /src/webapp/config.json
|
RUN cp /src/config.sample.json /src/webapp/config.json
|
||||||
@@ -24,8 +21,22 @@ FROM nginx:alpine-slim
|
|||||||
|
|
||||||
COPY --from=builder /src/webapp /app
|
COPY --from=builder /src/webapp /app
|
||||||
|
|
||||||
# Override default nginx config
|
# Override default nginx config. Templates in `/etc/nginx/templates` are passed
|
||||||
COPY /nginx/conf.d/default.conf /etc/nginx/conf.d/default.conf
|
# through `envsubst` by the nginx docker image entry point.
|
||||||
|
COPY /docker/nginx-templates/* /etc/nginx/templates/
|
||||||
|
|
||||||
|
# Tell nginx to put its pidfile elsewhere, so it can run as non-root
|
||||||
|
RUN sed -i -e 's,/var/run/nginx.pid,/tmp/nginx.pid,' /etc/nginx/nginx.conf
|
||||||
|
|
||||||
|
# nginx user must own the cache and etc directory to write cache and tweak the nginx config
|
||||||
|
RUN chown -R nginx:0 /var/cache/nginx /etc/nginx
|
||||||
|
RUN chmod -R g+w /var/cache/nginx /etc/nginx
|
||||||
|
|
||||||
RUN rm -rf /usr/share/nginx/html \
|
RUN rm -rf /usr/share/nginx/html \
|
||||||
&& ln -s /app /usr/share/nginx/html
|
&& ln -s /app /usr/share/nginx/html
|
||||||
|
|
||||||
|
# Run as nginx user by default
|
||||||
|
USER nginx
|
||||||
|
|
||||||
|
# HTTP listen port
|
||||||
|
ENV ELEMENT_WEB_PORT=80
|
||||||
|
|||||||
6
LICENSE-COMMERCIAL
Normal file
6
LICENSE-COMMERCIAL
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
Licensees holding a valid commercial license with Element may use this
|
||||||
|
software in accordance with the terms contained in a written agreement
|
||||||
|
between you and Element.
|
||||||
|
|
||||||
|
To purchase a commercial license please contact our sales team at
|
||||||
|
licensing@element.io
|
||||||
199
README.md
199
README.md
@@ -16,28 +16,28 @@ JS SDK](https://github.com/matrix-org/matrix-js-sdk).
|
|||||||
|
|
||||||
Element has several tiers of support for different environments:
|
Element has several tiers of support for different environments:
|
||||||
|
|
||||||
- Supported
|
- Supported
|
||||||
- Definition:
|
- Definition:
|
||||||
- Issues **actively triaged**, regressions **block** the release
|
- Issues **actively triaged**, regressions **block** the release
|
||||||
- Last 2 major versions of Chrome, Firefox, and Edge on desktop OSes
|
- Last 2 major versions of Chrome, Firefox, and Edge on desktop OSes
|
||||||
- Last 2 versions of Safari
|
- Last 2 versions of Safari
|
||||||
- Latest release of official Element Desktop app on desktop OSes
|
- Latest release of official Element Desktop app on desktop OSes
|
||||||
- Desktop OSes means macOS, Windows, and Linux versions for desktop devices
|
- Desktop OSes means macOS, Windows, and Linux versions for desktop devices
|
||||||
that are actively supported by the OS vendor and receive security updates
|
that are actively supported by the OS vendor and receive security updates
|
||||||
- Best effort
|
- Best effort
|
||||||
- Definition:
|
- Definition:
|
||||||
- Issues **accepted**, regressions **do not block** the release
|
- Issues **accepted**, regressions **do not block** the release
|
||||||
- The wider Element Products(including Element Call and the Enterprise Server Suite) do still not officially support these browsers.
|
- The wider Element Products(including Element Call and the Enterprise Server Suite) do still not officially support these browsers.
|
||||||
- The element web project and its contributors should keep the client functioning and gracefully degrade where other sibling features (E.g. Element Call) may not function.
|
- The element web project and its contributors should keep the client functioning and gracefully degrade where other sibling features (E.g. Element Call) may not function.
|
||||||
- Last major release of Firefox ESR and Chrome/Edge Extended Stable
|
- Last major release of Firefox ESR and Chrome/Edge Extended Stable
|
||||||
- Community Supported
|
- Community Supported
|
||||||
- Definition:
|
- Definition:
|
||||||
- Issues **accepted**, regressions **do not block** the release
|
- Issues **accepted**, regressions **do not block** the release
|
||||||
- Community contributions are welcome to support these issues
|
- Community contributions are welcome to support these issues
|
||||||
- Mobile web for current stable version of Chrome, Firefox, and Safari on Android, iOS, and iPadOS
|
- Mobile web for current stable version of Chrome, Firefox, and Safari on Android, iOS, and iPadOS
|
||||||
- Not supported
|
- Not supported
|
||||||
- Definition: Issues only affecting unsupported environments are **closed**
|
- Definition: Issues only affecting unsupported environments are **closed**
|
||||||
- Everything else
|
- Everything else
|
||||||
|
|
||||||
The period of support for these tiers should last until the releases specified above, plus 1 app release cycle(2 weeks). In the case of Firefox ESR this is extended further to allow it land in Debian Stable.
|
The period of support for these tiers should last until the releases specified above, plus 1 app release cycle(2 weeks). In the case of Firefox ESR this is extended further to allow it land in Debian Stable.
|
||||||
|
|
||||||
@@ -74,16 +74,16 @@ situation, but it's still not good practice to do it in the first place. See
|
|||||||
Unless you have special requirements, you will want to add the following to
|
Unless you have special requirements, you will want to add the following to
|
||||||
your web server configuration when hosting Element Web:
|
your web server configuration when hosting Element Web:
|
||||||
|
|
||||||
- The `X-Frame-Options: SAMEORIGIN` header, to prevent Element Web from being
|
- The `X-Frame-Options: SAMEORIGIN` header, to prevent Element Web from being
|
||||||
framed and protect from [clickjacking][owasp-clickjacking].
|
framed and protect from [clickjacking][owasp-clickjacking].
|
||||||
- The `frame-ancestors 'self'` directive to your `Content-Security-Policy`
|
- The `frame-ancestors 'self'` directive to your `Content-Security-Policy`
|
||||||
header, as the modern replacement for `X-Frame-Options` (though both should be
|
header, as the modern replacement for `X-Frame-Options` (though both should be
|
||||||
included since not all browsers support it yet, see
|
included since not all browsers support it yet, see
|
||||||
[this][owasp-clickjacking-csp]).
|
[this][owasp-clickjacking-csp]).
|
||||||
- The `X-Content-Type-Options: nosniff` header, to [disable MIME
|
- The `X-Content-Type-Options: nosniff` header, to [disable MIME
|
||||||
sniffing][mime-sniffing].
|
sniffing][mime-sniffing].
|
||||||
- The `X-XSS-Protection: 1; mode=block;` header, for basic XSS protection in
|
- The `X-XSS-Protection: 1; mode=block;` header, for basic XSS protection in
|
||||||
legacy browsers.
|
legacy browsers.
|
||||||
|
|
||||||
[mime-sniffing]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#mime_sniffing
|
[mime-sniffing]: https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types#mime_sniffing
|
||||||
[owasp-clickjacking-csp]: https://cheatsheetseries.owasp.org/cheatsheets/Clickjacking_Defense_Cheat_Sheet.html#content-security-policy-frame-ancestors-examples
|
[owasp-clickjacking-csp]: https://cheatsheetseries.owasp.org/cheatsheets/Clickjacking_Defense_Cheat_Sheet.html#content-security-policy-frame-ancestors-examples
|
||||||
@@ -182,123 +182,11 @@ Dockerfile.
|
|||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|
||||||
Before attempting to develop on Element you **must** read the [developer guide
|
Please read through the following:
|
||||||
for `matrix-react-sdk`](https://github.com/matrix-org/matrix-react-sdk#developer-guide), which
|
|
||||||
also defines the design, architecture and style for Element too.
|
|
||||||
|
|
||||||
Read the [Choosing an issue](docs/choosing-an-issue.md) page for some guidance
|
1. [Developer guide](./developer_guide.md)
|
||||||
about where to start. Before starting work on a feature, it's best to ensure
|
2. [Code style](./code_style.md)
|
||||||
your plan aligns well with our vision for Element. Please chat with the team in
|
3. [Contribution guide](./CONTRIBUTING.md)
|
||||||
[#element-dev:matrix.org](https://matrix.to/#/#element-dev:matrix.org) before
|
|
||||||
you start so we can ensure it's something we'd be willing to merge.
|
|
||||||
|
|
||||||
You should also familiarise yourself with the ["Here be Dragons" guide
|
|
||||||
](https://docs.google.com/document/d/12jYzvkidrp1h7liEuLIe6BMdU0NUjndUYI971O06ooM)
|
|
||||||
to the tame & not-so-tame dragons (gotchas) which exist in the codebase.
|
|
||||||
|
|
||||||
The idea of Element is to be a relatively lightweight "skin" of customisations on
|
|
||||||
top of the underlying `matrix-react-sdk`. `matrix-react-sdk` provides both the
|
|
||||||
higher and lower level React components useful for building Matrix communication
|
|
||||||
apps using React.
|
|
||||||
|
|
||||||
Please note that Element is intended to run correctly without access to the public
|
|
||||||
internet. So please don't depend on resources (JS libs, CSS, images, fonts)
|
|
||||||
hosted by external CDNs or servers but instead please package all dependencies
|
|
||||||
into Element itself.
|
|
||||||
|
|
||||||
# Setting up a dev environment
|
|
||||||
|
|
||||||
Much of the functionality in Element is actually in the `matrix-js-sdk` module.
|
|
||||||
It is possible to set these up in a way that makes it easy to track the `develop` branches
|
|
||||||
in git and to make local changes without having to manually rebuild each time.
|
|
||||||
|
|
||||||
First clone and build `matrix-js-sdk`:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/matrix-org/matrix-js-sdk.git
|
|
||||||
pushd matrix-js-sdk
|
|
||||||
yarn link
|
|
||||||
yarn install
|
|
||||||
popd
|
|
||||||
```
|
|
||||||
|
|
||||||
Clone the repo and switch to the `element-web` directory:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
git clone https://github.com/element-hq/element-web.git
|
|
||||||
cd element-web
|
|
||||||
```
|
|
||||||
|
|
||||||
Configure the app by copying `config.sample.json` to `config.json` and
|
|
||||||
modifying it. See the [configuration docs](docs/config.md) for details.
|
|
||||||
|
|
||||||
Finally, build and start Element itself:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
yarn link matrix-js-sdk
|
|
||||||
yarn install
|
|
||||||
yarn start
|
|
||||||
```
|
|
||||||
|
|
||||||
Wait a few seconds for the initial build to finish; you should see something like:
|
|
||||||
|
|
||||||
```
|
|
||||||
[element-js] <s> [webpack.Progress] 100%
|
|
||||||
[element-js]
|
|
||||||
[element-js] ℹ 「wdm」: 1840 modules
|
|
||||||
[element-js] ℹ 「wdm」: Compiled successfully.
|
|
||||||
```
|
|
||||||
|
|
||||||
Remember, the command will not terminate since it runs the web server
|
|
||||||
and rebuilds source files when they change. This development server also
|
|
||||||
disables caching, so do NOT use it in production.
|
|
||||||
|
|
||||||
Open <http://127.0.0.1:8080/> in your browser to see your newly built Element.
|
|
||||||
|
|
||||||
**Note**: The build script uses inotify by default on Linux to monitor directories
|
|
||||||
for changes. If the inotify limits are too low your build will fail silently or with
|
|
||||||
`Error: EMFILE: too many open files`. To avoid these issues, we recommend a watch limit
|
|
||||||
of at least `128M` and instance limit around `512`.
|
|
||||||
|
|
||||||
You may be interested in issues [#15750](https://github.com/element-hq/element-web/issues/15750) and
|
|
||||||
[#15774](https://github.com/element-hq/element-web/issues/15774) for further details.
|
|
||||||
|
|
||||||
To set a new inotify watch and instance limit, execute:
|
|
||||||
|
|
||||||
```
|
|
||||||
sudo sysctl fs.inotify.max_user_watches=131072
|
|
||||||
sudo sysctl fs.inotify.max_user_instances=512
|
|
||||||
sudo sysctl -p
|
|
||||||
```
|
|
||||||
|
|
||||||
If you wish, you can make the new limits permanent, by executing:
|
|
||||||
|
|
||||||
```
|
|
||||||
echo fs.inotify.max_user_watches=131072 | sudo tee -a /etc/sysctl.conf
|
|
||||||
echo fs.inotify.max_user_instances=512 | sudo tee -a /etc/sysctl.conf
|
|
||||||
sudo sysctl -p
|
|
||||||
```
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
When you make changes to `matrix-js-sdk` they should be automatically picked up by webpack and built.
|
|
||||||
|
|
||||||
If any of these steps error with, `file table overflow`, you are probably on a mac
|
|
||||||
which has a very low limit on max open files. Run `ulimit -Sn 1024` and try again.
|
|
||||||
You'll need to do this in each new terminal you open before building Element.
|
|
||||||
|
|
||||||
## Running the tests
|
|
||||||
|
|
||||||
There are a number of application-level tests in the `tests` directory; these
|
|
||||||
are designed to run with Jest and JSDOM. To run them
|
|
||||||
|
|
||||||
```
|
|
||||||
yarn test
|
|
||||||
```
|
|
||||||
|
|
||||||
### End-to-End tests
|
|
||||||
|
|
||||||
See [matrix-react-sdk](https://github.com/matrix-org/matrix-react-sdk/#end-to-end-tests) for how to run the end-to-end tests.
|
|
||||||
|
|
||||||
# Translations
|
# Translations
|
||||||
|
|
||||||
@@ -311,3 +199,18 @@ For a developer guide, see the [translating dev doc](docs/translating-dev.md).
|
|||||||
Issues are triaged by community members and the Web App Team, following the [triage process](https://github.com/element-hq/element-meta/wiki/Triage-process).
|
Issues are triaged by community members and the Web App Team, following the [triage process](https://github.com/element-hq/element-meta/wiki/Triage-process).
|
||||||
|
|
||||||
We use [issue labels](https://github.com/element-hq/element-meta/wiki/Issue-labelling) to sort all incoming issues.
|
We use [issue labels](https://github.com/element-hq/element-meta/wiki/Issue-labelling) to sort all incoming issues.
|
||||||
|
|
||||||
|
## Copyright & License
|
||||||
|
|
||||||
|
Copyright (c) 2014-2017 OpenMarket Ltd
|
||||||
|
Copyright (c) 2017 Vector Creations Ltd
|
||||||
|
Copyright (c) 2017-2025 New Vector Ltd
|
||||||
|
|
||||||
|
This software is multi licensed by New Vector Ltd (Element). It can be used either:
|
||||||
|
|
||||||
|
(1) for free under the terms of the GNU Affero General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR
|
||||||
|
|
||||||
|
(2) for free under the terms of the GNU General Public License (as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version); OR
|
||||||
|
|
||||||
|
(3) under the terms of a paid-for Element Commercial License agreement between you and Element (the terms of which may vary depending on what you and Element have agreed to).
|
||||||
|
Unless required by applicable law or agreed to in writing, software distributed under the Licenses is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the Licenses for the specific language governing permissions and limitations under the Licenses.
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
// Stub out FontManager for tests as it doesn't validate anything we don't already know given
|
|
||||||
// our fixed test environment and it requires the installation of node-canvas.
|
|
||||||
|
|
||||||
module.exports = {
|
|
||||||
fixupColorFonts: () => Promise.resolve(),
|
|
||||||
};
|
|
||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2022 The Matrix.org Foundation C.I.C.
|
Copyright 2022 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -17,6 +17,7 @@ class MockMap extends EventEmitter {
|
|||||||
setCenter = jest.fn();
|
setCenter = jest.fn();
|
||||||
setStyle = jest.fn();
|
setStyle = jest.fn();
|
||||||
fitBounds = jest.fn();
|
fitBounds = jest.fn();
|
||||||
|
remove = jest.fn();
|
||||||
}
|
}
|
||||||
const MockMapInstance = new MockMap();
|
const MockMapInstance = new MockMap();
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,17 +3,8 @@
|
|||||||
This code style applies to projects which the element-web team directly maintains or is reasonably
|
This code style applies to projects which the element-web team directly maintains or is reasonably
|
||||||
adjacent to. As of writing, these are:
|
adjacent to. As of writing, these are:
|
||||||
|
|
||||||
- element-desktop
|
- element-desktop
|
||||||
- element-web
|
- element-web
|
||||||
- matrix-js-sdk
|
|
||||||
|
|
||||||
Other projects might extend this code style for increased strictness. For example, matrix-events-sdk
|
|
||||||
has stricter code organization to reduce the maintenance burden. These projects will declare their code
|
|
||||||
style within their own repos.
|
|
||||||
|
|
||||||
Note that some requirements will be layer-specific. Where the requirements don't make sense for the
|
|
||||||
project, they are used to the best of their ability, used in spirit, or ignored if not applicable,
|
|
||||||
in that order.
|
|
||||||
|
|
||||||
## Guiding principles
|
## Guiding principles
|
||||||
|
|
||||||
@@ -234,17 +225,19 @@ Unless otherwise specified, the following applies to all code:
|
|||||||
|
|
||||||
Inheriting all the rules of TypeScript, the following additionally apply:
|
Inheriting all the rules of TypeScript, the following additionally apply:
|
||||||
|
|
||||||
1. Types for lifecycle functions are not required (render, componentDidMount, and so on).
|
1. Component source files are named with upper camel case (e.g. views/rooms/EventTile.js)
|
||||||
2. Class components must always have a `Props` interface declared immediately above them. It can be
|
2. They are organised in a typically two-level hierarchy - first whether the component is a view or a structure, and then a broad functional grouping (e.g. 'rooms' here)
|
||||||
|
3. Types for lifecycle functions are not required (render, componentDidMount, and so on).
|
||||||
|
4. Class components must always have a `Props` interface declared immediately above them. It can be
|
||||||
empty if the component accepts no props.
|
empty if the component accepts no props.
|
||||||
3. Class components should have an `State` interface declared immediately above them, but after `Props`.
|
5. Class components should have an `State` interface declared immediately above them, but after `Props`.
|
||||||
4. Props and State should not be exported. Use `React.ComponentProps<typeof ComponentNameHere>`
|
6. Props and State should not be exported. Use `React.ComponentProps<typeof ComponentNameHere>`
|
||||||
instead.
|
instead.
|
||||||
5. One component per file, except when a component is a utility component specifically for the "primary"
|
7. One component per file, except when a component is a utility component specifically for the "primary"
|
||||||
component. The utility component should not be exported.
|
component. The utility component should not be exported.
|
||||||
6. Exported constants, enums, interfaces, functions, etc must be separate from files containing components
|
8. Exported constants, enums, interfaces, functions, etc must be separate from files containing components
|
||||||
or stores.
|
or stores.
|
||||||
7. Stores should use a singleton pattern with a static instance property:
|
9. Stores should use a singleton pattern with a static instance property:
|
||||||
|
|
||||||
```typescript
|
```typescript
|
||||||
class FooStore {
|
class FooStore {
|
||||||
@@ -261,44 +254,41 @@ Inheriting all the rules of TypeScript, the following additionally apply:
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
8. Stores must support using an alternative MatrixClient and dispatcher instance.
|
10. Stores must support using an alternative MatrixClient and dispatcher instance.
|
||||||
9. Utilities which require JSX must be split out from utilities which do not. This is to prevent import
|
11. Utilities which require JSX must be split out from utilities which do not. This is to prevent import
|
||||||
cycles during runtime where components accidentally include more of the app than they intended.
|
cycles during runtime where components accidentally include more of the app than they intended.
|
||||||
10. Interdependence between stores should be kept to a minimum. Break functions and constants out to utilities
|
12. Interdependence between stores should be kept to a minimum. Break functions and constants out to utilities
|
||||||
if at all possible.
|
if at all possible.
|
||||||
11. A component should only use CSS class names in line with the component name.
|
13. A component should only use CSS class names in line with the component name.
|
||||||
|
|
||||||
1. When knowingly using a class name from another component, document it with a [comment](#comments).
|
1. When knowingly using a class name from another component, document it with a [comment](#comments).
|
||||||
|
|
||||||
12. Curly braces within JSX should be padded with a space, however properties on those components should not.
|
14. Curly braces within JSX should be padded with a space, however properties on those components should not.
|
||||||
See above code example.
|
See above code example.
|
||||||
13. Functions used as properties should either be defined on the class or stored in a variable. They should not
|
15. Functions used as properties should either be defined on the class or stored in a variable. They should not
|
||||||
be inline unless mocking/short-circuiting the value.
|
be inline unless mocking/short-circuiting the value.
|
||||||
14. Prefer hooks (functional components) over class components. Be consistent with the existing area if unsure
|
16. Prefer hooks (functional components) over class components. Be consistent with the existing area if unsure
|
||||||
which should be used.
|
which should be used.
|
||||||
1. Unless the component is considered a "structure", in which case use classes.
|
1. Unless the component is considered a "structure", in which case use classes.
|
||||||
15. Write more views than structures. Structures are chunks of functionality like MatrixChat while views are
|
17. Write more views than structures. Structures are chunks of functionality like MatrixChat while views are
|
||||||
isolated components.
|
isolated components.
|
||||||
16. Components should serve a single, or near-single, purpose.
|
18. Components should serve a single, or near-single, purpose.
|
||||||
17. Prefer to derive information from component properties rather than establish state.
|
19. Prefer to derive information from component properties rather than establish state.
|
||||||
18. Do not use `React.Component::forceUpdate`.
|
20. Do not use `React.Component::forceUpdate`.
|
||||||
|
|
||||||
## Stylesheets (\*.pcss = PostCSS + Plugins)
|
## Stylesheets (\*.pcss = PostCSS + Plugins)
|
||||||
|
|
||||||
Note: We use PostCSS + some plugins to process our styles. It looks like SCSS, but actually it is not.
|
Note: We use PostCSS + some plugins to process our styles. It looks like SCSS, but actually it is not.
|
||||||
|
|
||||||
1. Class names must be prefixed with "mx\_".
|
1. The view's CSS file MUST have the same name as the component (e.g. `view/rooms/_MessageTile.css` for `MessageTile.tsx` component).
|
||||||
2. Class names must denote the component which defines them, followed by any context.
|
2. Per-view CSS is optional - it could choose to inherit all its styling from the context of the rest of the app, although this is unusual.
|
||||||
The context is not further specified here in terms of meaning or syntax.
|
3. Class names must be prefixed with "mx\_".
|
||||||
Use whatever is appropriate for your implementation use case.
|
4. Class names must strictly denote the component which defines them.
|
||||||
Some examples:
|
For example: `mx_MyFoo` for `MyFoo` component.
|
||||||
1. `mx_MyFoo`
|
5. Class names for DOM elements within a view which aren't components are named by appending a lower camel case identifier to the view's class name - e.g. .mx_MyFoo_randomDiv is how you'd name the class of an arbitrary div within the MyFoo view.
|
||||||
2. `mx_MyFoo_avatar`
|
6. Use the `$font` variables instead of manual values.
|
||||||
3. `mx_MyFoo_avatarUser`
|
7. Keep indentation/nesting to a minimum. Maximum suggested nesting is 5 layers.
|
||||||
4. `mx_MyFoo_avatar--user`
|
8. Use the whole class name instead of shortcuts:
|
||||||
3. Use the `$font` variables instead of manual values.
|
|
||||||
4. Keep indentation/nesting to a minimum. Maximum suggested nesting is 5 layers.
|
|
||||||
5. Use the whole class name instead of shortcuts:
|
|
||||||
|
|
||||||
```scss
|
```scss
|
||||||
.mx_MyFoo {
|
.mx_MyFoo {
|
||||||
@@ -309,7 +299,7 @@ Note: We use PostCSS + some plugins to process our styles. It looks like SCSS, b
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
6. Break multiple selectors over multiple lines this way:
|
9. Break multiple selectors over multiple lines this way:
|
||||||
|
|
||||||
```scss
|
```scss
|
||||||
.mx_MyFoo,
|
.mx_MyFoo,
|
||||||
@@ -319,9 +309,9 @@ Note: We use PostCSS + some plugins to process our styles. It looks like SCSS, b
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
7. Non-shared variables should use $lowerCamelCase. Shared variables use $dashed-naming.
|
10. Non-shared variables should use $lowerCamelCase. Shared variables use $dashed-naming.
|
||||||
8. Overrides to Z indexes, adjustments of dimensions/padding with pixels, and so on should all be
|
11. Overrides to Z indexes, adjustments of dimensions/padding with pixels, and so on should all be
|
||||||
[documented](#comments) for what the values mean:
|
[documented](#comments) for what the values mean:
|
||||||
|
|
||||||
```scss
|
```scss
|
||||||
.mx_MyFoo {
|
.mx_MyFoo {
|
||||||
@@ -331,7 +321,9 @@ Note: We use PostCSS + some plugins to process our styles. It looks like SCSS, b
|
|||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
9. Avoid the use of `!important`. If `!important` is necessary, add a [comment](#comments) explaining why.
|
12. Avoid the use of `!important`. If `!important` is necessary, add a [comment](#comments) explaining why.
|
||||||
|
13. The CSS for a component can override the rules for child components. For instance, .mxRoomList .mx_RoomTile {} would be the selector to override styles of RoomTiles when viewed in the context of a RoomList view. Overrides must be scoped to the View's CSS class - i.e. don't just define .mx_RoomTile {} in RoomList.css - only RoomTile.css is allowed to define its own CSS. Instead, say .mx_RoomList .mx_RoomTile {} to scope the override only to the context of RoomList views. N.B. overrides should be relatively rare as in general CSS inheritance should be enough.
|
||||||
|
14. Components should render only within the bounding box of their outermost DOM element. Page-absolute positioning and negative CSS margins and similar are generally not cool and stop the component from being reused easily in different places.
|
||||||
|
|
||||||
## Tests
|
## Tests
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1 @@
|
|||||||
{
|
{}
|
||||||
"src/components/views/auth/AuthFooter.tsx": "src/components/views/auth/VectorAuthFooter.tsx",
|
|
||||||
"src/components/views/auth/AuthHeaderLogo.tsx": "src/components/views/auth/VectorAuthHeaderLogo.tsx",
|
|
||||||
"src/components/views/auth/AuthPage.tsx": "src/components/views/auth/VectorAuthPage.tsx"
|
|
||||||
}
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@
|
|||||||
"description": "A glossy Matrix collaboration client for the web.",
|
"description": "A glossy Matrix collaboration client for the web.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"url": "https://github.com/element-hq/element-web",
|
"url": "https://github.com/element-hq/element-web",
|
||||||
"license": "AGPL-3.0-only OR GPL-3.0-only"
|
"license": "AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial"
|
||||||
},
|
},
|
||||||
"bugs": {
|
"bugs": {
|
||||||
"list": "https://github.com/element-hq/element-web/issues",
|
"list": "https://github.com/element-hq/element-web/issues",
|
||||||
|
|||||||
2
debian/control
vendored
2
debian/control
vendored
@@ -8,6 +8,6 @@ Package: element-web
|
|||||||
Architecture: all
|
Architecture: all
|
||||||
Recommends: httpd, element-io-archive-keyring
|
Recommends: httpd, element-io-archive-keyring
|
||||||
Description:
|
Description:
|
||||||
A feature-rich client for Matrix.org
|
Element: the future of secure communication
|
||||||
This package contains the web-based client that can be served through a web
|
This package contains the web-based client that can be served through a web
|
||||||
server.
|
server.
|
||||||
|
|||||||
126
developer_guide.md
Normal file
126
developer_guide.md
Normal file
@@ -0,0 +1,126 @@
|
|||||||
|
# Developer Guide
|
||||||
|
|
||||||
|
## Development
|
||||||
|
|
||||||
|
Read the [Choosing an issue](docs/choosing-an-issue.md) page for some guidance
|
||||||
|
about where to start. Before starting work on a feature, it's best to ensure
|
||||||
|
your plan aligns well with our vision for Element. Please chat with the team in
|
||||||
|
[#element-dev:matrix.org](https://matrix.to/#/#element-dev:matrix.org) before
|
||||||
|
you start so we can ensure it's something we'd be willing to merge.
|
||||||
|
|
||||||
|
You should also familiarise yourself with the ["Here be Dragons" guide
|
||||||
|
](https://docs.google.com/document/d/12jYzvkidrp1h7liEuLIe6BMdU0NUjndUYI971O06ooM)
|
||||||
|
to the tame & not-so-tame dragons (gotchas) which exist in the codebase.
|
||||||
|
|
||||||
|
Please note that Element is intended to run correctly without access to the public
|
||||||
|
internet. So please don't depend on resources (JS libs, CSS, images, fonts)
|
||||||
|
hosted by external CDNs or servers but instead please package all dependencies
|
||||||
|
into Element itself.
|
||||||
|
|
||||||
|
## Setting up a dev environment
|
||||||
|
|
||||||
|
Much of the functionality in Element is actually in the `matrix-js-sdk` module.
|
||||||
|
It is possible to set these up in a way that makes it easy to track the `develop` branches
|
||||||
|
in git and to make local changes without having to manually rebuild each time.
|
||||||
|
|
||||||
|
First clone and build `matrix-js-sdk`:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/matrix-org/matrix-js-sdk.git
|
||||||
|
pushd matrix-js-sdk
|
||||||
|
yarn link
|
||||||
|
yarn install
|
||||||
|
popd
|
||||||
|
```
|
||||||
|
|
||||||
|
Clone the repo and switch to the `element-web` directory:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git clone https://github.com/element-hq/element-web.git
|
||||||
|
cd element-web
|
||||||
|
```
|
||||||
|
|
||||||
|
Configure the app by copying `config.sample.json` to `config.json` and
|
||||||
|
modifying it. See the [configuration docs](docs/config.md) for details.
|
||||||
|
|
||||||
|
Finally, build and start Element itself:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
yarn link matrix-js-sdk
|
||||||
|
yarn install
|
||||||
|
yarn start
|
||||||
|
```
|
||||||
|
|
||||||
|
Wait a few seconds for the initial build to finish; you should see something like:
|
||||||
|
|
||||||
|
```
|
||||||
|
[element-js] <s> [webpack.Progress] 100%
|
||||||
|
[element-js]
|
||||||
|
[element-js] ℹ 「wdm」: 1840 modules
|
||||||
|
[element-js] ℹ 「wdm」: Compiled successfully.
|
||||||
|
```
|
||||||
|
|
||||||
|
Remember, the command will not terminate since it runs the web server
|
||||||
|
and rebuilds source files when they change. This development server also
|
||||||
|
disables caching, so do NOT use it in production.
|
||||||
|
|
||||||
|
Open <http://127.0.0.1:8080/> in your browser to see your newly built Element.
|
||||||
|
|
||||||
|
**Note**: The build script uses inotify by default on Linux to monitor directories
|
||||||
|
for changes. If the inotify limits are too low your build will fail silently or with
|
||||||
|
`Error: EMFILE: too many open files`. To avoid these issues, we recommend a watch limit
|
||||||
|
of at least `128M` and instance limit around `512`.
|
||||||
|
|
||||||
|
You may be interested in issues [#15750](https://github.com/element-hq/element-web/issues/15750) and
|
||||||
|
[#15774](https://github.com/element-hq/element-web/issues/15774) for further details.
|
||||||
|
|
||||||
|
To set a new inotify watch and instance limit, execute:
|
||||||
|
|
||||||
|
```
|
||||||
|
sudo sysctl fs.inotify.max_user_watches=131072
|
||||||
|
sudo sysctl fs.inotify.max_user_instances=512
|
||||||
|
sudo sysctl -p
|
||||||
|
```
|
||||||
|
|
||||||
|
If you wish, you can make the new limits permanent, by executing:
|
||||||
|
|
||||||
|
```
|
||||||
|
echo fs.inotify.max_user_watches=131072 | sudo tee -a /etc/sysctl.conf
|
||||||
|
echo fs.inotify.max_user_instances=512 | sudo tee -a /etc/sysctl.conf
|
||||||
|
sudo sysctl -p
|
||||||
|
```
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
When you make changes to `matrix-js-sdk` they should be automatically picked up by webpack and built.
|
||||||
|
|
||||||
|
If any of these steps error with, `file table overflow`, you are probably on a mac
|
||||||
|
which has a very low limit on max open files. Run `ulimit -Sn 1024` and try again.
|
||||||
|
You'll need to do this in each new terminal you open before building Element.
|
||||||
|
|
||||||
|
## Running the tests
|
||||||
|
|
||||||
|
There are a number of application-level tests in the `tests` directory; these
|
||||||
|
are designed to run with Jest and JSDOM. To run them
|
||||||
|
|
||||||
|
```
|
||||||
|
yarn test
|
||||||
|
```
|
||||||
|
|
||||||
|
### End-to-End tests
|
||||||
|
|
||||||
|
See [matrix-react-sdk](https://github.com/matrix-org/matrix-react-sdk/#end-to-end-tests) for how to run the end-to-end tests.
|
||||||
|
|
||||||
|
## General github guidelines
|
||||||
|
|
||||||
|
1. **Pull requests must only be filed against the `develop` branch.**
|
||||||
|
2. Try to keep your pull requests concise. Split them up if necessary.
|
||||||
|
3. Ensure that you provide a description that explains the fix/feature and its intent.
|
||||||
|
|
||||||
|
## Adding new code
|
||||||
|
|
||||||
|
New code should be committed as follows:
|
||||||
|
|
||||||
|
- All new components: https://github.com/element-hq/element-web/tree/develop/src/components
|
||||||
|
- CSS: https://github.com/element-hq/element-web/tree/develop/res/css
|
||||||
|
- Theme specific CSS & resources: https://github.com/element-hq/element-web/tree/develop/res/themes
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
server {
|
server {
|
||||||
listen 80;
|
listen ${ELEMENT_WEB_PORT};
|
||||||
listen [::]:80;
|
listen [::]:${ELEMENT_WEB_PORT};
|
||||||
server_name localhost;
|
server_name localhost;
|
||||||
|
|
||||||
root /usr/share/nginx/html;
|
root /usr/share/nginx/html;
|
||||||
67
docs/MVVM.md
Normal file
67
docs/MVVM.md
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
# MVVM
|
||||||
|
|
||||||
|
General description of the pattern can be found [here](https://en.wikipedia.org/wiki/Model%E2%80%93view%E2%80%93viewmodel). But the gist of it is that you divide your code into three sections:
|
||||||
|
|
||||||
|
1. Model: This is where the business logic and data resides.
|
||||||
|
2. View Model: This code exists to provide the logic necessary for the UI. It directly uses the Model code.
|
||||||
|
3. View: This is the UI code itself and depends on the view model.
|
||||||
|
|
||||||
|
If you do MVVM right, your view should be dumb i.e it gets data from the view model and merely displays it.
|
||||||
|
|
||||||
|
### Practical guidelines for MVVM in element-web
|
||||||
|
|
||||||
|
#### Model
|
||||||
|
|
||||||
|
This is anywhere your data or business logic comes from. If your view model is accessing something simple exposed from `matrix-js-sdk`, then the sdk is your model. If you're using something more high level in element-web to get your data/logic (eg: `MemberListStore`), then that becomes your model.
|
||||||
|
|
||||||
|
#### View Model
|
||||||
|
|
||||||
|
1. View model is always a custom react hook named like `useFooViewModel()`.
|
||||||
|
2. The return type of your view model (known as view state) must be defined as a typescript interface:
|
||||||
|
```ts
|
||||||
|
inteface FooViewState {
|
||||||
|
somethingUseful: string;
|
||||||
|
somethingElse: BarType;
|
||||||
|
update: () => Promise<void>
|
||||||
|
...
|
||||||
|
}
|
||||||
|
```
|
||||||
|
3. Any react state that your UI needs must be in the view model.
|
||||||
|
|
||||||
|
#### View
|
||||||
|
|
||||||
|
1. Views are simple react components (eg: `FooView`).
|
||||||
|
2. Views usually start by calling the view model hook, eg:
|
||||||
|
```tsx
|
||||||
|
const FooView: React.FC<IProps> = (props: IProps) => {
|
||||||
|
const vm = useFooViewModel();
|
||||||
|
....
|
||||||
|
return(
|
||||||
|
<div>
|
||||||
|
{vm.somethingUseful}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
3. Views are also allowed to accept the view model as a prop, eg:
|
||||||
|
```tsx
|
||||||
|
const FooView: React.FC<IProps> = ({ vm }: IProps) => {
|
||||||
|
....
|
||||||
|
return(
|
||||||
|
<div>
|
||||||
|
{vm.somethingUseful}
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
|
```
|
||||||
|
4. Multiple views can share the same view model if necessary.
|
||||||
|
|
||||||
|
### Benefits
|
||||||
|
|
||||||
|
1. MVVM forces a separation of concern i.e we will no longer have large react components that have a lot of state and rendering code mixed together. This improves code readability and makes it easier to introduce changes.
|
||||||
|
2. Introduces the possibility of code reuse. You can reuse an old view model with a new view or vice versa.
|
||||||
|
3. Adding to the point above, in future you could import element-web view models to your project and supply your own views thus creating something similar to the [hydrogen sdk](https://github.com/element-hq/hydrogen-web/blob/master/doc/SDK.md).
|
||||||
|
|
||||||
|
### Example
|
||||||
|
|
||||||
|
We started experimenting with MVVM in the redesigned memberlist, you can see the code [here](https://github.com/vector-im/element-web/blob/develop/src/components/views/rooms/MemberList/MemberListView.tsx).
|
||||||
@@ -1,55 +1,55 @@
|
|||||||
# Summary
|
# Summary
|
||||||
|
|
||||||
- [Introduction](../README.md)
|
- [Introduction](../README.md)
|
||||||
|
|
||||||
# Usage
|
# Usage
|
||||||
|
|
||||||
- [Betas](betas.md)
|
- [Betas](betas.md)
|
||||||
- [Labs](labs.md)
|
- [Labs](labs.md)
|
||||||
|
|
||||||
# Setup
|
# Setup
|
||||||
|
|
||||||
- [Install](install.md)
|
- [Install](install.md)
|
||||||
- [Config](config.md)
|
- [Config](config.md)
|
||||||
- [Custom home page](custom-home.md)
|
- [Custom home page](custom-home.md)
|
||||||
- [Kubernetes](kubernetes.md)
|
- [Kubernetes](kubernetes.md)
|
||||||
- [Jitsi](jitsi.md)
|
- [Jitsi](jitsi.md)
|
||||||
- [Encryption](e2ee.md)
|
- [Encryption](e2ee.md)
|
||||||
|
|
||||||
# Build
|
# Build
|
||||||
|
|
||||||
- [Customisations](customisations.md)
|
- [Customisations](customisations.md)
|
||||||
- [Modules](modules.md)
|
- [Modules](modules.md)
|
||||||
- [Native Node modules](native-node-modules.md)
|
- [Native Node modules](native-node-modules.md)
|
||||||
|
|
||||||
# Contribution
|
# Contribution
|
||||||
|
|
||||||
- [Choosing an issue](choosing-an-issue.md)
|
- [Choosing an issue](choosing-an-issue.md)
|
||||||
- [Translation](translating.md)
|
- [Translation](translating.md)
|
||||||
- [Netlify builds](pr-previews.md)
|
- [Netlify builds](pr-previews.md)
|
||||||
- [Code review](review.md)
|
- [Code review](review.md)
|
||||||
|
|
||||||
# Development
|
# Development
|
||||||
|
|
||||||
- [App load order](app-load.md)
|
- [App load order](app-load.md)
|
||||||
- [Translation](translating-dev.md)
|
- [Translation](translating-dev.md)
|
||||||
- [Theming](theming.md)
|
- [Theming](theming.md)
|
||||||
- [Playwright end to end tests](playwright.md)
|
- [Playwright end to end tests](playwright.md)
|
||||||
- [Memory profiling](memory-profiles-and-leaks.md)
|
- [Memory profiling](memory-profiles-and-leaks.md)
|
||||||
- [Jitsi](jitsi-dev.md)
|
- [Jitsi](jitsi-dev.md)
|
||||||
- [Feature flags](feature-flags.md)
|
- [Feature flags](feature-flags.md)
|
||||||
- [OIDC and delegated authentication](oidc.md)
|
- [OIDC and delegated authentication](oidc.md)
|
||||||
- [Release Process](release.md)
|
- [Release Process](release.md)
|
||||||
|
|
||||||
# Deep dive
|
# Deep dive
|
||||||
|
|
||||||
- [Skinning](skinning.md)
|
- [Skinning](skinning.md)
|
||||||
- [Cider editor](ciderEditor.md)
|
- [Cider editor](ciderEditor.md)
|
||||||
- [Iconography](icons.md)
|
- [Iconography](icons.md)
|
||||||
- [Jitsi](jitsi.md)
|
- [Jitsi](jitsi.md)
|
||||||
- [Local echo](local-echo-dev.md)
|
- [Local echo](local-echo-dev.md)
|
||||||
- [Media](media-handling.md)
|
- [Media](media-handling.md)
|
||||||
- [Room List Store](room-list-store.md)
|
- [Room List Store](room-list-store.md)
|
||||||
- [Scrolling](scrolling.md)
|
- [Scrolling](scrolling.md)
|
||||||
- [Usercontent](usercontent.md)
|
- [Usercontent](usercontent.md)
|
||||||
- [Widget layouts](widget-layouts.md)
|
- [Widget layouts](widget-layouts.md)
|
||||||
|
|||||||
@@ -61,18 +61,18 @@ flowchart TD
|
|||||||
|
|
||||||
Key:
|
Key:
|
||||||
|
|
||||||
- Parallelogram: async/await task
|
- Parallelogram: async/await task
|
||||||
- Box: sync task
|
- Box: sync task
|
||||||
- Diamond: conditional branch
|
- Diamond: conditional branch
|
||||||
- Circle: user interaction
|
- Circle: user interaction
|
||||||
- Blue arrow: async task is allowed to settle but allowed to fail
|
- Blue arrow: async task is allowed to settle but allowed to fail
|
||||||
- Red arrow: async task success is asserted
|
- Red arrow: async task success is asserted
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|
||||||
- A task begins when all its dependencies (arrows going into it) are fulfilled.
|
- A task begins when all its dependencies (arrows going into it) are fulfilled.
|
||||||
- The success of setting up rageshake is never asserted, element-web has a fallback path for running without IDB (and thus rageshake).
|
- The success of setting up rageshake is never asserted, element-web has a fallback path for running without IDB (and thus rageshake).
|
||||||
- Everything is awaited to be settled before the Modernizr check, to allow it to make use of things like i18n if they are successful.
|
- Everything is awaited to be settled before the Modernizr check, to allow it to make use of things like i18n if they are successful.
|
||||||
|
|
||||||
Underlying dependencies:
|
Underlying dependencies:
|
||||||
|
|
||||||
|
|||||||
@@ -32,19 +32,19 @@ someone to add something.
|
|||||||
When you're looking through the list, here are some things that might make an
|
When you're looking through the list, here are some things that might make an
|
||||||
issue a **GOOD** choice:
|
issue a **GOOD** choice:
|
||||||
|
|
||||||
- It is a problem or feature you care about.
|
- It is a problem or feature you care about.
|
||||||
- It concerns a type of code you know a little about.
|
- It concerns a type of code you know a little about.
|
||||||
- You think you can understand what's needed.
|
- You think you can understand what's needed.
|
||||||
- It already has approval from Element Web's designers (look for comments from
|
- It already has approval from Element Web's designers (look for comments from
|
||||||
members of the
|
members of the
|
||||||
[Product](https://github.com/orgs/element-hq/teams/product/members) or
|
[Product](https://github.com/orgs/element-hq/teams/product/members) or
|
||||||
[Design](https://github.com/orgs/element-hq/teams/design/members) teams).
|
[Design](https://github.com/orgs/element-hq/teams/design/members) teams).
|
||||||
|
|
||||||
Here are some things that might make it a **BAD** choice:
|
Here are some things that might make it a **BAD** choice:
|
||||||
|
|
||||||
- You don't understand it (maybe add a comment asking a clarifying question).
|
- You don't understand it (maybe add a comment asking a clarifying question).
|
||||||
- It sounds difficult, or is part of a larger change you don't know about.
|
- It sounds difficult, or is part of a larger change you don't know about.
|
||||||
- **It is tagged with `X-Needs-Design` or `X-Needs-Product`.**
|
- **It is tagged with `X-Needs-Design` or `X-Needs-Product`.**
|
||||||
|
|
||||||
**Element Web's Design and Product teams tend to be very busy**, so if you make
|
**Element Web's Design and Product teams tend to be very busy**, so if you make
|
||||||
changes that require approval from one of those teams, you will probably have
|
changes that require approval from one of those teams, you will probably have
|
||||||
|
|||||||
@@ -155,7 +155,7 @@ complete re-branding/private labeling, a more personalised experience can be ach
|
|||||||
3. `show_once`: Optional. If true then the notice will only be shown once per device.
|
3. `show_once`: Optional. If true then the notice will only be shown once per device.
|
||||||
18. `help_url`: The URL to point users to for help with the app, defaults to `https://element.io/help`.
|
18. `help_url`: The URL to point users to for help with the app, defaults to `https://element.io/help`.
|
||||||
19. `help_encryption_url`: The URL to point users to for help with encryption, defaults to `https://element.io/help#encryption`.
|
19. `help_encryption_url`: The URL to point users to for help with encryption, defaults to `https://element.io/help#encryption`.
|
||||||
20. `force_verification`: If true, users must verify new logins (eg. with another device / their security key)
|
20. `force_verification`: If true, users must verify new logins (eg. with another device / their recovery key)
|
||||||
|
|
||||||
### `desktop_builds` and `mobile_builds`
|
### `desktop_builds` and `mobile_builds`
|
||||||
|
|
||||||
@@ -163,14 +163,14 @@ These two options describe the various availability for the application. When th
|
|||||||
such as trying to get the user to use an Android app or the desktop app for encrypted search, the config options will be looked
|
such as trying to get the user to use an Android app or the desktop app for encrypted search, the config options will be looked
|
||||||
at to see if the link should be to somewhere else.
|
at to see if the link should be to somewhere else.
|
||||||
|
|
||||||
Starting with `desktop_builds`, the following subproperties are available:
|
Starting with `desktop_builds`, the following sub-properties are available:
|
||||||
|
|
||||||
1. `available`: Required. When `true`, the desktop app can be downloaded from somewhere.
|
1. `available`: Required. When `true`, the desktop app can be downloaded from somewhere.
|
||||||
2. `logo`: Required. A URL to a logo (SVG), intended to be shown at 24x24 pixels.
|
2. `logo`: Required. A URL to a logo (SVG), intended to be shown at 24x24 pixels.
|
||||||
3. `url`: Required. The download URL for the app. This is used as a hyperlink.
|
3. `url`: Required. The download URL for the app. This is used as a hyperlink.
|
||||||
4. `url_macos`: Optional. Direct link to download macOS desktop app.
|
4. `url_macos`: Optional. Direct link to download macOS desktop app.
|
||||||
5. `url_win32`: Optional. Direct link to download Windows 32-bit desktop app.
|
5. `url_win64`: Optional. Direct link to download Windows x86 64-bit desktop app.
|
||||||
6. `url_win64`: Optional. Direct link to download Windows 64-bit desktop app.
|
6. `url_win64arm`: Optional. Direct link to download Windows ARM 64-bit desktop app.
|
||||||
7. `url_linux`: Optional. Direct link to download Linux desktop app.
|
7. `url_linux`: Optional. Direct link to download Linux desktop app.
|
||||||
|
|
||||||
When `desktop_builds` is not specified at all, the app will assume desktop downloads are available from https://element.io
|
When `desktop_builds` is not specified at all, the app will assume desktop downloads are available from https://element.io
|
||||||
@@ -455,7 +455,7 @@ If you would like to use Scalar, the integration manager maintained by Element,
|
|||||||
|
|
||||||
For widgets in general (from an integration manager or not) there is also:
|
For widgets in general (from an integration manager or not) there is also:
|
||||||
|
|
||||||
- `default_widget_container_height`
|
- `default_widget_container_height`
|
||||||
|
|
||||||
This controls the height that the top widget panel initially appears as and is the height in pixels, default 280.
|
This controls the height that the top widget panel initially appears as and is the height in pixels, default 280.
|
||||||
|
|
||||||
@@ -551,38 +551,38 @@ preferences.
|
|||||||
|
|
||||||
Currently, the following UI feature flags are supported:
|
Currently, the following UI feature flags are supported:
|
||||||
|
|
||||||
- `UIFeature.urlPreviews` - Whether URL previews are enabled across the entire application.
|
- `UIFeature.urlPreviews` - Whether URL previews are enabled across the entire application.
|
||||||
- `UIFeature.feedback` - Whether prompts to supply feedback are shown.
|
- `UIFeature.feedback` - Whether prompts to supply feedback are shown.
|
||||||
- `UIFeature.voip` - Whether or not VoIP is shown readily to the user. When disabled,
|
- `UIFeature.voip` - Whether or not VoIP is shown readily to the user. When disabled,
|
||||||
Jitsi widgets will still work though they cannot easily be added.
|
Jitsi widgets will still work though they cannot easily be added.
|
||||||
- `UIFeature.widgets` - Whether or not widgets will be shown.
|
- `UIFeature.widgets` - Whether or not widgets will be shown.
|
||||||
- `UIFeature.advancedSettings` - Whether or not sections titled "advanced" in room and
|
- `UIFeature.advancedSettings` - Whether or not sections titled "advanced" in room and
|
||||||
user settings are shown to the user.
|
user settings are shown to the user.
|
||||||
- `UIFeature.shareQrCode` - Whether or not the QR code on the share room/event dialog
|
- `UIFeature.shareQrCode` - Whether or not the QR code on the share room/event dialog
|
||||||
is shown.
|
is shown.
|
||||||
- `UIFeature.shareSocial` - Whether or not the social icons on the share room/event dialog
|
- `UIFeature.shareSocial` - Whether or not the social icons on the share room/event dialog
|
||||||
are shown.
|
are shown.
|
||||||
- `UIFeature.identityServer` - Whether or not functionality requiring an identity server
|
- `UIFeature.identityServer` - Whether or not functionality requiring an identity server
|
||||||
is shown. When disabled, the user will not be able to interact with the identity
|
is shown. When disabled, the user will not be able to interact with the identity
|
||||||
server (sharing email addresses, 3PID invites, etc).
|
server (sharing email addresses, 3PID invites, etc).
|
||||||
- `UIFeature.thirdPartyId` - Whether or not UI relating to third party identifiers (3PIDs)
|
- `UIFeature.thirdPartyId` - Whether or not UI relating to third party identifiers (3PIDs)
|
||||||
is shown. Typically this is considered "contact information" on the homeserver, and is
|
is shown. Typically this is considered "contact information" on the homeserver, and is
|
||||||
not directly related to the identity server.
|
not directly related to the identity server.
|
||||||
- `UIFeature.registration` - Whether or not the registration page is accessible. Typically
|
- `UIFeature.registration` - Whether or not the registration page is accessible. Typically
|
||||||
useful if accounts are managed externally.
|
useful if accounts are managed externally.
|
||||||
- `UIFeature.passwordReset` - Whether or not the password reset page is accessible. Typically
|
- `UIFeature.passwordReset` - Whether or not the password reset page is accessible. Typically
|
||||||
useful if accounts are managed externally.
|
useful if accounts are managed externally.
|
||||||
- `UIFeature.deactivate` - Whether or not the deactivate account button is accessible. Typically
|
- `UIFeature.deactivate` - Whether or not the deactivate account button is accessible. Typically
|
||||||
useful if accounts are managed externally.
|
useful if accounts are managed externally.
|
||||||
- `UIFeature.advancedEncryption` - Whether or not advanced encryption options are shown to the
|
- `UIFeature.advancedEncryption` - Whether or not advanced encryption options are shown to the
|
||||||
user.
|
user.
|
||||||
- `UIFeature.roomHistorySettings` - Whether or not the room history settings are shown to the user.
|
- `UIFeature.roomHistorySettings` - Whether or not the room history settings are shown to the user.
|
||||||
This should only be used if the room history visibility options are managed by the server.
|
This should only be used if the room history visibility options are managed by the server.
|
||||||
- `UIFeature.TimelineEnableRelativeDates` - Display relative date separators (eg: 'Today', 'Yesterday') in the
|
- `UIFeature.TimelineEnableRelativeDates` - Display relative date separators (eg: 'Today', 'Yesterday') in the
|
||||||
timeline for recent messages. When false day dates will be used.
|
timeline for recent messages. When false day dates will be used.
|
||||||
- `UIFeature.BulkUnverifiedSessionsReminder` - Display popup reminders to verify or remove unverified sessions. Defaults
|
- `UIFeature.BulkUnverifiedSessionsReminder` - Display popup reminders to verify or remove unverified sessions. Defaults
|
||||||
to true.
|
to true.
|
||||||
- `UIFeature.locationSharing` - Whether or not location sharing menus will be shown.
|
- `UIFeature.locationSharing` - Whether or not location sharing menus will be shown.
|
||||||
|
|
||||||
## Undocumented / developer options
|
## Undocumented / developer options
|
||||||
|
|
||||||
@@ -592,4 +592,4 @@ The following are undocumented or intended for developer use only.
|
|||||||
2. `sync_timeline_limit`
|
2. `sync_timeline_limit`
|
||||||
3. `dangerously_allow_unsafe_and_insecure_passwords`
|
3. `dangerously_allow_unsafe_and_insecure_passwords`
|
||||||
4. `latex_maths_delims`: An optional setting to override the default delimiters used for maths parsing. See https://github.com/matrix-org/matrix-react-sdk/pull/5939 for details. Only used when `feature_latex_maths` is enabled.
|
4. `latex_maths_delims`: An optional setting to override the default delimiters used for maths parsing. See https://github.com/matrix-org/matrix-react-sdk/pull/5939 for details. Only used when `feature_latex_maths` is enabled.
|
||||||
5. `voice_broadcast.chunk_length`: Target chunk length in seconds for the Voice Broadcast feature currently under development.
|
5. `modules`: An optional list of modules to load. This is used for testing and development purposes only.
|
||||||
|
|||||||
@@ -11,8 +11,8 @@ Customisations will be removed from the codebase in a future release.
|
|||||||
Element Web and the React SDK support "customisation points" that can be used to
|
Element Web and the React SDK support "customisation points" that can be used to
|
||||||
easily add custom logic specific to a particular deployment of Element Web.
|
easily add custom logic specific to a particular deployment of Element Web.
|
||||||
|
|
||||||
An example of this is the [security customisations
|
An example of this is the [media customisations
|
||||||
module](https://github.com/element-hq/element-web/blob/develop/src/customisations/Security.ts).
|
module](https://github.com/element-hq/element-web/blob/develop/src/customisations/Media.ts).
|
||||||
This module in the React SDK only defines some empty functions and their types:
|
This module in the React SDK only defines some empty functions and their types:
|
||||||
it does not do anything by default.
|
it does not do anything by default.
|
||||||
|
|
||||||
@@ -21,14 +21,14 @@ Web so that you can add your own code. Even though the default module is part of
|
|||||||
the React SDK, you can still override it from the Element Web layer:
|
the React SDK, you can still override it from the Element Web layer:
|
||||||
|
|
||||||
1. Copy the default customisation module to
|
1. Copy the default customisation module to
|
||||||
`element-web/src/customisations/YourNameSecurity.ts`
|
`element-web/src/customisations/YourNameMedia.ts`
|
||||||
2. Edit customisations points and make sure export the ones you actually want to
|
2. Edit customisations points and make sure export the ones you actually want to
|
||||||
activate
|
activate
|
||||||
3. Create/add an entry to `customisations.json` next to the webpack config:
|
3. Create/add an entry to `customisations.json` next to the webpack config:
|
||||||
|
|
||||||
```json
|
```json
|
||||||
{
|
{
|
||||||
"src/customisations/Security.ts": "src/customisations/YourNameSecurity.ts"
|
"src/customisations/Media.ts": "src/customisations/YourNameMedia.ts"
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
@@ -50,9 +50,9 @@ that properties/state machines won't change.
|
|||||||
|
|
||||||
UI for some actions can be hidden via the ComponentVisibility customisation:
|
UI for some actions can be hidden via the ComponentVisibility customisation:
|
||||||
|
|
||||||
- inviting users to rooms and spaces,
|
- inviting users to rooms and spaces,
|
||||||
- creating rooms,
|
- creating rooms,
|
||||||
- creating spaces,
|
- creating spaces,
|
||||||
|
|
||||||
To customise visibility create a customisation module from [ComponentVisibility](https://github.com/element-hq/element-web/blob/master/src/customisations/ComponentVisibility.ts) following the instructions above.
|
To customise visibility create a customisation module from [ComponentVisibility](https://github.com/element-hq/element-web/blob/master/src/customisations/ComponentVisibility.ts) following the instructions above.
|
||||||
|
|
||||||
|
|||||||
@@ -31,9 +31,9 @@ Set the following on your homeserver's
|
|||||||
|
|
||||||
When `force_disable` is true:
|
When `force_disable` is true:
|
||||||
|
|
||||||
- all rooms will be created with encryption disabled, and it will not be possible to enable
|
- all rooms will be created with encryption disabled, and it will not be possible to enable
|
||||||
encryption from room settings.
|
encryption from room settings.
|
||||||
- any `io.element.e2ee.default` value will be disregarded.
|
- any `io.element.e2ee.default` value will be disregarded.
|
||||||
|
|
||||||
Note: If the server is configured to forcibly enable encryption for some or all rooms,
|
Note: If the server is configured to forcibly enable encryption for some or all rooms,
|
||||||
this behaviour will be overridden.
|
this behaviour will be overridden.
|
||||||
|
|||||||
@@ -5,10 +5,10 @@ flexibility and control over when and where those features are enabled.
|
|||||||
|
|
||||||
For example, flags make the following things possible:
|
For example, flags make the following things possible:
|
||||||
|
|
||||||
- Extended testing of a feature via labs on develop
|
- Extended testing of a feature via labs on develop
|
||||||
- Enabling features when ready instead of the first moment the code is released
|
- Enabling features when ready instead of the first moment the code is released
|
||||||
- Testing a feature with a specific set of users (by enabling only on a specific
|
- Testing a feature with a specific set of users (by enabling only on a specific
|
||||||
Element instance)
|
Element instance)
|
||||||
|
|
||||||
The size of the feature controlled by a feature flag may vary widely: it could
|
The size of the feature controlled by a feature flag may vary widely: it could
|
||||||
be a large project like reactions or a smaller change to an existing algorithm.
|
be a large project like reactions or a smaller change to an existing algorithm.
|
||||||
|
|||||||
@@ -2,37 +2,37 @@
|
|||||||
|
|
||||||
## Auto Complete
|
## Auto Complete
|
||||||
|
|
||||||
- Hitting tab tries to auto-complete the word before the caret as a room member
|
- Hitting tab tries to auto-complete the word before the caret as a room member
|
||||||
- If no matching name is found, a visual bell is shown
|
- If no matching name is found, a visual bell is shown
|
||||||
- @ + a letter opens auto complete for members starting with the given letter
|
- @ + a letter opens auto complete for members starting with the given letter
|
||||||
- When inserting a user pill at the start in the composer, a colon and space is appended to the pill
|
- When inserting a user pill at the start in the composer, a colon and space is appended to the pill
|
||||||
- When inserting a user pill anywhere else in composer, only a space is appended to the pill
|
- When inserting a user pill anywhere else in composer, only a space is appended to the pill
|
||||||
- # + a letter opens auto complete for rooms starting with the given letter
|
- # + a letter opens auto complete for rooms starting with the given letter
|
||||||
- : open auto complete for emoji
|
- : open auto complete for emoji
|
||||||
- Pressing arrow-up/arrow-down while the autocomplete is open navigates between auto complete options
|
- Pressing arrow-up/arrow-down while the autocomplete is open navigates between auto complete options
|
||||||
- Pressing tab while the autocomplete is open goes to the next autocomplete option,
|
- Pressing tab while the autocomplete is open goes to the next autocomplete option,
|
||||||
wrapping around at the end after reverting to the typed text first.
|
wrapping around at the end after reverting to the typed text first.
|
||||||
|
|
||||||
## Formatting
|
## Formatting
|
||||||
|
|
||||||
- When selecting text, a formatting bar appears above the selection.
|
- When selecting text, a formatting bar appears above the selection.
|
||||||
- The formatting bar allows to format the selected test as:
|
- The formatting bar allows to format the selected test as:
|
||||||
bold, italic, strikethrough, a block quote, and a code block (inline if no linebreak is selected).
|
bold, italic, strikethrough, a block quote, and a code block (inline if no linebreak is selected).
|
||||||
- Formatting is applied as markdown syntax.
|
- Formatting is applied as markdown syntax.
|
||||||
- Hitting ctrl/cmd+B also marks the selected text as bold
|
- Hitting ctrl/cmd+B also marks the selected text as bold
|
||||||
- Hitting ctrl/cmd+I also marks the selected text as italic
|
- Hitting ctrl/cmd+I also marks the selected text as italic
|
||||||
- Hitting ctrl/cmd+> also marks the selected text as a blockquote
|
- Hitting ctrl/cmd+> also marks the selected text as a blockquote
|
||||||
|
|
||||||
## Misc
|
## Misc
|
||||||
|
|
||||||
- When hitting the arrow-up button while having the caret at the start in the composer,
|
- When hitting the arrow-up button while having the caret at the start in the composer,
|
||||||
the last message sent by the syncing user is edited.
|
the last message sent by the syncing user is edited.
|
||||||
- Clicking a display name on an event in the timeline inserts a user pill into the composer
|
- Clicking a display name on an event in the timeline inserts a user pill into the composer
|
||||||
- Emoticons (like :-), >:-), :-/, ...) are replaced by emojis while typing if the relevant setting is enabled
|
- Emoticons (like :-), >:-), :-/, ...) are replaced by emojis while typing if the relevant setting is enabled
|
||||||
- Typing in the composer sends typing notifications in the room
|
- Typing in the composer sends typing notifications in the room
|
||||||
- Pressing ctrl/mod+z and ctrl/mod+y undoes/redoes modifications
|
- Pressing ctrl/mod+z and ctrl/mod+y undoes/redoes modifications
|
||||||
- Pressing shift+enter inserts a line break
|
- Pressing shift+enter inserts a line break
|
||||||
- Pressing enter sends the message.
|
- Pressing enter sends the message.
|
||||||
- Choosing "Quote" in the context menu of an event inserts a quote of the event body in the composer.
|
- Choosing "Quote" in the context menu of an event inserts a quote of the event body in the composer.
|
||||||
- Choosing "Reply" in the context menu of an event shows a preview above the composer to reply to.
|
- Choosing "Reply" in the context menu of an event shows a preview above the composer to reply to.
|
||||||
- Pressing alt+arrow up/arrow down navigates in previously sent messages, putting them in the composer.
|
- Pressing alt+arrow up/arrow down navigates in previously sent messages, putting them in the composer.
|
||||||
|
|||||||
@@ -8,9 +8,9 @@ Icons have `role="presentation"` and `aria-hidden` automatically applied. These
|
|||||||
|
|
||||||
SVG file recommendations:
|
SVG file recommendations:
|
||||||
|
|
||||||
- Colours should not be defined absolutely. Use `currentColor` instead.
|
- Colours should not be defined absolutely. Use `currentColor` instead.
|
||||||
- SVG files should be taken from the design compound as they are. Some icons contain special padding.
|
- SVG files should be taken from the design compound as they are. Some icons contain special padding.
|
||||||
This means that there should be icons for each size, e.g. warning-16px and warning-32px.
|
This means that there should be icons for each size, e.g. warning-16px and warning-32px.
|
||||||
|
|
||||||
Example usage:
|
Example usage:
|
||||||
|
|
||||||
|
|||||||
@@ -41,7 +41,15 @@ The Docker image can be used to serve element-web as a web server. The easiest w
|
|||||||
it is to use the prebuilt image:
|
it is to use the prebuilt image:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -p 80:80 vectorim/element-web
|
docker run --rm -p 127.0.0.1:80:80 vectorim/element-web
|
||||||
|
```
|
||||||
|
|
||||||
|
A server can also be made available to clients outside the local host by omitting the
|
||||||
|
explicit local address as described in
|
||||||
|
[docker run documentation](https://docs.docker.com/engine/reference/commandline/run/#publish-or-expose-port--p---expose):
|
||||||
|
|
||||||
|
```bash
|
||||||
|
docker run --rm -p 80:80 vectorim/element-web
|
||||||
```
|
```
|
||||||
|
|
||||||
To supply your own custom `config.json`, map a volume to `/app/config.json`. For example,
|
To supply your own custom `config.json`, map a volume to `/app/config.json`. For example,
|
||||||
@@ -49,9 +57,25 @@ if your custom config was located at `/etc/element-web/config.json` then your Do
|
|||||||
would be:
|
would be:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
docker run -p 80:80 -v /etc/element-web/config.json:/app/config.json vectorim/element-web
|
docker run --rm -p 127.0.0.1:80:80 -v /etc/element-web/config.json:/app/config.json vectorim/element-web
|
||||||
```
|
```
|
||||||
|
|
||||||
|
The Docker image is configured to run as an unprivileged (non-root) user by
|
||||||
|
default. This should be fine on modern Docker runtimes, but binding to port 80
|
||||||
|
on other runtimes may require root privileges. To resolve this, either run the
|
||||||
|
image as root (`docker run --user 0`) or, better, change the port that nginx
|
||||||
|
listens on via the `ELEMENT_WEB_PORT` environment variable.
|
||||||
|
|
||||||
|
The behaviour of the docker image can be customised via the following
|
||||||
|
environment variables:
|
||||||
|
|
||||||
|
- `ELEMENT_WEB_PORT`
|
||||||
|
|
||||||
|
The port to listen on (within the docker container) for HTTP
|
||||||
|
traffic. Defaults to `80`.
|
||||||
|
|
||||||
|
### Building the docker image
|
||||||
|
|
||||||
To build the image yourself:
|
To build the image yourself:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|||||||
@@ -81,27 +81,27 @@ which takes several parameters:
|
|||||||
|
|
||||||
_Query string_:
|
_Query string_:
|
||||||
|
|
||||||
- `widgetId`: The ID of the widget. This is needed for communication back to the
|
- `widgetId`: The ID of the widget. This is needed for communication back to the
|
||||||
react-sdk.
|
react-sdk.
|
||||||
- `parentUrl`: The URL of the parent window. This is also needed for
|
- `parentUrl`: The URL of the parent window. This is also needed for
|
||||||
communication back to the react-sdk.
|
communication back to the react-sdk.
|
||||||
|
|
||||||
_Hash/fragment (formatted as a query string)_:
|
_Hash/fragment (formatted as a query string)_:
|
||||||
|
|
||||||
- `conferenceDomain`: The domain to connect Jitsi Meet to.
|
- `conferenceDomain`: The domain to connect Jitsi Meet to.
|
||||||
- `conferenceId`: The room or conference ID to connect Jitsi Meet to.
|
- `conferenceId`: The room or conference ID to connect Jitsi Meet to.
|
||||||
- `isAudioOnly`: Boolean for whether this is a voice-only conference. May not
|
- `isAudioOnly`: Boolean for whether this is a voice-only conference. May not
|
||||||
be present, should default to `false`.
|
be present, should default to `false`.
|
||||||
- `startWithAudioMuted`: Boolean for whether the calls start with audio
|
- `startWithAudioMuted`: Boolean for whether the calls start with audio
|
||||||
muted. May not be present.
|
muted. May not be present.
|
||||||
- `startWithVideoMuted`: Boolean for whether the calls start with video
|
- `startWithVideoMuted`: Boolean for whether the calls start with video
|
||||||
muted. May not be present.
|
muted. May not be present.
|
||||||
- `displayName`: The display name of the user viewing the widget. May not
|
- `displayName`: The display name of the user viewing the widget. May not
|
||||||
be present or could be null.
|
be present or could be null.
|
||||||
- `avatarUrl`: The HTTP(S) URL for the avatar of the user viewing the widget. May
|
- `avatarUrl`: The HTTP(S) URL for the avatar of the user viewing the widget. May
|
||||||
not be present or could be null.
|
not be present or could be null.
|
||||||
- `userId`: The MXID of the user viewing the widget. May not be present or could
|
- `userId`: The MXID of the user viewing the widget. May not be present or could
|
||||||
be null.
|
be null.
|
||||||
|
|
||||||
The react-sdk will assume that `jitsi.html` is at the path of wherever it is currently
|
The react-sdk will assume that `jitsi.html` is at the path of wherever it is currently
|
||||||
being served. For example, `https://develop.element.io/jitsi.html` or `vector://webapp/jitsi.html`.
|
being served. For example, `https://develop.element.io/jitsi.html` or `vector://webapp/jitsi.html`.
|
||||||
|
|||||||
@@ -112,3 +112,7 @@ Unreliable in encrypted rooms.
|
|||||||
## Knock rooms (`feature_ask_to_join`) [In Development]
|
## Knock rooms (`feature_ask_to_join`) [In Development]
|
||||||
|
|
||||||
Enables knock feature for rooms. This allows users to ask to join a room.
|
Enables knock feature for rooms. This allows users to ask to join a room.
|
||||||
|
|
||||||
|
## New room list (`feature_new_room_list`) [In Development]
|
||||||
|
|
||||||
|
Enable the new room list that is currently in development.
|
||||||
|
|||||||
22
docs/oidc.md
22
docs/oidc.md
@@ -1,29 +1,9 @@
|
|||||||
# OIDC and delegated authentication
|
# OIDC and delegated authentication
|
||||||
|
|
||||||
## Compatibility/OIDC-aware mode
|
|
||||||
|
|
||||||
[MSC2965: OIDC provider discovery](https://github.com/matrix-org/matrix-spec-proposals/pull/2965)
|
|
||||||
[MSC3824: OIDC aware clients](https://github.com/matrix-org/matrix-spec-proposals/pull/3824)
|
|
||||||
This mode uses an SSO flow to gain a `loginToken` from the authentication provider, then continues with SSO login.
|
|
||||||
Element Web uses [MSC2965: OIDC provider discovery](https://github.com/matrix-org/matrix-spec-proposals/pull/2965) to discover the configured provider.
|
|
||||||
Wherever valid MSC2965 configuration is discovered, OIDC-aware login flow will be the only option offered.
|
|
||||||
|
|
||||||
## (🧪Experimental) OIDC-native flow
|
|
||||||
|
|
||||||
Can be enabled by a config-level-only setting in `config.json`
|
|
||||||
|
|
||||||
```json
|
|
||||||
{
|
|
||||||
"features": {
|
|
||||||
"feature_oidc_native_flow": true
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
||||||
|
|
||||||
See https://areweoidcyet.com/client-implementation-guide/ for implementation details.
|
See https://areweoidcyet.com/client-implementation-guide/ for implementation details.
|
||||||
|
|
||||||
Element Web uses [MSC2965: OIDC provider discovery](https://github.com/matrix-org/matrix-spec-proposals/pull/2965) to discover the configured provider.
|
Element Web uses [MSC2965: OIDC provider discovery](https://github.com/matrix-org/matrix-spec-proposals/pull/2965) to discover the configured provider.
|
||||||
Where OIDC native login flow is enabled and valid MSC2965 configuration is discovered, OIDC native login flow will be the only login option offered.
|
Where a valid MSC2965 configuration is discovered, OIDC native login flow will be the only login option offered.
|
||||||
Element Web will attempt to [dynamically register](https://openid.net/specs/openid-connect-registration-1_0.html) with the configured OP.
|
Element Web will attempt to [dynamically register](https://openid.net/specs/openid-connect-registration-1_0.html) with the configured OP.
|
||||||
Then, authentication will be completed [as described here](https://areweoidcyet.com/client-implementation-guide/).
|
Then, authentication will be completed [as described here](https://areweoidcyet.com/client-implementation-guide/).
|
||||||
|
|
||||||
|
|||||||
@@ -2,10 +2,10 @@
|
|||||||
|
|
||||||
## Contents
|
## Contents
|
||||||
|
|
||||||
- How to run the tests
|
- How to run the tests
|
||||||
- How the tests work
|
- How the tests work
|
||||||
- How to write great Playwright tests
|
- How to write great Playwright tests
|
||||||
- Visual testing
|
- Visual testing
|
||||||
|
|
||||||
## Running the Tests
|
## Running the Tests
|
||||||
|
|
||||||
@@ -23,21 +23,19 @@ element-web project is fine: leave it running it a different terminal as you wou
|
|||||||
when developing. Alternatively if you followed the development set up from element-web then
|
when developing. Alternatively if you followed the development set up from element-web then
|
||||||
Playwright will be capable of running the webserver on its own if it isn't already running.
|
Playwright will be capable of running the webserver on its own if it isn't already running.
|
||||||
|
|
||||||
The tests use Docker to launch Homeserver (Synapse or Dendrite) instances to test against, so you'll also
|
The tests use [testcontainers](https://node.testcontainers.org/) to launch Homeserver (Synapse or Dendrite)
|
||||||
need to have Docker installed and working in order to run the Playwright tests.
|
instances to test against, so you'll also need to one of the
|
||||||
|
[supported container runtimes](#supporter-container-runtimes)
|
||||||
|
installed and working in order to run the Playwright tests.
|
||||||
|
|
||||||
There are a few different ways to run the tests yourself. The simplest is to run:
|
There are a few different ways to run the tests yourself. The simplest is to run:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
docker pull ghcr.io/element-hq/synapse:develop
|
|
||||||
yarn run test:playwright
|
yarn run test:playwright
|
||||||
```
|
```
|
||||||
|
|
||||||
This will run the Playwright tests once, non-interactively.
|
This will run the Playwright tests once, non-interactively.
|
||||||
|
|
||||||
Note: you don't need to run the `docker pull` command every time, but you should
|
|
||||||
do it regularly to ensure you are running against an up-to-date Synapse.
|
|
||||||
|
|
||||||
You can also run individual tests this way too, as you'd expect:
|
You can also run individual tests this way too, as you'd expect:
|
||||||
|
|
||||||
```shell
|
```shell
|
||||||
@@ -53,41 +51,36 @@ yarn run test:playwright:open --headed --debug
|
|||||||
|
|
||||||
See more command line options at <https://playwright.dev/docs/test-cli>.
|
See more command line options at <https://playwright.dev/docs/test-cli>.
|
||||||
|
|
||||||
### Running with Rust cryptography
|
## Projects
|
||||||
|
|
||||||
`matrix-js-sdk` is currently in the
|
By default, Playwright will run all "Projects", this means tests will run against Chrome, Firefox and "Safari" (Webkit).
|
||||||
[process](https://github.com/vector-im/element-web/issues/21972) of being
|
We only run tests against Chrome in pull request CI, but all projects in the merge queue.
|
||||||
updated to replace its end-to-end encryption implementation to use the [Matrix
|
Some tests are excluded from running on certain browsers due to incompatibilities in the test harness.
|
||||||
Rust SDK](https://github.com/matrix-org/matrix-rust-sdk). This is not currently
|
|
||||||
enabled by default, but it is possible to have Playwright configure Element to use
|
|
||||||
the Rust crypto implementation by passing `--project="Rust Crypto"` or using
|
|
||||||
the top left options in open mode.
|
|
||||||
|
|
||||||
## How the Tests Work
|
## How the Tests Work
|
||||||
|
|
||||||
Everything Playwright-related lives in the `playwright/` subdirectory of react-sdk
|
Everything Playwright-related lives in the `playwright/` subdirectory
|
||||||
as is typical for Playwright tests. Likewise, tests live in `playwright/e2e`.
|
as is typical for Playwright tests. Likewise, tests live in `playwright/e2e`.
|
||||||
|
|
||||||
`playwright/plugins/homeservers` contains Playwright plugins that starts instances
|
`playwright/testcontainers` contains the testcontainers which start instances
|
||||||
of Synapse/Dendrite in Docker containers. These servers are what Element-web runs
|
of Synapse/Dendrite. These servers are what Element-web runs against in the tests.
|
||||||
against in the tests.
|
|
||||||
|
|
||||||
Synapse can be launched with different configurations in order to test element
|
Synapse can be launched with different configurations in order to test element
|
||||||
in different configurations. `playwright/plugins/homeserver/synapse/templates`
|
in different configurations. You can specify `synapseConfig` as such:
|
||||||
contains template configuration files for each different configuration.
|
|
||||||
|
|
||||||
Each test suite can then launch whatever Synapse instances it needs in whatever
|
```typescript
|
||||||
configurations.
|
test.use({
|
||||||
|
synapseConfig: {
|
||||||
|
// The config options to pass to the Synapse instance
|
||||||
|
},
|
||||||
|
});
|
||||||
|
```
|
||||||
|
|
||||||
Note that although tests should stop the Homeserver instances after running and the
|
The appropriate homeserver will be launched by the Playwright worker and reused for all tests which match the worker configuration.
|
||||||
plugin also stop any remaining instances after all tests have run, it is possible
|
Due to homeservers being reused between tests, please use unique names for any rooms put into the room directory as
|
||||||
to be left with some stray containers if, for example, you terminate a test such
|
they may be visible from other tests, the suggested approach is to use `testInfo.testId` within the name or lodash's uniqueId.
|
||||||
that the `after()` does not run and also exit Playwright uncleanly. All the containers
|
We remove public rooms from the room directory between tests but deleting users doesn't have a homeserver agnostic solution.
|
||||||
it starts are prefixed, so they are easy to recognise. They can be removed safely.
|
The logs from testcontainers will be attached to any reports output from Playwright.
|
||||||
|
|
||||||
After each test run, logs from the Synapse instances are saved in `playwright/logs/synapse`
|
|
||||||
with each instance in a separate directory named after its ID. These logs are removed
|
|
||||||
at the start of each test run.
|
|
||||||
|
|
||||||
## Writing Tests
|
## Writing Tests
|
||||||
|
|
||||||
@@ -117,25 +110,6 @@ Homeserver instances should be reasonably cheap to start (you may see the first
|
|||||||
while as it pulls the Docker image).
|
while as it pulls the Docker image).
|
||||||
You do not need to explicitly clean up the instance as it will be cleaned up by the fixture.
|
You do not need to explicitly clean up the instance as it will be cleaned up by the fixture.
|
||||||
|
|
||||||
### Synapse Config Templates
|
|
||||||
|
|
||||||
When a Synapse instance is started, it's given a config generated from one of the config
|
|
||||||
templates in `playwright/plugins/homeserver/synapse/templates`. There are a couple of special files
|
|
||||||
in these templates:
|
|
||||||
|
|
||||||
- `homeserver.yaml`:
|
|
||||||
Template substitution happens in this file. Template variables are:
|
|
||||||
- `REGISTRATION_SECRET`: The secret used to register users via the REST API.
|
|
||||||
- `MACAROON_SECRET_KEY`: Generated each time for security
|
|
||||||
- `FORM_SECRET`: Generated each time for security
|
|
||||||
- `PUBLIC_BASEURL`: The localhost url + port combination the synapse is accessible at
|
|
||||||
- `localhost.signing.key`: A signing key is auto-generated and saved to this file.
|
|
||||||
Config templates should not contain a signing key and instead assume that one will exist
|
|
||||||
in this file.
|
|
||||||
|
|
||||||
All other files in the template are copied recursively to `/data/`, so the file `foo.html`
|
|
||||||
in a template can be referenced in the config as `/data/foo.html`.
|
|
||||||
|
|
||||||
### Logging In
|
### Logging In
|
||||||
|
|
||||||
We again heavily leverage the magic of [Playwright fixtures](https://playwright.dev/docs/test-fixtures).
|
We again heavily leverage the magic of [Playwright fixtures](https://playwright.dev/docs/test-fixtures).
|
||||||
@@ -217,3 +191,27 @@ instead of the native `toHaveScreenshot`.
|
|||||||
|
|
||||||
If you are running Linux and are unfortunate that the screenshots are not rendering identically,
|
If you are running Linux and are unfortunate that the screenshots are not rendering identically,
|
||||||
you may wish to specify `--ignore-snapshots` and rely on Docker to render them for you.
|
you may wish to specify `--ignore-snapshots` and rely on Docker to render them for you.
|
||||||
|
|
||||||
|
## Test Tags
|
||||||
|
|
||||||
|
We use test tags to categorise tests for running subsets more efficiently.
|
||||||
|
|
||||||
|
- `@mergequeue`: Tests that are slow or flaky and cover areas of the app we update seldom, should not be run on every PR commit but will be run in the Merge Queue.
|
||||||
|
- `@screenshot`: Tests that use `toMatchScreenshot` to speed up a run of `test:playwright:screenshots`. A test with this tag must not also have the `@mergequeue` tag as this would cause false positives in the stale screenshot detection.
|
||||||
|
- `@no-$project`: Tests which are unsupported in $Project. These tests will be skipped when running in $Project.
|
||||||
|
|
||||||
|
Anything testing Matrix media will need to have `@no-firefox` and `@no-webkit` as those rely on the service worker which
|
||||||
|
has to be disabled in Playwright on Firefox & Webkit to retain routing functionality.
|
||||||
|
Anything testing VoIP/microphone will need to have `@no-webkit` as fake microphone functionality is not available
|
||||||
|
there at this time.
|
||||||
|
|
||||||
|
If you wish to run all tests in a PR, you can give it the label `X-Run-All-Tests`.
|
||||||
|
|
||||||
|
## Supporter container runtimes
|
||||||
|
|
||||||
|
We use testcontainers to spin up various instances of Synapse, Matrix Authentication Service, and more.
|
||||||
|
It supports Docker out of the box but also has support for Podman, Colima, Rancher, you just need to follow some instructions to achieve it:
|
||||||
|
https://node.testcontainers.org/supported-container-runtimes/
|
||||||
|
|
||||||
|
If you are running under Colima, you may need to set the environment variable `TMPDIR` to `/tmp/colima` or a path
|
||||||
|
within `$HOME` to allow bind mounting temporary directories into the Docker containers.
|
||||||
|
|||||||
@@ -8,11 +8,13 @@
|
|||||||
|
|
||||||
#### develop
|
#### develop
|
||||||
|
|
||||||
The develop branch holds the very latest and greatest code we have to offer, as such it may be less stable. It corresponds to the develop.element.io CD platform.
|
The develop branch holds the very latest and greatest code we have to offer, as such it may be less stable.
|
||||||
|
It is auto-deployed on every commit to element-web or matrix-js-sdk to develop.element.io via GitHub Actions `build_develop.yml`.
|
||||||
|
|
||||||
#### staging
|
#### staging
|
||||||
|
|
||||||
The staging branch corresponds to the very latest release regardless of whether it is an RC or not. Deployed to staging.element.io manually.
|
The staging branch corresponds to the very latest release regardless of whether it is an RC or not. Deployed to staging.element.io manually.
|
||||||
|
It is auto-deployed on every release of element-web to staging.element.io via GitHub Actions `deploy.yml`.
|
||||||
|
|
||||||
#### master
|
#### master
|
||||||
|
|
||||||
@@ -82,28 +84,28 @@ This label will automagically convert to `X-Release-Blocker` at the conclusion o
|
|||||||
|
|
||||||
This release process revolves around our main repositories:
|
This release process revolves around our main repositories:
|
||||||
|
|
||||||
- [Element Desktop](https://github.com/element-hq/element-desktop/)
|
- [Element Desktop](https://github.com/element-hq/element-desktop/)
|
||||||
- [Element Web](https://github.com/element-hq/element-web/)
|
- [Element Web](https://github.com/element-hq/element-web/)
|
||||||
- [Matrix JS SDK](https://github.com/matrix-org/matrix-js-sdk/)
|
- [Matrix JS SDK](https://github.com/matrix-org/matrix-js-sdk/)
|
||||||
|
|
||||||
We own other repositories, but they have more ad-hoc releases and are not part of the bi-weekly cycle:
|
We own other repositories, but they have more ad-hoc releases and are not part of the bi-weekly cycle:
|
||||||
|
|
||||||
- https://github.com/matrix-org/matrix-web-i18n/
|
- https://github.com/matrix-org/matrix-web-i18n/
|
||||||
- https://github.com/matrix-org/matrix-react-sdk-module-api
|
- https://github.com/matrix-org/matrix-react-sdk-module-api
|
||||||
|
|
||||||
</blockquote></details>
|
</blockquote></details>
|
||||||
|
|
||||||
<details><summary><h1>Prerequisites</h1></summary><blockquote>
|
<details><summary><h1>Prerequisites</h1></summary><blockquote>
|
||||||
|
|
||||||
- You must be part of the 2 Releasers GitHub groups:
|
- You must be part of the 2 Releasers GitHub groups:
|
||||||
- <https://github.com/orgs/element-hq/teams/element-web-releasers>
|
- <https://github.com/orgs/element-hq/teams/element-web-releasers>
|
||||||
- <https://github.com/orgs/matrix-org/teams/element-web-releasers>
|
- <https://github.com/orgs/matrix-org/teams/element-web-releasers>
|
||||||
- You will need access to the **VPN** ([docs](https://gitlab.matrix.org/new-vector/internal/-/wikis/SRE/Tailscale)) to be able to follow the instructions under Deploy below.
|
- You will need access to the **VPN** ([docs](https://gitlab.matrix.org/new-vector/internal/-/wikis/SRE/Tailscale)) to be able to follow the instructions under Deploy below.
|
||||||
- You will need the ability to **SSH** in to the production machines to be able to follow the instructions under Deploy below. Ensure that your SSH key has a non-empty passphrase, and you registered your SSH key with Ops. Log a ticket at https://github.com/matrix-org/matrix-ansible-private and ask for:
|
- You will need the ability to **SSH** in to the production machines to be able to follow the instructions under Deploy below. Ensure that your SSH key has a non-empty passphrase, and you registered your SSH key with Ops. Log a ticket at https://github.com/matrix-org/matrix-ansible-private and ask for:
|
||||||
- Two-factor authentication to be set up on your SSH key. (This is needed to get access to production).
|
- Two-factor authentication to be set up on your SSH key. (This is needed to get access to production).
|
||||||
- SSH access to `horme` (staging.element.io and app.element.io)
|
- SSH access to `horme` (staging.element.io and app.element.io)
|
||||||
- Permission to sudo on horme as the user `element`
|
- Permission to sudo on horme as the user `element`
|
||||||
- You need "**jumphost**" configuration in your local `~/.ssh/config`. This should have been set up as part of your onboarding.
|
- You need "**jumphost**" configuration in your local `~/.ssh/config`. This should have been set up as part of your onboarding.
|
||||||
|
|
||||||
</blockquote></details>
|
</blockquote></details>
|
||||||
|
|
||||||
@@ -126,7 +128,7 @@ flowchart TD
|
|||||||
|
|
||||||
subgraph Deploying
|
subgraph Deploying
|
||||||
D1[\Deploy staging.element.io/]
|
D1[\Deploy staging.element.io/]
|
||||||
D2[\Check dockerhub/]
|
D2[\Check docker build/]
|
||||||
D3[\Deploy app.element.io/]
|
D3[\Deploy app.element.io/]
|
||||||
D4[\Check desktop package/]
|
D4[\Check desktop package/]
|
||||||
|
|
||||||
@@ -177,7 +179,7 @@ For security, you may wish to merge the security advisory private fork or apply
|
|||||||
It is worth noting that at the end of the Final/Hotfix/Security release `staging` is merged to `master` which is merged back into `develop` -
|
It is worth noting that at the end of the Final/Hotfix/Security release `staging` is merged to `master` which is merged back into `develop` -
|
||||||
this means that any commit which goes to `staging` will eventually make its way back to the default branch.
|
this means that any commit which goes to `staging` will eventually make its way back to the default branch.
|
||||||
|
|
||||||
- [ ] The staging branch is prepared
|
- [ ] The staging branch is prepared
|
||||||
|
|
||||||
# Releasing
|
# Releasing
|
||||||
|
|
||||||
@@ -192,45 +194,48 @@ switched back to the version of the dependency from the master branch to not lea
|
|||||||
|
|
||||||
### Matrix JS SDK
|
### Matrix JS SDK
|
||||||
|
|
||||||
- [ ] Check the draft release which has been generated by [the automation](https://github.com/matrix-org/matrix-js-sdk/actions/workflows/release-drafter.yml)
|
- [ ] Check the draft release which has been generated by [the automation](https://github.com/matrix-org/matrix-js-sdk/actions/workflows/release-drafter.yml)
|
||||||
- [ ] Make any changes to the release notes in the draft release as are necessary - **Do not click publish, only save draft**
|
- [ ] Make any changes to the release notes in the draft release as are necessary - **Do not click publish, only save draft**
|
||||||
- [ ] Kick off a release using [the automation](https://github.com/matrix-org/matrix-js-sdk/actions/workflows/release.yml) - making sure to select the right type of release. For anything other than an RC: choose final. You should not need to ever switch off either of the Publishing options.
|
- [ ] Kick off a release using [the automation](https://github.com/matrix-org/matrix-js-sdk/actions/workflows/release.yml) - making sure to select the right type of release. For anything other than an RC: choose final. You should not need to ever switch off either of the Publishing options.
|
||||||
|
|
||||||
### Element Web
|
### Element Web
|
||||||
|
|
||||||
- [ ] Check the draft release which has been generated by [the automation](https://github.com/element-hq/element-web/actions/workflows/release-drafter.yml)
|
- [ ] Check the draft release which has been generated by [the automation](https://github.com/element-hq/element-web/actions/workflows/release-drafter.yml)
|
||||||
- [ ] Make any changes to the release notes in the draft release as are necessary - **Do not click publish, only save draft**
|
- [ ] Make any changes to the release notes in the draft release as are necessary - **Do not click publish, only save draft**
|
||||||
- [ ] Kick off a release using [the automation](https://github.com/element-hq/element-web/actions/workflows/release.yml) - making sure to select the right type of release. For anything other than an RC: choose final. You should not need to ever switch off either of the Publishing options.
|
- [ ] Kick off a release using [the automation](https://github.com/element-hq/element-web/actions/workflows/release.yml) - making sure to select the right type of release. For anything other than an RC: choose final. You should not need to ever switch off either of the Publishing options.
|
||||||
|
|
||||||
### Element Desktop
|
### Element Desktop
|
||||||
|
|
||||||
- [ ] Check the draft release which has been generated by [the automation](https://github.com/element-hq/element-desktop/actions/workflows/release-drafter.yml)
|
- [ ] Check the draft release which has been generated by [the automation](https://github.com/element-hq/element-desktop/actions/workflows/release-drafter.yml)
|
||||||
- [ ] Make any changes to the release notes in the draft release as are necessary - **Do not click publish, only save draft**
|
- [ ] Make any changes to the release notes in the draft release as are necessary - **Do not click publish, only save draft**
|
||||||
- [ ] Kick off a release using [the automation](https://github.com/element-hq/element-desktop/actions/workflows/release.yml) - making sure to select the right type of release. For anything other than an RC: choose final. You should not need to ever switch off either of the Publishing options.
|
- [ ] Kick off a release using [the automation](https://github.com/element-hq/element-desktop/actions/workflows/release.yml) - making sure to select the right type of release. For anything other than an RC: choose final. You should not need to ever switch off either of the Publishing options.
|
||||||
|
|
||||||
# Deploying
|
# Deploying
|
||||||
|
|
||||||
We ship the SDKs to npm, this happens as part of the release process.
|
We ship the SDKs to npm, this happens as part of the release process.
|
||||||
We ship Element Web to dockerhub, `*.element.io`, and packages.element.io.
|
We ship Element Web to dockerhub, ghcr.io, `*.element.io`, and packages.element.io.
|
||||||
We ship Element Desktop to packages.element.io.
|
We ship Element Desktop to packages.element.io.
|
||||||
|
|
||||||
- [ ] Check that element-web has shipped to dockerhub
|
- [ ] Check that element-web has shipped to dockerhub & ghcr.io
|
||||||
- [ ] Deploy staging.element.io. [See docs.](https://handbook.element.io/books/element-web-team/page/deploying-appstagingelementio)
|
- [ ] Check that the staging [deployment](https://github.com/element-hq/element-web/actions/workflows/deploy.yml) has completed successfully
|
||||||
- [ ] Test staging.element.io
|
- [ ] Test staging.element.io
|
||||||
|
|
||||||
For final releases additionally do these steps:
|
For final releases additionally do these steps:
|
||||||
|
|
||||||
- [ ] Deploy app.element.io. [See docs.](https://handbook.element.io/books/element-web-team/page/deploying-appstagingelementio)
|
- [ ] Deploy app.element.io. [See docs.](https://handbook.element.io/books/element-web-team/page/deploying-appstagingelementio)
|
||||||
- [ ] Test app.element.io
|
- [ ] Test app.element.io
|
||||||
- [ ] Ensure Element Web package has shipped to packages.element.io
|
- [ ] Ensure Element Web package has shipped to packages.element.io
|
||||||
- [ ] Ensure Element Desktop packages have shipped to packages.element.io
|
- [ ] Ensure Element Desktop packages have shipped to packages.element.io
|
||||||
|
|
||||||
|
If you need to roll back a deployment to staging.element.io,
|
||||||
|
you can run the `deploy.yml` automation choosing an older tag which you wish to deploy.
|
||||||
|
|
||||||
# Housekeeping
|
# Housekeeping
|
||||||
|
|
||||||
We have some manual housekeeping to do in order to prepare for the next release.
|
We have some manual housekeeping to do in order to prepare for the next release.
|
||||||
|
|
||||||
- [ ] Update topics using [the automation](https://github.com/element-hq/element-web/actions/workflows/update-topics.yaml). It will autodetect the current latest version. Don't forget the date you supply should be e.g. September 5th (including the "th") for the script to work.
|
- [ ] Update topics using [the automation](https://github.com/element-hq/element-web/actions/workflows/update-topics.yaml). It will autodetect the current latest version. Don't forget the date you supply should be e.g. September 5th (including the "th") for the script to work.
|
||||||
- [ ] Announce the release in [#element-web-announcements:matrix.org](https://matrix.to/#/#element-web-announcements:matrix.org)
|
- [ ] Announce the release in [#element-web-announcements:matrix.org](https://matrix.to/#/#element-web-announcements:matrix.org)
|
||||||
|
|
||||||
<details><summary>(show)</summary>
|
<details><summary>(show)</summary>
|
||||||
|
|
||||||
@@ -246,15 +251,15 @@ With wording like:
|
|||||||
|
|
||||||
For the first RC of a given release cycle do these steps:
|
For the first RC of a given release cycle do these steps:
|
||||||
|
|
||||||
- [ ] Go to the [matrix-js-sdk Renovate dashboard](https://github.com/matrix-org/matrix-js-sdk/issues/2406) and click the checkbox to create/update its PRs.
|
- [ ] Go to the [matrix-js-sdk Renovate dashboard](https://github.com/matrix-org/matrix-js-sdk/issues/2406) and click the checkbox to create/update its PRs.
|
||||||
|
|
||||||
- [ ] Go to the [element-web Renovate dashboard](https://github.com/element-hq/element-web/issues/22941) and click the checkbox to create/update its PRs.
|
- [ ] Go to the [element-web Renovate dashboard](https://github.com/element-hq/element-web/issues/22941) and click the checkbox to create/update its PRs.
|
||||||
|
|
||||||
- [ ] Go to the [element-desktop Renovate dashboard](https://github.com/element-hq/element-desktop/issues/465) and click the checkbox to create/update its PRs.
|
- [ ] Go to the [element-desktop Renovate dashboard](https://github.com/element-hq/element-desktop/issues/465) and click the checkbox to create/update its PRs.
|
||||||
|
|
||||||
- [ ] Later, check back and merge the PRs that succeeded to build. The ones that failed will get picked up by the [maintainer](https://docs.google.com/document/d/1V5VINWXATMpz9UBw4IKmVVB8aw3CxM0Jt7igtHnDfSk/edit#).
|
- [ ] Later, check back and merge the PRs that succeeded to build. The ones that failed will get picked up by the [maintainer](https://docs.google.com/document/d/1V5VINWXATMpz9UBw4IKmVVB8aw3CxM0Jt7igtHnDfSk/edit#).
|
||||||
|
|
||||||
For final releases additionally do these steps:
|
For final releases additionally do these steps:
|
||||||
|
|
||||||
- [ ] Archive done column on the [team board](https://github.com/orgs/element-hq/projects/67/views/34) _Note: this should be automated_
|
- [ ] Archive done column on the [team board](https://github.com/orgs/element-hq/projects/67/views/34) _Note: this should be automated_
|
||||||
- [ ] Add entry to the [milestones diary](https://docs.google.com/document/d/1cpRFJdfNCo2Ps6jqzQmatzbYEToSrQpyBug0aP_iwZE/edit#heading=h.6y55fw4t283z). The document says only to add significant releases, but we add all of them just in case.
|
- [ ] Add entry to the [milestones diary](https://docs.google.com/document/d/1cpRFJdfNCo2Ps6jqzQmatzbYEToSrQpyBug0aP_iwZE/edit#heading=h.6y55fw4t283z). The document says only to add significant releases, but we add all of them just in case.
|
||||||
|
|||||||
@@ -10,53 +10,53 @@ When reviewing code, here are some things we look for and also things we avoid:
|
|||||||
|
|
||||||
### We review for
|
### We review for
|
||||||
|
|
||||||
- Correctness
|
- Correctness
|
||||||
- Performance
|
- Performance
|
||||||
- Accessibility
|
- Accessibility
|
||||||
- Security
|
- Security
|
||||||
- Quality via automated and manual testing
|
- Quality via automated and manual testing
|
||||||
- Comments and documentation where needed
|
- Comments and documentation where needed
|
||||||
- Sharing knowledge of different areas among the team
|
- Sharing knowledge of different areas among the team
|
||||||
- Ensuring it's something we're comfortable maintaining for the long term
|
- Ensuring it's something we're comfortable maintaining for the long term
|
||||||
- Progress indicators and local echo where appropriate with network activity
|
- Progress indicators and local echo where appropriate with network activity
|
||||||
|
|
||||||
### We should avoid
|
### We should avoid
|
||||||
|
|
||||||
- Style nits that are already handled by the linter
|
- Style nits that are already handled by the linter
|
||||||
- Dramatically increasing scope
|
- Dramatically increasing scope
|
||||||
|
|
||||||
### Good practices
|
### Good practices
|
||||||
|
|
||||||
- Use empathetic language
|
- Use empathetic language
|
||||||
- See also [Mindful Communication in Code
|
- See also [Mindful Communication in Code
|
||||||
Reviews](https://kickstarter.engineering/a-guide-to-mindful-communication-in-code-reviews-48aab5282e5e)
|
Reviews](https://kickstarter.engineering/a-guide-to-mindful-communication-in-code-reviews-48aab5282e5e)
|
||||||
and [How to Do Code Reviews Like a Human](https://mtlynch.io/human-code-reviews-1/)
|
and [How to Do Code Reviews Like a Human](https://mtlynch.io/human-code-reviews-1/)
|
||||||
- Authors should prefer smaller commits for easier reviewing and bisection
|
- Authors should prefer smaller commits for easier reviewing and bisection
|
||||||
- Reviewers should be explicit about required versus optional changes
|
- Reviewers should be explicit about required versus optional changes
|
||||||
- Reviews are conversations and the PR author should feel comfortable
|
- Reviews are conversations and the PR author should feel comfortable
|
||||||
discussing and pushing back on changes before making them
|
discussing and pushing back on changes before making them
|
||||||
- Reviewers are encouraged to ask for tests where they believe it is reasonable
|
- Reviewers are encouraged to ask for tests where they believe it is reasonable
|
||||||
- Core team should lead by example through their tone and language
|
- Core team should lead by example through their tone and language
|
||||||
- Take the time to thank and point out good code changes
|
- Take the time to thank and point out good code changes
|
||||||
- Using softer language like "please" and "what do you think?" goes a long way
|
- Using softer language like "please" and "what do you think?" goes a long way
|
||||||
towards making others feel like colleagues working towards a common goal
|
towards making others feel like colleagues working towards a common goal
|
||||||
|
|
||||||
### Workflow
|
### Workflow
|
||||||
|
|
||||||
- Authors should request review from the element-web team by default (if someone on
|
- Authors should request review from the element-web team by default (if someone on
|
||||||
the team is clearly the expert in an area, a direct review request to them may
|
the team is clearly the expert in an area, a direct review request to them may
|
||||||
be more appropriate)
|
be more appropriate)
|
||||||
- Reviewers should remove the team review request and request review from
|
- Reviewers should remove the team review request and request review from
|
||||||
themselves when starting a review to avoid double review
|
themselves when starting a review to avoid double review
|
||||||
- If there are multiple related PRs authors should reference each of the PRs in
|
- If there are multiple related PRs authors should reference each of the PRs in
|
||||||
the others before requesting review. Reviewers might start reviewing from
|
the others before requesting review. Reviewers might start reviewing from
|
||||||
different places and could miss other required PRs.
|
different places and could miss other required PRs.
|
||||||
- Avoid force pushing to a PR after the first round of review
|
- Avoid force pushing to a PR after the first round of review
|
||||||
- Use the GitHub default of merge commits when landing (avoid alternate options
|
- Use the GitHub default of merge commits when landing (avoid alternate options
|
||||||
like squash or rebase)
|
like squash or rebase)
|
||||||
- PR author merges after review (assuming they have write access)
|
- PR author merges after review (assuming they have write access)
|
||||||
- Assign issues only when in progress to indicate to others what can be picked
|
- Assign issues only when in progress to indicate to others what can be picked
|
||||||
up
|
up
|
||||||
|
|
||||||
## Code Quality
|
## Code Quality
|
||||||
|
|
||||||
@@ -64,10 +64,10 @@ In the past, we have occasionally written different kinds of tests for
|
|||||||
Element and the SDKs, but it hasn't been a consistent focus. Going forward, we'd
|
Element and the SDKs, but it hasn't been a consistent focus. Going forward, we'd
|
||||||
like to change that.
|
like to change that.
|
||||||
|
|
||||||
- For new features, code reviewers will expect some form of automated testing to
|
- For new features, code reviewers will expect some form of automated testing to
|
||||||
be included by default
|
be included by default
|
||||||
- For bug fixes, regression tests are of course great to have, but we don't want
|
- For bug fixes, regression tests are of course great to have, but we don't want
|
||||||
to block fixes on this, so we won't require them at this time
|
to block fixes on this, so we won't require them at this time
|
||||||
|
|
||||||
The above policy is not a strict rule, but instead it's meant to be a
|
The above policy is not a strict rule, but instead it's meant to be a
|
||||||
conversation between the author and reviewer. As an author, try to think about
|
conversation between the author and reviewer. As an author, try to think about
|
||||||
@@ -104,10 +104,10 @@ perspective.
|
|||||||
In more detail, our usual process for changes that affect the UI or alter user
|
In more detail, our usual process for changes that affect the UI or alter user
|
||||||
functionality is:
|
functionality is:
|
||||||
|
|
||||||
- For changes that will go live when merged, always flag Design and Product
|
- For changes that will go live when merged, always flag Design and Product
|
||||||
teams as appropriate
|
teams as appropriate
|
||||||
- For changes guarded by a feature flag, Design and Product review is not
|
- For changes guarded by a feature flag, Design and Product review is not
|
||||||
required (though may still be useful) since we can continue tweaking
|
required (though may still be useful) since we can continue tweaking
|
||||||
|
|
||||||
As it can be difficult to review design work from looking at just the changed
|
As it can be difficult to review design work from looking at just the changed
|
||||||
files in a PR, a [preview site](./pr-previews.md) that includes your changes
|
files in a PR, a [preview site](./pr-previews.md) that includes your changes
|
||||||
|
|||||||
@@ -6,11 +6,11 @@ It's so complicated it needs its own README.
|
|||||||
|
|
||||||
Legend:
|
Legend:
|
||||||
|
|
||||||
- Orange = External event.
|
- Orange = External event.
|
||||||
- Purple = Deterministic flow.
|
- Purple = Deterministic flow.
|
||||||
- Green = Algorithm definition.
|
- Green = Algorithm definition.
|
||||||
- Red = Exit condition/point.
|
- Red = Exit condition/point.
|
||||||
- Blue = Process definition.
|
- Blue = Process definition.
|
||||||
|
|
||||||
## Algorithms involved
|
## Algorithms involved
|
||||||
|
|
||||||
@@ -68,14 +68,14 @@ simply get the manual sorting algorithm applied to them with no further involvem
|
|||||||
algorithm. There are 4 categories: Red, Grey, Bold, and Idle. Each has their own definition based off
|
algorithm. There are 4 categories: Red, Grey, Bold, and Idle. Each has their own definition based off
|
||||||
relative (perceived) importance to the user:
|
relative (perceived) importance to the user:
|
||||||
|
|
||||||
- **Red**: The room has unread mentions waiting for the user.
|
- **Red**: The room has unread mentions waiting for the user.
|
||||||
- **Grey**: The room has unread notifications waiting for the user. Notifications are simply unread
|
- **Grey**: The room has unread notifications waiting for the user. Notifications are simply unread
|
||||||
messages which cause a push notification or badge count. Typically, this is the default as rooms get
|
messages which cause a push notification or badge count. Typically, this is the default as rooms get
|
||||||
set to 'All Messages'.
|
set to 'All Messages'.
|
||||||
- **Bold**: The room has unread messages waiting for the user. Essentially this is a grey room without
|
- **Bold**: The room has unread messages waiting for the user. Essentially this is a grey room without
|
||||||
a badge/notification count (or 'Mentions Only'/'Muted').
|
a badge/notification count (or 'Mentions Only'/'Muted').
|
||||||
- **Idle**: No useful (see definition of useful above) activity has occurred in the room since the user
|
- **Idle**: No useful (see definition of useful above) activity has occurred in the room since the user
|
||||||
last read it.
|
last read it.
|
||||||
|
|
||||||
Conveniently, each tag gets ordered by those categories as presented: red rooms appear above grey, grey
|
Conveniently, each tag gets ordered by those categories as presented: red rooms appear above grey, grey
|
||||||
above bold, etc.
|
above bold, etc.
|
||||||
|
|||||||
@@ -10,13 +10,13 @@ of dealing with the different levels and exposes easy to use getters and setters
|
|||||||
Granular Settings rely on a series of known levels in order to use the correct value for the scenario. These levels, in
|
Granular Settings rely on a series of known levels in order to use the correct value for the scenario. These levels, in
|
||||||
order of priority, are:
|
order of priority, are:
|
||||||
|
|
||||||
- `device` - The current user's device
|
- `device` - The current user's device
|
||||||
- `room-device` - The current user's device, but only when in a specific room
|
- `room-device` - The current user's device, but only when in a specific room
|
||||||
- `room-account` - The current user's account, but only when in a specific room
|
- `room-account` - The current user's account, but only when in a specific room
|
||||||
- `account` - The current user's account
|
- `account` - The current user's account
|
||||||
- `room` - A specific room (setting for all members of the room)
|
- `room` - A specific room (setting for all members of the room)
|
||||||
- `config` - Values are defined by the `setting_defaults` key (usually) in `config.json`
|
- `config` - Values are defined by the `setting_defaults` key (usually) in `config.json`
|
||||||
- `default` - The hardcoded default for the settings
|
- `default` - The hardcoded default for the settings
|
||||||
|
|
||||||
Individual settings may control which levels are appropriate for them as part of the defaults. This is often to ensure
|
Individual settings may control which levels are appropriate for them as part of the defaults. This is often to ensure
|
||||||
that room administrators cannot force account-only settings upon participants.
|
that room administrators cannot force account-only settings upon participants.
|
||||||
|
|||||||
@@ -29,7 +29,7 @@ default theme, you would use `default_theme: "custom-Electric Blue"`.
|
|||||||
|
|
||||||
e.g. in config.json:
|
e.g. in config.json:
|
||||||
|
|
||||||
```
|
```json5
|
||||||
"setting_defaults": {
|
"setting_defaults": {
|
||||||
"custom_themes": [
|
"custom_themes": [
|
||||||
{
|
{
|
||||||
@@ -59,6 +59,10 @@ e.g. in config.json:
|
|||||||
"timeline-text-color": "#2e2f32",
|
"timeline-text-color": "#2e2f32",
|
||||||
"timeline-text-secondary-color": "#61708b",
|
"timeline-text-secondary-color": "#61708b",
|
||||||
"timeline-highlights-color": "#f3f8fd",
|
"timeline-highlights-color": "#f3f8fd",
|
||||||
|
|
||||||
|
// These should both be 8 values long
|
||||||
|
"username-colors": ["#ff0000", /*...*/],
|
||||||
|
"avatar-background-colors": ["#cc0000", /*...*/]
|
||||||
},
|
},
|
||||||
"compound": {
|
"compound": {
|
||||||
"--cpd-color-icon-accent-tertiary": "var(--cpd-color-blue-800)",
|
"--cpd-color-icon-accent-tertiary": "var(--cpd-color-blue-800)",
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- A working [Development Setup](../README.md#setting-up-a-dev-environment)
|
- A working [Development Setup](../README.md#setting-up-a-dev-environment)
|
||||||
- Latest LTS version of Node.js installed
|
- Latest LTS version of Node.js installed
|
||||||
- Be able to understand English
|
- Be able to understand English
|
||||||
|
|
||||||
## Translating strings vs. marking strings for translation
|
## Translating strings vs. marking strings for translation
|
||||||
|
|
||||||
@@ -65,17 +65,17 @@ There you can also require all translations to be redone if the meaning of the s
|
|||||||
1. Add it to the array in `_t` for example `_t(TKEY, {variable: this.variable})`
|
1. Add it to the array in `_t` for example `_t(TKEY, {variable: this.variable})`
|
||||||
1. Add the variable inside the string. The syntax for variables is `%(variable)s`. Please note the _s_ at the end. The name of the variable has to match the previous used name.
|
1. Add the variable inside the string. The syntax for variables is `%(variable)s`. Please note the _s_ at the end. The name of the variable has to match the previous used name.
|
||||||
|
|
||||||
- You can use the special `count` variable to choose between multiple versions of the same string, in order to get the correct pluralization. E.g. `_t('You have %(count)s new messages', { count: 2 })` would show 'You have 2 new messages', while `_t('You have %(count)s new messages', { count: 1 })` would show 'You have one new message' (assuming a singular version of the string has been added to the translation file. See above). Passing in `count` is much preferred over having an if-statement choose the correct string to use, because some languages have much more complicated plural rules than english (e.g. they might need a completely different form if there are three things rather than two).
|
- You can use the special `count` variable to choose between multiple versions of the same string, in order to get the correct pluralization. E.g. `_t('You have %(count)s new messages', { count: 2 })` would show 'You have 2 new messages', while `_t('You have %(count)s new messages', { count: 1 })` would show 'You have one new message' (assuming a singular version of the string has been added to the translation file. See above). Passing in `count` is much preferred over having an if-statement choose the correct string to use, because some languages have much more complicated plural rules than english (e.g. they might need a completely different form if there are three things rather than two).
|
||||||
- If you want to translate text that includes e.g. hyperlinks or other HTML you have to also use tag substitution, e.g. `_t('<a>Click here!</a>', {}, { 'a': (sub) => <a>{sub}</a> })`. If you don't do the tag substitution you will end up showing literally '<a>' rather than making a hyperlink.
|
- If you want to translate text that includes e.g. hyperlinks or other HTML you have to also use tag substitution, e.g. `_t('<a>Click here!</a>', {}, { 'a': (sub) => <a>{sub}</a> })`. If you don't do the tag substitution you will end up showing literally '<a>' rather than making a hyperlink.
|
||||||
- You can also use React components with normal variable substitution if you want to insert HTML markup, e.g. `_t('Your email address is %(emailAddress)s', { emailAddress: <i>{userEmailAddress}</i> })`.
|
- You can also use React components with normal variable substitution if you want to insert HTML markup, e.g. `_t('Your email address is %(emailAddress)s', { emailAddress: <i>{userEmailAddress}</i> })`.
|
||||||
|
|
||||||
## Things to know/Style Guides
|
## Things to know/Style Guides
|
||||||
|
|
||||||
- Do not use `_t()` inside `getDefaultProps`: the translations aren't loaded when `getDefaultProps` is called, leading to missing translations. Use `_td()` to indicate that `_t()` will be called on the string later.
|
- Do not use `_t()` inside `getDefaultProps`: the translations aren't loaded when `getDefaultProps` is called, leading to missing translations. Use `_td()` to indicate that `_t()` will be called on the string later.
|
||||||
- If using translated strings as constants, translated strings can't be in constants loaded at class-load time since the translations won't be loaded. Mark the strings using `_td()` instead and perform the actual translation later.
|
- If using translated strings as constants, translated strings can't be in constants loaded at class-load time since the translations won't be loaded. Mark the strings using `_td()` instead and perform the actual translation later.
|
||||||
- If a string is presented in the UI with punctuation like a full stop, include this in the translation strings, since punctuation varies between languages too.
|
- If a string is presented in the UI with punctuation like a full stop, include this in the translation strings, since punctuation varies between languages too.
|
||||||
- Avoid "translation in parts", i.e. concatenating translated strings or using translated strings in variable substitutions. Context is important for translations, and translating partial strings this way is simply not always possible.
|
- Avoid "translation in parts", i.e. concatenating translated strings or using translated strings in variable substitutions. Context is important for translations, and translating partial strings this way is simply not always possible.
|
||||||
- Concatenating strings often also introduces an implicit assumption about word order (e.g. that the subject of the sentence comes first), which is incorrect for many languages.
|
- Concatenating strings often also introduces an implicit assumption about word order (e.g. that the subject of the sentence comes first), which is incorrect for many languages.
|
||||||
- Translation 'smell test': If you have a string that does not begin with a capital letter (is not the start of a sentence) or it ends with e.g. ':' or a preposition (e.g. 'to') you should recheck that you are not trying to translate a partial sentence.
|
- Translation 'smell test': If you have a string that does not begin with a capital letter (is not the start of a sentence) or it ends with e.g. ':' or a preposition (e.g. 'to') you should recheck that you are not trying to translate a partial sentence.
|
||||||
- If you have multiple strings, that are almost identical, except some part (e.g. a word or two) it is still better to translate the full sentence multiple times. It may seem like inefficient repetition, but unlike programming where you try to minimize repetition, translation is much faster if you have many, full, clear, sentences to work with, rather than fewer, but incomplete sentence fragments.
|
- If you have multiple strings, that are almost identical, except some part (e.g. a word or two) it is still better to translate the full sentence multiple times. It may seem like inefficient repetition, but unlike programming where you try to minimize repetition, translation is much faster if you have many, full, clear, sentences to work with, rather than fewer, but incomplete sentence fragments.
|
||||||
- Don't forget curly braces when you assign an expression to JSX attributes in the render method)
|
- Don't forget curly braces when you assign an expression to JSX attributes in the render method)
|
||||||
|
|||||||
@@ -2,9 +2,9 @@
|
|||||||
|
|
||||||
## Requirements
|
## Requirements
|
||||||
|
|
||||||
- Web Browser
|
- Web Browser
|
||||||
- Be able to understand English
|
- Be able to understand English
|
||||||
- Be able to understand the language you want to translate Element into
|
- Be able to understand the language you want to translate Element into
|
||||||
|
|
||||||
## Join #element-translations:matrix.org
|
## Join #element-translations:matrix.org
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -14,6 +14,8 @@ const config: Config = {
|
|||||||
testEnvironment: "jsdom",
|
testEnvironment: "jsdom",
|
||||||
testEnvironmentOptions: {
|
testEnvironmentOptions: {
|
||||||
url: "http://localhost/",
|
url: "http://localhost/",
|
||||||
|
// This is needed to be able to load dual CJS/ESM WASM packages e.g. rust crypto & matrix-wywiwyg
|
||||||
|
customExportConditions: ["browser", "node"],
|
||||||
},
|
},
|
||||||
testMatch: ["<rootDir>/test/**/*-test.[tj]s?(x)"],
|
testMatch: ["<rootDir>/test/**/*-test.[tj]s?(x)"],
|
||||||
globalSetup: "<rootDir>/test/globalSetup.ts",
|
globalSetup: "<rootDir>/test/globalSetup.ts",
|
||||||
@@ -32,13 +34,14 @@ const config: Config = {
|
|||||||
"decoderWorker\\.min\\.wasm": "<rootDir>/__mocks__/empty.js",
|
"decoderWorker\\.min\\.wasm": "<rootDir>/__mocks__/empty.js",
|
||||||
"waveWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",
|
"waveWorker\\.min\\.js": "<rootDir>/__mocks__/empty.js",
|
||||||
"context-filter-polyfill": "<rootDir>/__mocks__/empty.js",
|
"context-filter-polyfill": "<rootDir>/__mocks__/empty.js",
|
||||||
"FontManager.ts": "<rootDir>/__mocks__/FontManager.js",
|
|
||||||
"workers/(.+)Factory": "<rootDir>/__mocks__/workerFactoryMock.js",
|
"workers/(.+)Factory": "<rootDir>/__mocks__/workerFactoryMock.js",
|
||||||
"^!!raw-loader!.*": "jest-raw-loader",
|
"^!!raw-loader!.*": "jest-raw-loader",
|
||||||
"recorderWorkletFactory": "<rootDir>/__mocks__/empty.js",
|
"recorderWorkletFactory": "<rootDir>/__mocks__/empty.js",
|
||||||
"^fetch-mock$": "<rootDir>/node_modules/fetch-mock",
|
"^fetch-mock$": "<rootDir>/node_modules/fetch-mock",
|
||||||
|
// Requires ESM which is incompatible with our current Jest setup
|
||||||
|
"^@element-hq/element-web-module-api$": "<rootDir>/__mocks__/empty.js",
|
||||||
},
|
},
|
||||||
transformIgnorePatterns: ["/node_modules/(?!matrix-js-sdk).+$"],
|
transformIgnorePatterns: ["/node_modules/(?!(mime|matrix-js-sdk)).+$"],
|
||||||
collectCoverageFrom: [
|
collectCoverageFrom: [
|
||||||
"<rootDir>/src/**/*.{js,ts,tsx}",
|
"<rootDir>/src/**/*.{js,ts,tsx}",
|
||||||
// getSessionLock is piped into a different JS context via stringification, and the coverage functionality is
|
// getSessionLock is piped into a different JS context via stringification, and the coverage functionality is
|
||||||
|
|||||||
48
knip.ts
Normal file
48
knip.ts
Normal file
@@ -0,0 +1,48 @@
|
|||||||
|
import { KnipConfig } from "knip";
|
||||||
|
|
||||||
|
export default {
|
||||||
|
entry: [
|
||||||
|
"src/vector/index.ts",
|
||||||
|
"src/serviceworker/index.ts",
|
||||||
|
"src/workers/*.worker.ts",
|
||||||
|
"src/utils/exportUtils/exportJS.js",
|
||||||
|
"scripts/**",
|
||||||
|
"playwright/**",
|
||||||
|
"test/**",
|
||||||
|
"res/decoder-ring/**",
|
||||||
|
"res/jitsi_external_api.min.js",
|
||||||
|
"docs/**",
|
||||||
|
// Used by jest
|
||||||
|
"__mocks__/maplibre-gl.js",
|
||||||
|
],
|
||||||
|
project: ["**/*.{js,ts,jsx,tsx}"],
|
||||||
|
ignore: [
|
||||||
|
// Keep for now
|
||||||
|
"src/hooks/useLocalStorageState.ts",
|
||||||
|
"src/components/views/elements/InfoTooltip.tsx",
|
||||||
|
"src/components/views/elements/StyledCheckbox.tsx",
|
||||||
|
],
|
||||||
|
ignoreDependencies: [
|
||||||
|
// Required for `action-validator`
|
||||||
|
"@action-validator/*",
|
||||||
|
// Used for git pre-commit hooks
|
||||||
|
"husky",
|
||||||
|
// Used by jest
|
||||||
|
"babel-jest",
|
||||||
|
// Used by babel
|
||||||
|
"@babel/runtime",
|
||||||
|
"@babel/plugin-transform-class-properties",
|
||||||
|
// Referenced in PCSS
|
||||||
|
"github-markdown-css",
|
||||||
|
// False positive
|
||||||
|
"sw.js",
|
||||||
|
// Used by webpack
|
||||||
|
"process",
|
||||||
|
"util",
|
||||||
|
],
|
||||||
|
ignoreBinaries: [
|
||||||
|
// Used in scripts & workflows
|
||||||
|
"jq",
|
||||||
|
],
|
||||||
|
ignoreExportsUsedInFile: true,
|
||||||
|
} satisfies KnipConfig;
|
||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2022-2024 New Vector Ltd.
|
Copyright 2022-2024 New Vector Ltd.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2022-2024 New Vector Ltd.
|
Copyright 2022-2024 New Vector Ltd.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -9,7 +9,7 @@ import * as fs from "fs";
|
|||||||
import * as childProcess from "child_process";
|
import * as childProcess from "child_process";
|
||||||
import * as semver from "semver";
|
import * as semver from "semver";
|
||||||
|
|
||||||
import { BuildConfig } from "./BuildConfig";
|
import { type BuildConfig } from "./BuildConfig";
|
||||||
|
|
||||||
// This expects to be run from ./scripts/install.ts
|
// This expects to be run from ./scripts/install.ts
|
||||||
|
|
||||||
@@ -23,10 +23,9 @@ const MODULES_TS_HEADER = `
|
|||||||
* You are not a salmon.
|
* You are not a salmon.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { RuntimeModule } from "@matrix-org/react-sdk-module-api/lib/RuntimeModule";
|
|
||||||
`;
|
`;
|
||||||
const MODULES_TS_DEFINITIONS = `
|
const MODULES_TS_DEFINITIONS = `
|
||||||
export const INSTALLED_MODULES: RuntimeModule[] = [];
|
export const INSTALLED_MODULES = [];
|
||||||
`;
|
`;
|
||||||
|
|
||||||
export function installer(config: BuildConfig): void {
|
export function installer(config: BuildConfig): void {
|
||||||
@@ -78,8 +77,8 @@ export function installer(config: BuildConfig): void {
|
|||||||
return; // hit the finally{} block before exiting
|
return; // hit the finally{} block before exiting
|
||||||
}
|
}
|
||||||
|
|
||||||
// If we reach here, everything seems fine. Write modules.ts and log some output
|
// If we reach here, everything seems fine. Write modules.js and log some output
|
||||||
// Note: we compile modules.ts in two parts for developer friendliness if they
|
// Note: we compile modules.js in two parts for developer friendliness if they
|
||||||
// happen to look at it.
|
// happen to look at it.
|
||||||
console.log("The following modules have been installed: ", installedModules);
|
console.log("The following modules have been installed: ", installedModules);
|
||||||
let modulesTsHeader = MODULES_TS_HEADER;
|
let modulesTsHeader = MODULES_TS_HEADER;
|
||||||
@@ -193,5 +192,5 @@ function isModuleVersionCompatible(ourApiVersion: string, moduleApiVersion: stri
|
|||||||
}
|
}
|
||||||
|
|
||||||
function writeModulesTs(content: string): void {
|
function writeModulesTs(content: string): void {
|
||||||
fs.writeFileSync("./src/modules.ts", content, "utf-8");
|
fs.writeFileSync("./src/modules.js", content, "utf-8");
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
Copyright 2022-2024 New Vector Ltd.
|
Copyright 2022-2024 New Vector Ltd.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
121
package.json
121
package.json
@@ -1,13 +1,13 @@
|
|||||||
{
|
{
|
||||||
"name": "element-web",
|
"name": "element-web",
|
||||||
"version": "1.11.81",
|
"version": "1.11.91",
|
||||||
"description": "A feature-rich client for Matrix.org",
|
"description": "Element: the future of secure communication",
|
||||||
"author": "New Vector Ltd.",
|
"author": "New Vector Ltd.",
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
"url": "https://github.com/element-hq/element-web"
|
"url": "https://github.com/element-hq/element-web"
|
||||||
},
|
},
|
||||||
"license": "AGPL-3.0-only OR GPL-3.0-only",
|
"license": "SEE LICENSE IN README.md",
|
||||||
"files": [
|
"files": [
|
||||||
"lib",
|
"lib",
|
||||||
"res",
|
"res",
|
||||||
@@ -35,7 +35,7 @@
|
|||||||
"i18n:lint": "matrix-i18n-lint && prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null",
|
"i18n:lint": "matrix-i18n-lint && prettier --log-level=silent --write src/i18n/strings/ --ignore-path /dev/null",
|
||||||
"i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
|
"i18n:diff": "cp src/i18n/strings/en_EN.json src/i18n/strings/en_EN_orig.json && yarn i18n && matrix-compare-i18n-files src/i18n/strings/en_EN_orig.json src/i18n/strings/en_EN.json",
|
||||||
"make-component": "node scripts/make-react-component.js",
|
"make-component": "node scripts/make-react-component.js",
|
||||||
"rethemendex": "res/css/rethemendex.sh",
|
"rethemendex": "./res/css/rethemendex.sh",
|
||||||
"clean": "rimraf lib webapp",
|
"clean": "rimraf lib webapp",
|
||||||
"build": "yarn clean && yarn build:genfiles && yarn build:bundle",
|
"build": "yarn clean && yarn build:genfiles && yarn build:bundle",
|
||||||
"build-stats": "yarn clean && yarn build:genfiles && yarn build:bundle-stats",
|
"build-stats": "yarn clean && yarn build:genfiles && yarn build:bundle-stats",
|
||||||
@@ -45,58 +45,60 @@
|
|||||||
"build:bundle": "webpack --progress --mode production",
|
"build:bundle": "webpack --progress --mode production",
|
||||||
"build:bundle-stats": "webpack --progress --mode production --json > webpack-stats.json",
|
"build:bundle-stats": "webpack --progress --mode production --json > webpack-stats.json",
|
||||||
"build:module_system": "ts-node --project ./tsconfig.module_system.json module_system/scripts/install.ts",
|
"build:module_system": "ts-node --project ./tsconfig.module_system.json module_system/scripts/install.ts",
|
||||||
"dist": "scripts/package.sh",
|
"dist": "./scripts/package.sh",
|
||||||
"start": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n modules,res \"yarn build:module_system\" \"yarn build:res\" && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js\"",
|
"start": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n modules,res \"yarn build:module_system\" \"yarn build:res\" && concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js\"",
|
||||||
"start:https": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js --server-type https\"",
|
"start:https": "concurrently --kill-others-on-fail --prefix \"{time} [{name}]\" -n res,element-js \"yarn start:res\" \"yarn start:js --server-type https\"",
|
||||||
"start:res": "ts-node scripts/copy-res.ts -w",
|
"start:res": "ts-node scripts/copy-res.ts -w",
|
||||||
"start:js": "webpack serve --output-path webapp --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js --mode development",
|
"start:js": "webpack serve --output-path webapp --output-filename=bundles/_dev_/[name].js --output-chunk-filename=bundles/_dev_/[name].js --mode development",
|
||||||
"lint": "yarn lint:types && yarn lint:js && yarn lint:style && yarn lint:workflows",
|
"lint": "yarn lint:types && yarn lint:js && yarn lint:style && yarn lint:workflows",
|
||||||
"lint:js": "yarn lint:js:src && yarn lint:js:module_system",
|
"lint:js": "eslint --max-warnings 0 src test playwright module_system && prettier --check .",
|
||||||
"lint:js:src": "eslint --max-warnings 0 src test playwright && prettier --check .",
|
"lint:js-fix": "prettier --log-level=warn --write . && eslint --fix src test playwright module_system",
|
||||||
"lint:js:module_system": "eslint --max-warnings 0 --config .eslintrc-module_system.js module_system",
|
|
||||||
"lint:js-fix": "yarn lint:js-fix:src && yarn lint:js-fix:module_system",
|
|
||||||
"lint:js-fix:src": "prettier --log-level=warn --write . && eslint --fix src test playwright",
|
|
||||||
"lint:js-fix:module_system": "eslint --fix --config .eslintrc-module_system.js module_system",
|
|
||||||
"lint:types": "yarn lint:types:src && yarn lint:types:module_system",
|
"lint:types": "yarn lint:types:src && yarn lint:types:module_system",
|
||||||
"lint:types:src": "tsc --noEmit --jsx react && tsc --noEmit --jsx react -p playwright",
|
"lint:types:src": "tsc --noEmit --jsx react && tsc --noEmit --jsx react -p playwright",
|
||||||
"lint:types:module_system": "tsc --noEmit --project ./tsconfig.module_system.json",
|
"lint:types:module_system": "tsc --noEmit --project ./tsconfig.module_system.json",
|
||||||
"lint:style": "stylelint \"res/css/**/*.pcss\"",
|
"lint:style": "stylelint \"res/css/**/*.pcss\"",
|
||||||
"lint:workflows": "find .github/workflows -type f \\( -iname '*.yaml' -o -iname '*.yml' \\) | xargs -I {} sh -c 'echo \"Linting {}\"; action-validator \"{}\"'",
|
"lint:workflows": "find .github/workflows -type f \\( -iname '*.yaml' -o -iname '*.yml' \\) | xargs -I {} sh -c 'echo \"Linting {}\"; action-validator \"{}\"'",
|
||||||
|
"lint:knip": "knip",
|
||||||
"test": "jest",
|
"test": "jest",
|
||||||
"test:playwright": "playwright test",
|
"test:playwright": "playwright test",
|
||||||
"test:playwright:open": "yarn test:playwright --ui",
|
"test:playwright:open": "yarn test:playwright --ui",
|
||||||
"test:playwright:screenshots": "yarn test:playwright:screenshots:build && yarn test:playwright:screenshots:run",
|
"test:playwright:screenshots": "yarn test:playwright:screenshots:build && yarn test:playwright:screenshots:run",
|
||||||
"test:playwright:screenshots:build": "docker build playwright -t element-web-playwright",
|
"test:playwright:screenshots:build": "docker build playwright -t element-web-playwright",
|
||||||
"test:playwright:screenshots:run": "docker run --rm --network host -e BASE_URL -e CI -v $(pwd):/work/ -v $(node -e 'console.log(require(`path`).dirname(require.resolve(`matrix-js-sdk/package.json`)))'):/work/node_modules/matrix-js-sdk -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/:/tmp/ -it element-web-playwright",
|
"test:playwright:screenshots:run": "docker run --rm --network host -e BASE_URL -e CI -v $(pwd):/work/ -v $(node -e 'console.log(require(`path`).dirname(require.resolve(`matrix-js-sdk/package.json`)))'):/work/node_modules/matrix-js-sdk -v /var/run/docker.sock:/var/run/docker.sock -v /tmp/:/tmp/ -it element-web-playwright --grep @screenshot --project=Chrome",
|
||||||
"coverage": "yarn test --coverage",
|
"coverage": "yarn test --coverage",
|
||||||
"analyse:unused-exports": "ts-node ./scripts/analyse_unused_exports.ts",
|
|
||||||
"analyse:webpack-bundles": "webpack-bundle-analyzer webpack-stats.json webapp",
|
"analyse:webpack-bundles": "webpack-bundle-analyzer webpack-stats.json webapp",
|
||||||
"update:jitsi": "curl -s https://meet.element.io/libs/external_api.min.js > ./res/jitsi_external_api.min.js"
|
"update:jitsi": "curl -s https://meet.element.io/libs/external_api.min.js > ./res/jitsi_external_api.min.js"
|
||||||
},
|
},
|
||||||
"resolutions": {
|
"resolutions": {
|
||||||
"@types/seedrandom": "3.0.8",
|
"@types/react": "18.3.18",
|
||||||
|
"@types/react-dom": "18.3.5",
|
||||||
"oidc-client-ts": "3.1.0",
|
"oidc-client-ts": "3.1.0",
|
||||||
"jwt-decode": "4.0.0",
|
"jwt-decode": "4.0.0",
|
||||||
"caniuse-lite": "1.0.30001668",
|
"caniuse-lite": "1.0.30001699",
|
||||||
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0",
|
"wrap-ansi-cjs": "npm:wrap-ansi@^7.0.0",
|
||||||
"wrap-ansi": "npm:wrap-ansi@^7.0.0"
|
"wrap-ansi": "npm:wrap-ansi@^7.0.0"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@babel/runtime": "^7.12.5",
|
"@babel/runtime": "^7.12.5",
|
||||||
|
"@element-hq/element-web-module-api": "^0.1.1",
|
||||||
|
"@fontsource/inconsolata": "^5",
|
||||||
|
"@fontsource/inter": "^5",
|
||||||
"@formatjs/intl-segmenter": "^11.5.7",
|
"@formatjs/intl-segmenter": "^11.5.7",
|
||||||
"@matrix-org/analytics-events": "^0.28.0",
|
"@matrix-org/analytics-events": "^0.29.0",
|
||||||
"@matrix-org/emojibase-bindings": "^1.3.3",
|
"@matrix-org/emojibase-bindings": "^1.3.4",
|
||||||
"@vector-im/matrix-wysiwyg": "2.37.13",
|
|
||||||
"@matrix-org/react-sdk-module-api": "^2.4.0",
|
"@matrix-org/react-sdk-module-api": "^2.4.0",
|
||||||
"@matrix-org/spec": "^1.7.0",
|
"@matrix-org/spec": "^1.7.0",
|
||||||
"@sentry/browser": "^8.0.0",
|
"@sentry/browser": "^9.0.0",
|
||||||
"@vector-im/compound-design-tokens": "^1.8.0",
|
"@types/png-chunks-extract": "^1.0.2",
|
||||||
"@vector-im/compound-web": "^7.1.0",
|
"@types/react-virtualized": "^9.21.30",
|
||||||
|
"@vector-im/compound-design-tokens": "^3.0.0",
|
||||||
|
"@vector-im/compound-web": "^7.6.1",
|
||||||
|
"@vector-im/matrix-wysiwyg": "2.38.0",
|
||||||
"@zxcvbn-ts/core": "^3.0.4",
|
"@zxcvbn-ts/core": "^3.0.4",
|
||||||
"@zxcvbn-ts/language-common": "^3.0.4",
|
"@zxcvbn-ts/language-common": "^3.0.4",
|
||||||
"@zxcvbn-ts/language-en": "^3.0.2",
|
"@zxcvbn-ts/language-en": "^3.0.2",
|
||||||
"await-lock": "^2.1.0",
|
"await-lock": "^2.1.0",
|
||||||
"bloom-filters": "^3.0.1",
|
"bloom-filters": "^3.0.3",
|
||||||
"blurhash": "^2.0.3",
|
"blurhash": "^2.0.3",
|
||||||
"browserslist": "^4.23.2",
|
"browserslist": "^4.23.2",
|
||||||
"classnames": "^2.2.6",
|
"classnames": "^2.2.6",
|
||||||
@@ -114,37 +116,39 @@
|
|||||||
"highlight.js": "^11.3.1",
|
"highlight.js": "^11.3.1",
|
||||||
"html-entities": "^2.0.0",
|
"html-entities": "^2.0.0",
|
||||||
"is-ip": "^3.1.0",
|
"is-ip": "^3.1.0",
|
||||||
"jsrsasign": "^11.0.0",
|
|
||||||
"js-xxhash": "^4.0.0",
|
"js-xxhash": "^4.0.0",
|
||||||
|
"jsrsasign": "^11.0.0",
|
||||||
"jszip": "^3.7.0",
|
"jszip": "^3.7.0",
|
||||||
"katex": "^0.16.0",
|
"katex": "^0.16.0",
|
||||||
"linkify-element": "4.1.3",
|
"linkify-element": "4.2.0",
|
||||||
"linkify-react": "4.1.3",
|
"linkify-react": "4.2.0",
|
||||||
"linkify-string": "4.1.3",
|
"linkify-string": "4.2.0",
|
||||||
"linkifyjs": "4.1.3",
|
"linkifyjs": "4.2.0",
|
||||||
"lodash": "^4.17.21",
|
"lodash": "^4.17.21",
|
||||||
"maplibre-gl": "^2.0.0",
|
"maplibre-gl": "^5.0.0",
|
||||||
"matrix-encrypt-attachment": "^1.0.3",
|
"matrix-encrypt-attachment": "^1.0.3",
|
||||||
"matrix-events-sdk": "0.0.1",
|
"matrix-events-sdk": "0.0.1",
|
||||||
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
|
"matrix-js-sdk": "github:matrix-org/matrix-js-sdk#develop",
|
||||||
"matrix-widget-api": "^1.9.0",
|
"matrix-widget-api": "^1.10.0",
|
||||||
"memoize-one": "^6.0.0",
|
"memoize-one": "^6.0.0",
|
||||||
|
"mime": "^4.0.4",
|
||||||
"oidc-client-ts": "^3.0.1",
|
"oidc-client-ts": "^3.0.1",
|
||||||
"opus-recorder": "^8.0.3",
|
"opus-recorder": "^8.0.3",
|
||||||
"pako": "^2.0.3",
|
"pako": "^2.0.3",
|
||||||
"png-chunks-extract": "^1.0.0",
|
"png-chunks-extract": "^1.0.0",
|
||||||
"posthog-js": "1.157.2",
|
"posthog-js": "1.157.2",
|
||||||
"qrcode": "1.5.4",
|
"qrcode": "1.5.4",
|
||||||
"re-resizable": "6.9.17",
|
"re-resizable": "6.10.3",
|
||||||
"react": "^18.3.1",
|
"react": "^18.3.1",
|
||||||
"react-beautiful-dnd": "^13.1.0",
|
"react-beautiful-dnd": "^13.1.0",
|
||||||
"react-blurhash": "^0.3.0",
|
"react-blurhash": "^0.3.0",
|
||||||
"react-dom": "^18.3.1",
|
"react-dom": "^18.3.1",
|
||||||
"react-focus-lock": "^2.5.1",
|
"react-focus-lock": "^2.5.1",
|
||||||
"react-transition-group": "^4.4.1",
|
"react-transition-group": "^4.4.1",
|
||||||
|
"react-virtualized": "^9.22.5",
|
||||||
"rfc4648": "^1.4.0",
|
"rfc4648": "^1.4.0",
|
||||||
"sanitize-filename": "^1.6.3",
|
"sanitize-filename": "^1.6.3",
|
||||||
"sanitize-html": "2.13.1",
|
"sanitize-html": "2.14.0",
|
||||||
"tar-js": "^0.3.0",
|
"tar-js": "^0.3.0",
|
||||||
"temporal-polyfill": "^0.2.5",
|
"temporal-polyfill": "^0.2.5",
|
||||||
"ua-parser-js": "^1.0.2",
|
"ua-parser-js": "^1.0.2",
|
||||||
@@ -155,11 +159,9 @@
|
|||||||
"@action-validator/cli": "^0.6.0",
|
"@action-validator/cli": "^0.6.0",
|
||||||
"@action-validator/core": "^0.6.0",
|
"@action-validator/core": "^0.6.0",
|
||||||
"@axe-core/playwright": "^4.8.1",
|
"@axe-core/playwright": "^4.8.1",
|
||||||
"@babel/cli": "^7.12.10",
|
|
||||||
"@babel/core": "^7.12.10",
|
"@babel/core": "^7.12.10",
|
||||||
"@babel/eslint-parser": "^7.12.10",
|
"@babel/eslint-parser": "^7.12.10",
|
||||||
"@babel/eslint-plugin": "^7.12.10",
|
"@babel/eslint-plugin": "^7.12.10",
|
||||||
"@babel/parser": "^7.12.11",
|
|
||||||
"@babel/plugin-proposal-export-default-from": "^7.12.1",
|
"@babel/plugin-proposal-export-default-from": "^7.12.1",
|
||||||
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
"@babel/plugin-syntax-dynamic-import": "^7.8.3",
|
||||||
"@babel/plugin-transform-class-properties": "^7.12.1",
|
"@babel/plugin-transform-class-properties": "^7.12.1",
|
||||||
@@ -172,28 +174,26 @@
|
|||||||
"@babel/preset-env": "^7.12.11",
|
"@babel/preset-env": "^7.12.11",
|
||||||
"@babel/preset-react": "^7.12.10",
|
"@babel/preset-react": "^7.12.10",
|
||||||
"@babel/preset-typescript": "^7.12.7",
|
"@babel/preset-typescript": "^7.12.7",
|
||||||
"@babel/register": "^7.12.10",
|
|
||||||
"@babel/runtime": "^7.12.5",
|
"@babel/runtime": "^7.12.5",
|
||||||
"@casualbot/jest-sonar-reporter": "2.2.7",
|
"@casualbot/jest-sonar-reporter": "2.2.7",
|
||||||
"@peculiar/webcrypto": "^1.4.3",
|
"@peculiar/webcrypto": "^1.4.3",
|
||||||
"@playwright/test": "^1.40.1",
|
"@playwright/test": "^1.40.1",
|
||||||
"@principalstudio/html-webpack-inject-preload": "^1.2.7",
|
"@principalstudio/html-webpack-inject-preload": "^1.2.7",
|
||||||
"@sentry/webpack-plugin": "^2.7.1",
|
"@sentry/webpack-plugin": "^3.0.0",
|
||||||
"@stylistic/eslint-plugin": "^2.9.0",
|
"@stylistic/eslint-plugin": "^3.0.0",
|
||||||
"@svgr/webpack": "^8.0.0",
|
"@svgr/webpack": "^8.0.0",
|
||||||
|
"@testcontainers/postgresql": "^10.16.0",
|
||||||
"@testing-library/dom": "^10.4.0",
|
"@testing-library/dom": "^10.4.0",
|
||||||
"@testing-library/jest-dom": "^6.4.8",
|
"@testing-library/jest-dom": "^6.4.8",
|
||||||
"@testing-library/react": "^16.0.0",
|
"@testing-library/react": "^16.0.0",
|
||||||
"@testing-library/user-event": "^14.5.2",
|
"@testing-library/user-event": "^14.5.2",
|
||||||
"@types/commonmark": "^0.27.4",
|
"@types/commonmark": "^0.27.4",
|
||||||
"@types/content-type": "^1.1.5",
|
|
||||||
"@types/counterpart": "^0.18.1",
|
"@types/counterpart": "^0.18.1",
|
||||||
"@types/css-tree": "^2.3.8",
|
"@types/css-tree": "^2.3.8",
|
||||||
"@types/diff-match-patch": "^1.0.32",
|
"@types/diff-match-patch": "^1.0.32",
|
||||||
"@types/escape-html": "^1.0.1",
|
"@types/escape-html": "^1.0.1",
|
||||||
"@types/express": "^5.0.0",
|
"@types/express": "^5.0.0",
|
||||||
"@types/file-saver": "^2.0.3",
|
"@types/file-saver": "^2.0.3",
|
||||||
"@types/fs-extra": "^11.0.0",
|
|
||||||
"@types/glob-to-regexp": "^0.4.1",
|
"@types/glob-to-regexp": "^0.4.1",
|
||||||
"@types/jest": "29.5.12",
|
"@types/jest": "29.5.12",
|
||||||
"@types/jitsi-meet": "^2.0.2",
|
"@types/jitsi-meet": "^2.0.2",
|
||||||
@@ -206,25 +206,21 @@
|
|||||||
"@types/node-fetch": "^2.6.2",
|
"@types/node-fetch": "^2.6.2",
|
||||||
"@types/pako": "^2.0.0",
|
"@types/pako": "^2.0.0",
|
||||||
"@types/qrcode": "^1.3.5",
|
"@types/qrcode": "^1.3.5",
|
||||||
"@types/react": "18.3.3",
|
"@types/react": "18.3.18",
|
||||||
"@types/react-beautiful-dnd": "^13.0.0",
|
"@types/react-beautiful-dnd": "^13.0.0",
|
||||||
"@types/react-dom": "18.3.1",
|
"@types/react-dom": "18.3.5",
|
||||||
"@types/react-transition-group": "^4.4.0",
|
"@types/react-transition-group": "^4.4.0",
|
||||||
"@types/sanitize-html": "2.13.0",
|
"@types/sanitize-html": "2.13.0",
|
||||||
"@types/sdp-transform": "^2.4.6",
|
|
||||||
"@types/seedrandom": "3.0.8",
|
|
||||||
"@types/semver": "^7.5.8",
|
"@types/semver": "^7.5.8",
|
||||||
"@types/tar-js": "^0.3.5",
|
"@types/tar-js": "^0.3.5",
|
||||||
"@types/ua-parser-js": "^0.7.36",
|
"@types/ua-parser-js": "^0.7.36",
|
||||||
"@types/uuid": "^10.0.0",
|
"@types/uuid": "^10.0.0",
|
||||||
"@typescript-eslint/eslint-plugin": "^8.0.0",
|
"@typescript-eslint/eslint-plugin": "^8.19.0",
|
||||||
"@typescript-eslint/parser": "^8.0.0",
|
"@typescript-eslint/parser": "^8.19.0",
|
||||||
"axe-core": "4.10.2",
|
|
||||||
"babel-jest": "^29.0.0",
|
"babel-jest": "^29.0.0",
|
||||||
"babel-loader": "^9.0.0",
|
"babel-loader": "^9.0.0",
|
||||||
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
|
"babel-plugin-jsx-remove-data-test-id": "^3.0.0",
|
||||||
"blob-polyfill": "^9.0.0",
|
"blob-polyfill": "^9.0.0",
|
||||||
"buffer": "^6.0.3",
|
|
||||||
"chokidar": "^4.0.0",
|
"chokidar": "^4.0.0",
|
||||||
"concurrently": "^9.0.0",
|
"concurrently": "^9.0.0",
|
||||||
"copy-webpack-plugin": "^12.0.0",
|
"copy-webpack-plugin": "^12.0.0",
|
||||||
@@ -235,13 +231,14 @@
|
|||||||
"dotenv": "^16.0.2",
|
"dotenv": "^16.0.2",
|
||||||
"eslint": "8.57.1",
|
"eslint": "8.57.1",
|
||||||
"eslint-config-google": "^0.14.0",
|
"eslint-config-google": "^0.14.0",
|
||||||
"eslint-config-prettier": "^9.0.0",
|
"eslint-config-prettier": "^10.0.0",
|
||||||
"eslint-plugin-deprecate": "0.8.5",
|
"eslint-plugin-deprecate": "0.8.5",
|
||||||
"eslint-plugin-import": "^2.25.4",
|
"eslint-plugin-import": "^2.25.4",
|
||||||
"eslint-plugin-jest": "^28.0.0",
|
"eslint-plugin-jest": "^28.0.0",
|
||||||
"eslint-plugin-jsx-a11y": "^6.5.1",
|
"eslint-plugin-jsx-a11y": "^6.5.1",
|
||||||
"eslint-plugin-matrix-org": "^2.0.2",
|
"eslint-plugin-matrix-org": "^2.0.2",
|
||||||
"eslint-plugin-react": "^7.28.0",
|
"eslint-plugin-react": "^7.28.0",
|
||||||
|
"eslint-plugin-react-compiler": "^19.0.0-beta-df7b47d-20241124",
|
||||||
"eslint-plugin-react-hooks": "^5.0.0",
|
"eslint-plugin-react-hooks": "^5.0.0",
|
||||||
"eslint-plugin-unicorn": "^56.0.0",
|
"eslint-plugin-unicorn": "^56.0.0",
|
||||||
"express": "^4.18.2",
|
"express": "^4.18.2",
|
||||||
@@ -249,7 +246,6 @@
|
|||||||
"fetch-mock": "9.11.0",
|
"fetch-mock": "9.11.0",
|
||||||
"fetch-mock-jest": "^1.5.1",
|
"fetch-mock-jest": "^1.5.1",
|
||||||
"file-loader": "^6.0.0",
|
"file-loader": "^6.0.0",
|
||||||
"fs-extra": "^11.0.0",
|
|
||||||
"glob": "^11.0.0",
|
"glob": "^11.0.0",
|
||||||
"html-webpack-plugin": "^5.5.3",
|
"html-webpack-plugin": "^5.5.3",
|
||||||
"husky": "^9.0.0",
|
"husky": "^9.0.0",
|
||||||
@@ -259,45 +255,48 @@
|
|||||||
"jest-mock": "^29.6.2",
|
"jest-mock": "^29.6.2",
|
||||||
"jest-raw-loader": "^1.0.1",
|
"jest-raw-loader": "^1.0.1",
|
||||||
"jsqr": "^1.4.0",
|
"jsqr": "^1.4.0",
|
||||||
|
"knip": "^5.36.2",
|
||||||
"lint-staged": "^15.0.2",
|
"lint-staged": "^15.0.2",
|
||||||
"mailhog": "^4.16.0",
|
"mailpit-api": "^1.0.5",
|
||||||
"matrix-mock-request": "^2.5.0",
|
|
||||||
"matrix-web-i18n": "^3.2.1",
|
"matrix-web-i18n": "^3.2.1",
|
||||||
"mini-css-extract-plugin": "2.9.0",
|
"mini-css-extract-plugin": "2.9.2",
|
||||||
"minimist": "^1.2.6",
|
"minimist": "^1.2.6",
|
||||||
"mkdirp": "^3.0.0",
|
|
||||||
"mocha-junit-reporter": "^2.2.0",
|
|
||||||
"modernizr": "^3.12.0",
|
"modernizr": "^3.12.0",
|
||||||
"node-fetch": "^2.6.7",
|
"node-fetch": "^2.6.7",
|
||||||
"playwright-core": "^1.45.1",
|
"playwright-core": "^1.45.1",
|
||||||
"postcss": "8.4.38",
|
"postcss": "8.4.46",
|
||||||
"postcss-easings": "^4.0.0",
|
"postcss-easings": "^4.0.0",
|
||||||
"postcss-hexrgba": "2.1.0",
|
"postcss-hexrgba": "2.1.0",
|
||||||
"postcss-import": "16.1.0",
|
"postcss-import": "16.1.0",
|
||||||
"postcss-loader": "8.1.1",
|
"postcss-loader": "8.1.1",
|
||||||
"postcss-mixins": "^11.0.0",
|
"postcss-mixins": "^11.0.0",
|
||||||
"postcss-nested": "^6.0.0",
|
"postcss-nested": "^7.0.0",
|
||||||
"postcss-preset-env": "^10.0.0",
|
"postcss-preset-env": "^10.0.0",
|
||||||
"postcss-scss": "^4.0.4",
|
"postcss-scss": "^4.0.4",
|
||||||
"postcss-simple-vars": "^7.0.1",
|
"postcss-simple-vars": "^7.0.1",
|
||||||
"prettier": "3.3.3",
|
"prettier": "3.5.1",
|
||||||
"process": "^0.11.10",
|
"process": "^0.11.10",
|
||||||
"raw-loader": "^4.0.2",
|
"raw-loader": "^4.0.2",
|
||||||
"rimraf": "^6.0.0",
|
"rimraf": "^6.0.0",
|
||||||
"semver": "^7.5.2",
|
"semver": "^7.5.2",
|
||||||
"stylelint": "^16.1.0",
|
"source-map-loader": "^5.0.0",
|
||||||
"stylelint-config-standard": "^36.0.0",
|
"strip-ansi": "^7.1.0",
|
||||||
|
"stylelint": "^16.13.0",
|
||||||
|
"stylelint-config-standard": "^37.0.0",
|
||||||
"stylelint-scss": "^6.0.0",
|
"stylelint-scss": "^6.0.0",
|
||||||
|
"stylelint-value-no-unknown-custom-properties": "^6.0.1",
|
||||||
"terser-webpack-plugin": "^5.3.9",
|
"terser-webpack-plugin": "^5.3.9",
|
||||||
|
"testcontainers": "^10.16.0",
|
||||||
"ts-node": "^10.9.1",
|
"ts-node": "^10.9.1",
|
||||||
"ts-prune": "^0.10.3",
|
"typescript": "5.7.3",
|
||||||
"typescript": "5.6.3",
|
|
||||||
"util": "^0.12.5",
|
"util": "^0.12.5",
|
||||||
"web-streams-polyfill": "^4.0.0",
|
"web-streams-polyfill": "^4.0.0",
|
||||||
"webpack": "^5.89.0",
|
"webpack": "^5.89.0",
|
||||||
"webpack-bundle-analyzer": "^4.8.0",
|
"webpack-bundle-analyzer": "^4.8.0",
|
||||||
"webpack-cli": "^5.0.0",
|
"webpack-cli": "^6.0.0",
|
||||||
"webpack-dev-server": "^5.0.0",
|
"webpack-dev-server": "^5.0.0",
|
||||||
|
"webpack-retry-chunk-load-plugin": "^3.1.1",
|
||||||
|
"webpack-version-file-plugin": "^0.5.0",
|
||||||
"yaml": "^2.3.3"
|
"yaml": "^2.3.3"
|
||||||
},
|
},
|
||||||
"@casualbot/jest-sonar-reporter": {
|
"@casualbot/jest-sonar-reporter": {
|
||||||
|
|||||||
@@ -2,24 +2,80 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { defineConfig } from "@playwright/test";
|
import { defineConfig, devices } from "@playwright/test";
|
||||||
|
|
||||||
|
import { Options } from "./playwright/services";
|
||||||
|
|
||||||
const baseURL = process.env["BASE_URL"] ?? "http://localhost:8080";
|
const baseURL = process.env["BASE_URL"] ?? "http://localhost:8080";
|
||||||
|
|
||||||
export default defineConfig({
|
const chromeProject = {
|
||||||
|
...devices["Desktop Chrome"],
|
||||||
|
channel: "chromium",
|
||||||
|
permissions: ["clipboard-write", "clipboard-read", "microphone"],
|
||||||
|
launchOptions: {
|
||||||
|
args: ["--use-fake-ui-for-media-stream", "--use-fake-device-for-media-stream", "--mute-audio"],
|
||||||
|
},
|
||||||
|
};
|
||||||
|
|
||||||
|
export default defineConfig<Options>({
|
||||||
|
projects: [
|
||||||
|
{
|
||||||
|
name: "Chrome",
|
||||||
|
use: {
|
||||||
|
...chromeProject,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Firefox",
|
||||||
|
use: {
|
||||||
|
...devices["Desktop Firefox"],
|
||||||
|
launchOptions: {
|
||||||
|
firefoxUserPrefs: {
|
||||||
|
"permissions.default.microphone": 1,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
// This is needed to work around an issue between Playwright routes, Firefox, and Service workers
|
||||||
|
// https://github.com/microsoft/playwright/issues/33561#issuecomment-2471642120
|
||||||
|
serviceWorkers: "block",
|
||||||
|
},
|
||||||
|
ignoreSnapshots: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "WebKit",
|
||||||
|
use: {
|
||||||
|
...devices["Desktop Safari"],
|
||||||
|
// Seemingly WebKit has the same issue as Firefox in Playwright routes not working
|
||||||
|
// https://playwright.dev/docs/network#missing-network-events-and-service-workers
|
||||||
|
serviceWorkers: "block",
|
||||||
|
},
|
||||||
|
ignoreSnapshots: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Dendrite",
|
||||||
|
use: {
|
||||||
|
...chromeProject,
|
||||||
|
homeserverType: "dendrite",
|
||||||
|
},
|
||||||
|
ignoreSnapshots: true,
|
||||||
|
},
|
||||||
|
{
|
||||||
|
name: "Pinecone",
|
||||||
|
use: {
|
||||||
|
...chromeProject,
|
||||||
|
homeserverType: "pinecone",
|
||||||
|
},
|
||||||
|
ignoreSnapshots: true,
|
||||||
|
},
|
||||||
|
],
|
||||||
use: {
|
use: {
|
||||||
viewport: { width: 1280, height: 720 },
|
viewport: { width: 1280, height: 720 },
|
||||||
ignoreHTTPSErrors: true,
|
ignoreHTTPSErrors: true,
|
||||||
video: "retain-on-failure",
|
video: "retain-on-failure",
|
||||||
baseURL,
|
baseURL,
|
||||||
permissions: ["clipboard-write", "clipboard-read", "microphone"],
|
|
||||||
launchOptions: {
|
|
||||||
args: ["--use-fake-ui-for-media-stream", "--use-fake-device-for-media-stream", "--mute-audio"],
|
|
||||||
},
|
|
||||||
trace: "on-first-retry",
|
trace: "on-first-retry",
|
||||||
},
|
},
|
||||||
webServer: {
|
webServer: {
|
||||||
|
|||||||
2
playwright/@types/playwright-core.d.ts
vendored
2
playwright/@types/playwright-core.d.ts
vendored
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2024 The Matrix.org Foundation C.I.C.
|
Copyright 2024 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
FROM mcr.microsoft.com/playwright:v1.48.2-jammy
|
FROM mcr.microsoft.com/playwright:v1.50.1-noble
|
||||||
|
|
||||||
WORKDIR /work
|
WORKDIR /work
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2024 The Matrix.org Foundation C.I.C.
|
Copyright 2024 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -123,7 +123,7 @@ test.describe("Landmark navigation tests", () => {
|
|||||||
await expect(page.getByText("Bob joined the room")).toBeVisible();
|
await expect(page.getByText("Bob joined the room")).toBeVisible();
|
||||||
|
|
||||||
// Close the room
|
// Close the room
|
||||||
page.goto("/#/home");
|
await page.goto("/#/home");
|
||||||
|
|
||||||
// Pressing Control+F6 will first focus the space button
|
// Pressing Control+F6 will first focus the space button
|
||||||
await page.keyboard.press("ControlOrMeta+F6");
|
await page.keyboard.press("ControlOrMeta+F6");
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2024 The Matrix.org Foundation C.I.C.
|
Copyright 2024 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
import { test, expect } from "../../element-web-test";
|
import { test, expect } from "../../element-web-test";
|
||||||
|
|
||||||
test(`shows error page if browser lacks Intl support`, async ({ page }) => {
|
test(`shows error page if browser lacks Intl support`, { tag: "@screenshot" }, async ({ page }) => {
|
||||||
await page.addInitScript({ content: `delete window.Intl;` });
|
await page.addInitScript({ content: `delete window.Intl;` });
|
||||||
await page.goto("/");
|
await page.goto("/");
|
||||||
|
|
||||||
@@ -21,7 +21,7 @@ test(`shows error page if browser lacks Intl support`, async ({ page }) => {
|
|||||||
await expect(page).toMatchScreenshot("unsupported-browser.png");
|
await expect(page).toMatchScreenshot("unsupported-browser.png");
|
||||||
});
|
});
|
||||||
|
|
||||||
test(`shows error page if browser lacks WebAssembly support`, async ({ page }) => {
|
test(`shows error page if browser lacks WebAssembly support`, { tag: "@screenshot" }, async ({ page }) => {
|
||||||
await page.addInitScript({ content: `delete window.WebAssembly;` });
|
await page.addInitScript({ content: `delete window.WebAssembly;` });
|
||||||
await page.goto("/");
|
await page.goto("/");
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2024 The Matrix.org Foundation C.I.C.
|
Copyright 2024 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -13,13 +13,8 @@ Please see LICENSE files in the repository root for full details.
|
|||||||
import { expect, test } from "../../element-web-test";
|
import { expect, test } from "../../element-web-test";
|
||||||
|
|
||||||
test.use({
|
test.use({
|
||||||
startHomeserverOpts: "guest-enabled",
|
synapseConfig: {
|
||||||
config: async ({ homeserver }, use) => {
|
allow_guest_access: true,
|
||||||
await use({
|
|
||||||
default_server_config: {
|
|
||||||
"m.homeserver": { base_url: homeserver.config.baseUrl },
|
|
||||||
},
|
|
||||||
});
|
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2024 The Matrix.org Foundation C.I.C.
|
Copyright 2024 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -3,7 +3,7 @@ Copyright 2024 New Vector Ltd.
|
|||||||
Copyright 2023 Suguru Hirahara
|
Copyright 2023 Suguru Hirahara
|
||||||
Copyright 2023 The Matrix.org Foundation C.I.C.
|
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -11,9 +11,17 @@ import type { Locator, Page } from "@playwright/test";
|
|||||||
import { test, expect } from "../../element-web-test";
|
import { test, expect } from "../../element-web-test";
|
||||||
import { SettingLevel } from "../../../src/settings/SettingLevel";
|
import { SettingLevel } from "../../../src/settings/SettingLevel";
|
||||||
import { Layout } from "../../../src/settings/enums/Layout";
|
import { Layout } from "../../../src/settings/enums/Layout";
|
||||||
import { ElementAppPage } from "../../pages/ElementAppPage";
|
import { type ElementAppPage } from "../../pages/ElementAppPage";
|
||||||
|
|
||||||
test.describe("Audio player", () => {
|
// Find and click "Reply" button
|
||||||
|
const clickButtonReply = async (tile: Locator) => {
|
||||||
|
await expect(async () => {
|
||||||
|
await tile.hover();
|
||||||
|
await tile.getByRole("button", { name: "Reply", exact: true }).click();
|
||||||
|
}).toPass();
|
||||||
|
};
|
||||||
|
|
||||||
|
test.describe("Audio player", { tag: ["@no-firefox", "@no-webkit"] }, () => {
|
||||||
test.use({
|
test.use({
|
||||||
displayName: "Hanako",
|
displayName: "Hanako",
|
||||||
});
|
});
|
||||||
@@ -134,18 +142,22 @@ test.describe("Audio player", () => {
|
|||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should be correctly rendered - light theme", async ({ page, app }) => {
|
test("should be correctly rendered - light theme", { tag: "@screenshot" }, async ({ page, app }) => {
|
||||||
await uploadFile(page, "playwright/sample-files/1sec-long-name-audio-file.ogg");
|
await uploadFile(page, "playwright/sample-files/1sec-long-name-audio-file.ogg");
|
||||||
await takeSnapshots(page, app, "Selected EventTile of audio player (light theme)");
|
await takeSnapshots(page, app, "Selected EventTile of audio player (light theme)");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should be correctly rendered - light theme with monospace font", async ({ page, app }) => {
|
test(
|
||||||
await uploadFile(page, "playwright/sample-files/1sec-long-name-audio-file.ogg");
|
"should be correctly rendered - light theme with monospace font",
|
||||||
|
{ tag: "@screenshot" },
|
||||||
|
async ({ page, app }) => {
|
||||||
|
await uploadFile(page, "playwright/sample-files/1sec-long-name-audio-file.ogg");
|
||||||
|
|
||||||
await takeSnapshots(page, app, "Selected EventTile of audio player (light theme, monospace font)", true); // Enable monospace
|
await takeSnapshots(page, app, "Selected EventTile of audio player (light theme, monospace font)", true); // Enable monospace
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
test("should be correctly rendered - high contrast theme", async ({ page, app }) => {
|
test("should be correctly rendered - high contrast theme", { tag: "@screenshot" }, async ({ page, app }) => {
|
||||||
// Disable system theme in case ThemeWatcher enables the theme automatically,
|
// Disable system theme in case ThemeWatcher enables the theme automatically,
|
||||||
// so that the high contrast theme can be enabled
|
// so that the high contrast theme can be enabled
|
||||||
await app.settings.setValue("use_system_theme", null, SettingLevel.DEVICE, false);
|
await app.settings.setValue("use_system_theme", null, SettingLevel.DEVICE, false);
|
||||||
@@ -161,7 +173,7 @@ test.describe("Audio player", () => {
|
|||||||
await takeSnapshots(page, app, "Selected EventTile of audio player (high contrast)");
|
await takeSnapshots(page, app, "Selected EventTile of audio player (high contrast)");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should be correctly rendered - dark theme", async ({ page, app }) => {
|
test("should be correctly rendered - dark theme", { tag: "@screenshot" }, async ({ page, app }) => {
|
||||||
// Enable dark theme
|
// Enable dark theme
|
||||||
await app.settings.setValue("theme", null, SettingLevel.ACCOUNT, "dark");
|
await app.settings.setValue("theme", null, SettingLevel.ACCOUNT, "dark");
|
||||||
|
|
||||||
@@ -207,93 +219,93 @@ test.describe("Audio player", () => {
|
|||||||
expect(download.suggestedFilename()).toBe("1sec.ogg");
|
expect(download.suggestedFilename()).toBe("1sec.ogg");
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should support replying to audio file with another audio file", async ({ page, app }) => {
|
test(
|
||||||
await uploadFile(page, "playwright/sample-files/1sec.ogg");
|
"should support replying to audio file with another audio file",
|
||||||
|
{ tag: "@screenshot" },
|
||||||
|
async ({ page, app }) => {
|
||||||
|
await uploadFile(page, "playwright/sample-files/1sec.ogg");
|
||||||
|
|
||||||
// Assert the audio player is rendered
|
// Assert the audio player is rendered
|
||||||
await expect(page.locator(".mx_EventTile_last .mx_AudioPlayer_container")).toBeVisible();
|
await expect(page.locator(".mx_EventTile_last .mx_AudioPlayer_container")).toBeVisible();
|
||||||
|
|
||||||
// Find and click "Reply" button on MessageActionBar
|
// Find and click "Reply" button on MessageActionBar
|
||||||
const tile = page.locator(".mx_EventTile_last");
|
const tile = page.locator(".mx_EventTile_last");
|
||||||
await tile.hover();
|
await clickButtonReply(tile);
|
||||||
await tile.getByRole("button", { name: "Reply", exact: true }).click();
|
|
||||||
|
|
||||||
// Reply to the player with another audio file
|
// Reply to the player with another audio file
|
||||||
await uploadFile(page, "playwright/sample-files/1sec.ogg");
|
await uploadFile(page, "playwright/sample-files/1sec.ogg");
|
||||||
|
|
||||||
// Assert that the audio player is rendered
|
// Assert that the audio player is rendered
|
||||||
await expect(tile.locator(".mx_AudioPlayer_container")).toBeVisible();
|
await expect(tile.locator(".mx_AudioPlayer_container")).toBeVisible();
|
||||||
|
|
||||||
// Assert that replied audio file is rendered as file button inside ReplyChain
|
// Assert that replied audio file is rendered as file button inside ReplyChain
|
||||||
const button = tile.locator(".mx_ReplyChain_wrapper .mx_MFileBody_info[role='button']");
|
const button = tile.locator(".mx_ReplyChain_wrapper .mx_MFileBody_info[role='button']");
|
||||||
// Assert that the file button has file name
|
// Assert that the file button has file name
|
||||||
await expect(button.locator(".mx_MFileBody_info_filename")).toBeVisible();
|
await expect(button.locator(".mx_MFileBody_info_filename")).toBeVisible();
|
||||||
|
|
||||||
await takeSnapshots(page, app, "Selected EventTile of audio player with a reply");
|
await takeSnapshots(page, app, "Selected EventTile of audio player with a reply");
|
||||||
});
|
},
|
||||||
|
);
|
||||||
|
|
||||||
test("should support creating a reply chain with multiple audio files", async ({ page, app, user }) => {
|
test(
|
||||||
// Note: "mx_ReplyChain" element is used not only for replies which
|
"should support creating a reply chain with multiple audio files",
|
||||||
// create a reply chain, but also for a single reply without a replied
|
{ tag: "@screenshot" },
|
||||||
// message. This test checks whether a reply chain which consists of
|
async ({ page, app, user }) => {
|
||||||
// multiple audio file replies is rendered properly.
|
// Note: "mx_ReplyChain" element is used not only for replies which
|
||||||
|
// create a reply chain, but also for a single reply without a replied
|
||||||
|
// message. This test checks whether a reply chain which consists of
|
||||||
|
// multiple audio file replies is rendered properly.
|
||||||
|
|
||||||
const tile = page.locator(".mx_EventTile_last");
|
const tile = page.locator(".mx_EventTile_last");
|
||||||
|
|
||||||
// Find and click "Reply" button
|
await uploadFile(page, "playwright/sample-files/upload-first.ogg");
|
||||||
const clickButtonReply = async () => {
|
|
||||||
await tile.scrollIntoViewIfNeeded();
|
|
||||||
await tile.hover();
|
|
||||||
await tile.getByRole("button", { name: "Reply", exact: true }).click();
|
|
||||||
};
|
|
||||||
|
|
||||||
await uploadFile(page, "playwright/sample-files/upload-first.ogg");
|
// Assert that the audio player is rendered
|
||||||
|
await expect(page.locator(".mx_EventTile_last .mx_AudioPlayer_container")).toBeVisible();
|
||||||
|
|
||||||
// Assert that the audio player is rendered
|
await clickButtonReply(tile);
|
||||||
await expect(page.locator(".mx_EventTile_last .mx_AudioPlayer_container")).toBeVisible();
|
|
||||||
|
|
||||||
await clickButtonReply();
|
// Reply to the player with another audio file
|
||||||
|
await uploadFile(page, "playwright/sample-files/upload-second.ogg");
|
||||||
|
|
||||||
// Reply to the player with another audio file
|
// Assert that the audio player is rendered
|
||||||
await uploadFile(page, "playwright/sample-files/upload-second.ogg");
|
await expect(page.locator(".mx_EventTile_last .mx_AudioPlayer_container")).toBeVisible();
|
||||||
|
|
||||||
// Assert that the audio player is rendered
|
await clickButtonReply(tile);
|
||||||
await expect(page.locator(".mx_EventTile_last .mx_AudioPlayer_container")).toBeVisible();
|
|
||||||
|
|
||||||
await clickButtonReply();
|
// Reply to the player with yet another audio file to create a reply chain
|
||||||
|
await uploadFile(page, "playwright/sample-files/upload-third.ogg");
|
||||||
|
|
||||||
// Reply to the player with yet another audio file to create a reply chain
|
// Assert that the audio player is rendered
|
||||||
await uploadFile(page, "playwright/sample-files/upload-third.ogg");
|
await expect(tile.locator(".mx_AudioPlayer_container")).toBeVisible();
|
||||||
|
|
||||||
// Assert that the audio player is rendered
|
// Assert that there are two "mx_ReplyChain" elements
|
||||||
await expect(tile.locator(".mx_AudioPlayer_container")).toBeVisible();
|
await expect(tile.locator(".mx_ReplyChain")).toHaveCount(2);
|
||||||
|
|
||||||
// Assert that there are two "mx_ReplyChain" elements
|
// Assert that one line contains the user name
|
||||||
await expect(tile.locator(".mx_ReplyChain")).toHaveCount(2);
|
await expect(tile.locator(".mx_ReplyChain .mx_ReplyTile_sender").getByText(user.displayName)).toBeVisible();
|
||||||
|
|
||||||
// Assert that one line contains the user name
|
// Assert that the other line contains the file button
|
||||||
await expect(tile.locator(".mx_ReplyChain .mx_ReplyTile_sender").getByText(user.displayName)).toBeVisible();
|
await expect(tile.locator(".mx_ReplyChain .mx_MFileBody")).toBeVisible();
|
||||||
|
|
||||||
// Assert that the other line contains the file button
|
// Click "In reply to"
|
||||||
await expect(tile.locator(".mx_ReplyChain .mx_MFileBody")).toBeVisible();
|
await tile.locator(".mx_ReplyChain .mx_ReplyChain_show", { hasText: "In reply to" }).click();
|
||||||
|
|
||||||
// Click "In reply to"
|
const replyChain = tile.locator(".mx_ReplyChain:first-of-type");
|
||||||
await tile.locator(".mx_ReplyChain .mx_ReplyChain_show", { hasText: "In reply to" }).click();
|
// Assert that "In reply to" has disappeared
|
||||||
|
await expect(replyChain.getByText("In reply to")).not.toBeVisible();
|
||||||
|
|
||||||
const replyChain = tile.locator(".mx_ReplyChain:first-of-type");
|
// Assert that the file button contains the name of the file sent at first
|
||||||
// Assert that "In reply to" has disappeared
|
await expect(
|
||||||
await expect(replyChain.getByText("In reply to")).not.toBeVisible();
|
replyChain
|
||||||
|
.locator(".mx_MFileBody_info[role='button']")
|
||||||
|
.locator(".mx_MFileBody_info_filename", { hasText: "upload-first.ogg" }),
|
||||||
|
).toBeVisible();
|
||||||
|
|
||||||
// Assert that the file button contains the name of the file sent at first
|
// Take snapshots
|
||||||
await expect(
|
await takeSnapshots(page, app, "Selected EventTile of audio player with a reply chain");
|
||||||
replyChain
|
},
|
||||||
.locator(".mx_MFileBody_info[role='button']")
|
);
|
||||||
.locator(".mx_MFileBody_info_filename", { hasText: "upload-first.ogg" }),
|
|
||||||
).toBeVisible();
|
|
||||||
|
|
||||||
// Take snapshots
|
|
||||||
await takeSnapshots(page, app, "Selected EventTile of audio player with a reply chain");
|
|
||||||
});
|
|
||||||
|
|
||||||
test("should be rendered, play, and support replying on a thread", async ({ page, app }) => {
|
test("should be rendered, play, and support replying on a thread", async ({ page, app }) => {
|
||||||
await uploadFile(page, "playwright/sample-files/1sec-long-name-audio-file.ogg");
|
await uploadFile(page, "playwright/sample-files/1sec-long-name-audio-file.ogg");
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2024 The Matrix.org Foundation C.I.C.
|
Copyright 2024 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -89,43 +89,47 @@ test.describe("HTML Export", () => {
|
|||||||
},
|
},
|
||||||
});
|
});
|
||||||
|
|
||||||
test("should export html successfully and match screenshot", async ({ page, app, room }) => {
|
test(
|
||||||
// Set a fixed time rather than masking off the line with the time in it: we don't need to worry
|
"should export html successfully and match screenshot",
|
||||||
// about the width changing and we can actually test this line looks correct.
|
{ tag: "@screenshot" },
|
||||||
page.clock.setSystemTime(new Date("2024-01-01T00:00:00Z"));
|
async ({ page, app, room }) => {
|
||||||
|
// Set a fixed time rather than masking off the line with the time in it: we don't need to worry
|
||||||
|
// about the width changing and we can actually test this line looks correct.
|
||||||
|
await page.clock.setSystemTime(new Date("2024-01-01T00:00:00Z"));
|
||||||
|
|
||||||
// Send a bunch of messages to populate the room
|
// Send a bunch of messages to populate the room
|
||||||
for (let i = 1; i < 10; i++) {
|
for (let i = 1; i < 10; i++) {
|
||||||
const respone = await app.client.sendMessage(room.roomId, { body: `Testing ${i}`, msgtype: "m.text" });
|
const respone = await app.client.sendMessage(room.roomId, { body: `Testing ${i}`, msgtype: "m.text" });
|
||||||
if (i == 1) {
|
if (i == 1) {
|
||||||
await app.client.reactToMessage(room.roomId, null, respone.event_id, "🙃");
|
await app.client.reactToMessage(room.roomId, null, respone.event_id, "🙃");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
// Wait for all the messages to be displayed
|
// Wait for all the messages to be displayed
|
||||||
await expect(
|
await expect(
|
||||||
page.locator(".mx_EventTile_last .mx_MTextBody .mx_EventTile_body").getByText("Testing 9"),
|
page.locator(".mx_EventTile_last .mx_MTextBody .mx_EventTile_body").getByText("Testing 9"),
|
||||||
).toBeVisible();
|
).toBeVisible();
|
||||||
|
|
||||||
await app.toggleRoomInfoPanel();
|
await app.toggleRoomInfoPanel();
|
||||||
await page.getByRole("menuitem", { name: "Export Chat" }).click();
|
await page.getByRole("menuitem", { name: "Export Chat" }).click();
|
||||||
|
|
||||||
const downloadPromise = page.waitForEvent("download");
|
const downloadPromise = page.waitForEvent("download");
|
||||||
await page.getByRole("button", { name: "Export", exact: true }).click();
|
await page.getByRole("button", { name: "Export", exact: true }).click();
|
||||||
const download = await downloadPromise;
|
const download = await downloadPromise;
|
||||||
|
|
||||||
const dirPath = path.join(os.tmpdir(), "html-export-test");
|
const dirPath = path.join(os.tmpdir(), "html-export-test");
|
||||||
const zipPath = `${dirPath}.zip`;
|
const zipPath = `${dirPath}.zip`;
|
||||||
await download.saveAs(zipPath);
|
await download.saveAs(zipPath);
|
||||||
|
|
||||||
const zip = await extractZipFileToPath(zipPath, dirPath);
|
const zip = await extractZipFileToPath(zipPath, dirPath);
|
||||||
await page.goto(`file://${dirPath}/${Object.keys(zip.files)[0]}/messages.html`);
|
await page.goto(`file://${dirPath}/${Object.keys(zip.files)[0]}/messages.html`);
|
||||||
await expect(page).toMatchScreenshot("html-export.png", {
|
await expect(page).toMatchScreenshot("html-export.png", {
|
||||||
mask: [
|
mask: [
|
||||||
// We need to mask the whole thing because the width of the time part changes
|
// We need to mask the whole thing because the width of the time part changes
|
||||||
page.locator(".mx_TimelineSeparator"),
|
page.locator(".mx_TimelineSeparator"),
|
||||||
page.locator(".mx_MessageTimestamp"),
|
page.locator(".mx_MessageTimestamp"),
|
||||||
],
|
],
|
||||||
});
|
});
|
||||||
});
|
},
|
||||||
|
);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2022, 2023 The Matrix.org Foundation C.I.C.
|
Copyright 2022, 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2022, 2023 The Matrix.org Foundation C.I.C.
|
Copyright 2022, 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -79,9 +79,8 @@ test.describe("Composer", () => {
|
|||||||
// Enter some more text, then send the message
|
// Enter some more text, then send the message
|
||||||
await page.getByRole("textbox").pressSequentially("this is the spoiler text ");
|
await page.getByRole("textbox").pressSequentially("this is the spoiler text ");
|
||||||
await page.getByRole("button", { name: "Send message" }).click();
|
await page.getByRole("button", { name: "Send message" }).click();
|
||||||
// Check that a spoiler item has appeared in the timeline and locator the spoiler command text
|
// Check that a spoiler item has appeared in the timeline and contains the spoiler text
|
||||||
await expect(page.locator("button.mx_EventTile_spoiler")).toBeVisible();
|
await expect(page.locator("button.mx_EventTile_spoiler")).toHaveText("this is the spoiler text");
|
||||||
await expect(page.getByText("this is the spoiler text")).toBeVisible();
|
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
@@ -166,7 +165,7 @@ test.describe("Composer", () => {
|
|||||||
// Type another
|
// Type another
|
||||||
await page.locator("div[contenteditable=true]").pressSequentially("my message 1");
|
await page.locator("div[contenteditable=true]").pressSequentially("my message 1");
|
||||||
// Send message
|
// Send message
|
||||||
page.locator("div[contenteditable=true]").press("Enter");
|
await page.locator("div[contenteditable=true]").press("Enter");
|
||||||
// It was sent
|
// It was sent
|
||||||
await expect(page.locator(".mx_EventTile_last .mx_EventTile_body").getByText("my message 1")).toBeVisible();
|
await expect(page.locator(".mx_EventTile_last .mx_EventTile_body").getByText("my message 1")).toBeVisible();
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -2,7 +2,7 @@
|
|||||||
Copyright 2024 New Vector Ltd.
|
Copyright 2024 New Vector Ltd.
|
||||||
Copyright 2022, 2023 The Matrix.org Foundation C.I.C.
|
Copyright 2022, 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
Please see LICENSE files in the repository root for full details.
|
Please see LICENSE files in the repository root for full details.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
@@ -27,7 +27,7 @@ test.describe("Create Room", () => {
|
|||||||
// Submit
|
// Submit
|
||||||
await dialog.getByRole("button", { name: "Create room" }).click();
|
await dialog.getByRole("button", { name: "Create room" }).click();
|
||||||
|
|
||||||
await expect(page).toHaveURL(/\/#\/room\/#test-room-1:localhost/);
|
await expect(page).toHaveURL(new RegExp(`/#/room/#test-room-1:${user.homeServer}`));
|
||||||
const header = page.locator(".mx_RoomHeader");
|
const header = page.locator(".mx_RoomHeader");
|
||||||
await expect(header).toContainText(name);
|
await expect(header).toContainText(name);
|
||||||
});
|
});
|
||||||
|
|||||||
99
playwright/e2e/crypto/backups-mas.spec.ts
Normal file
99
playwright/e2e/crypto/backups-mas.spec.ts
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
/*
|
||||||
|
Copyright 2024 New Vector Ltd.
|
||||||
|
Copyright 2023 The Matrix.org Foundation C.I.C.
|
||||||
|
|
||||||
|
SPDX-License-Identifier: AGPL-3.0-only OR GPL-3.0-only OR LicenseRef-Element-Commercial
|
||||||
|
Please see LICENSE files in the repository root for full details.
|
||||||
|
*/
|
||||||
|
|
||||||
|
import { test, expect } from "../../element-web-test";
|
||||||
|
import { registerAccountMas } from "../oidc";
|
||||||
|
import { isDendrite } from "../../plugins/homeserver/dendrite";
|
||||||
|
import { TestClientServerAPI } from "../csAPI";
|
||||||
|
import { masHomeserver } from "../../plugins/homeserver/synapse/masHomeserver.ts";
|
||||||
|
import { checkDeviceIsConnectedKeyBackup } from "./utils";
|
||||||
|
|
||||||
|
// These tests register an account with MAS because then we go through the "normal" registration flow
|
||||||
|
// and crypto gets set up. Using the 'user' fixture create a user and synthesizes an existing login,
|
||||||
|
// which is faster but leaves us without crypto set up.
|
||||||
|
test.use(masHomeserver);
|
||||||
|
test.describe("Encryption state after registration", () => {
|
||||||
|
test.skip(isDendrite, "does not yet support MAS");
|
||||||
|
|
||||||
|
test("Key backup is enabled by default", async ({ page, mailpitClient, app }, testInfo) => {
|
||||||
|
await page.goto("/#/login");
|
||||||
|
await page.getByRole("button", { name: "Continue" }).click();
|
||||||
|
await registerAccountMas(page, mailpitClient, `alice_${testInfo.testId}`, "alice@email.com", "Pa$sW0rD!");
|
||||||
|
|
||||||
|
// Wait for the ui to load
|
||||||
|
await expect(page.locator(".mx_MatrixChat")).toBeVisible();
|
||||||
|
|
||||||
|
// Recovery is not set up yet
|
||||||
|
await checkDeviceIsConnectedKeyBackup(app, "1", true, false);
|
||||||
|
});
|
||||||
|
|
||||||
|
test("user is prompted to set up recovery", async ({ page, mailpitClient, app }, testInfo) => {
|
||||||
|
await page.goto("/#/login");
|
||||||
|
await page.getByRole("button", { name: "Continue" }).click();
|
||||||
|
await registerAccountMas(page, mailpitClient, `alice_${testInfo.testId}`, "alice@email.com", "Pa$sW0rD!");
|
||||||
|
|
||||||
|
await page.getByRole("button", { name: "Add room" }).click();
|
||||||
|
await page.getByRole("menuitem", { name: "New room" }).click();
|
||||||
|
await page.getByRole("textbox", { name: "Name" }).fill("test room");
|
||||||
|
await page.getByRole("button", { name: "Create room" }).click();
|
||||||
|
|
||||||
|
await expect(page.getByRole("heading", { name: "Set up recovery" })).toBeVisible();
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
test.describe("Key backup reset from elsewhere", () => {
|
||||||
|
test.skip(isDendrite, "does not yet support MAS");
|
||||||
|
|
||||||
|
test("Key backup is disabled when reset from elsewhere", async ({
|
||||||
|
page,
|
||||||
|
mailpitClient,
|
||||||
|
request,
|
||||||
|
homeserver,
|
||||||
|
}, testInfo) => {
|
||||||
|
const testUsername = `alice_${testInfo.testId}`;
|
||||||
|
const testPassword = "Pa$sW0rD!";
|
||||||
|
|
||||||
|
// there's a delay before keys are uploaded so the error doesn't appear immediately: use a fake
|
||||||
|
// clock so we can skip the delay
|
||||||
|
await page.clock.install();
|
||||||
|
|
||||||
|
await page.goto("/#/login");
|
||||||
|
await page.getByRole("button", { name: "Continue" }).click();
|
||||||
|
await registerAccountMas(page, mailpitClient, testUsername, "alice@email.com", testPassword);
|
||||||
|
|
||||||
|
await page.getByRole("button", { name: "Add room" }).click();
|
||||||
|
await page.getByRole("menuitem", { name: "New room" }).click();
|
||||||
|
await page.getByRole("textbox", { name: "Name" }).fill("test room");
|
||||||
|
await page.getByRole("button", { name: "Create room" }).click();
|
||||||
|
|
||||||
|
const accessToken = await page.evaluate(() => window.mxMatrixClientPeg.get().getAccessToken());
|
||||||
|
|
||||||
|
const csAPI = new TestClientServerAPI(request, homeserver, accessToken);
|
||||||
|
|
||||||
|
const backupInfo = await csAPI.getCurrentBackupInfo();
|
||||||
|
|
||||||
|
await csAPI.deleteBackupVersion(backupInfo.version);
|
||||||
|
|
||||||
|
await page.getByRole("textbox", { name: "Send an encrypted message…" }).fill("/discardsession");
|
||||||
|
await page.getByRole("button", { name: "Send message" }).click();
|
||||||
|
|
||||||
|
await page.getByRole("textbox", { name: "Send an encrypted message…" }).fill("Message with broken key backup");
|
||||||
|
await page.getByRole("button", { name: "Send message" }).click();
|
||||||
|
|
||||||
|
// Should be the message we sent plus the room creation event
|
||||||
|
await expect(page.locator(".mx_EventTile")).toHaveCount(2);
|
||||||
|
await expect(
|
||||||
|
page.locator(".mx_RoomView_MessageList > .mx_EventTile_last .mx_EventTile_receiptSent"),
|
||||||
|
).toBeVisible();
|
||||||
|
|
||||||
|
// Wait for it to try uploading the key
|
||||||
|
await page.clock.fastForward(20000);
|
||||||
|
|
||||||
|
await expect(page.getByRole("heading", { level: 1, name: "New Recovery Method" })).toBeVisible();
|
||||||
|
});
|
||||||
|
});
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user