Skip to content

Commit 6ba53fa

Browse files
Merge tag 'v1.6.8' into AMP.chat
[Full Changelog](element-hq/element-web@v1.6.8-rc.1...v1.6.8) * Upgrade to JS SDK 7.1.0 and React SDK 2.9.0 Change-Id: If4d67f7d05d8024f3a44cf6b2b42424ffa09f4b7
2 parents 0644977 + 1f54399 commit 6ba53fa

File tree

164 files changed

+5848
-5521
lines changed

Some content is hidden

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

164 files changed

+5848
-5521
lines changed

.dockerignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ test/
33
webapp/
44
lib/
55
node_modules/
6-
electron_app/
76
karma-reports/
87
.idea/
98
.tmp/

.gitignore

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,6 @@
44
/key.pem
55
/lib
66
/node_modules
7-
/electron_app/node_modules
8-
/electron_app/dist
9-
/electron_app/pub
107
/packages/
118
/webapp
129
/.npmrc

.modernizr.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@
2929
"test/url/urlsearchparams",
3030

3131
"test/cors",
32+
"test/crypto",
3233
"test/iframe/sandbox",
3334
"test/json",
3435
"test/network/fetch",

CHANGELOG.md

Lines changed: 335 additions & 0 deletions
Large diffs are not rendered by default.

README.md

Lines changed: 21 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ Riot is a modular webapp built with modern ES6 and uses a Node.js build system.
7878
Ensure you have the latest LTS version of Node.js installed.
7979

8080
Using `yarn` instead of `npm` is recommended. Please see the Yarn [install
81-
guide](https://yarnpkg.com/docs/install/) if you do not have it already.
81+
guide](https://classic.yarnpkg.com/en/docs/install) if you do not have it already.
8282

8383
1. Install or update `node.js` so that your `node` is at least v10.x.
8484
1. Install `yarn` if not present already.
@@ -108,40 +108,7 @@ Riot can also be run as a desktop app, wrapped in Electron. You can download a
108108
pre-built version from https://riot.im/download/desktop/ or, if you prefer,
109109
build it yourself.
110110

111-
To build it yourself, follow the instructions below.
112-
113-
1. Follow the instructions in 'Building From Source' above, but run
114-
`yarn build` instead of `yarn dist` (since we don't need the tarball).
115-
2. Install Electron and run it:
116-
117-
```bash
118-
yarn electron
119-
```
120-
121-
To build packages, use `electron-builder`. This is configured to output:
122-
* `dmg` + `zip` for macOS
123-
* `exe` + `nupkg` for Windows
124-
* `deb` for Linux
125-
But this can be customised by editing the `build` section of package.json
126-
as per https://github.com/electron-userland/electron-builder/wiki/Options
127-
128-
See https://github.com/electron-userland/electron-builder/wiki/Multi-Platform-Build
129-
for dependencies required for building packages for various platforms.
130-
131-
The only platform that can build packages for all three platforms is macOS:
132-
```bash
133-
brew install mono
134-
yarn install
135-
yarn build:electron
136-
```
137-
138-
For other packages, use `electron-builder` manually. For example, to build a
139-
package for 64 bit Linux:
140-
141-
1. Follow the instructions in 'Building From Source' above
142-
2. `node_modules/.bin/build -l --x64`
143-
144-
All Electron packages go into `electron_app/dist/`
111+
To build it yourself, follow the instructions at https://github.com/vector-im/riot-desktop.
145112

146113
Many thanks to @aviraldg for the initial work on the Electron integration.
147114

@@ -220,7 +187,7 @@ Development
220187
===========
221188

222189
Before attempting to develop on Riot you **must** read the [developer guide
223-
for `matrix-react-sdk`](https://github.com/matrix-org/matrix-react-sdk), which
190+
for `matrix-react-sdk`](https://github.com/matrix-org/matrix-react-sdk#developer-guide), which
224191
also defines the design, architecture and style for Riot too.
225192

226193
Before starting work on a feature, it's best to ensure your plan aligns well
@@ -288,6 +255,7 @@ yarn install
288255
yarn start
289256
```
290257

258+
291259
Wait a few seconds for the initial build to finish; you should see something like:
292260
```
293261
Hash: b0af76309dd56d7275c8
@@ -309,6 +277,23 @@ modifying it. See the [configuration docs](docs/config.md) for details.
309277

310278
Open http://127.0.0.1:8080/ in your browser to see your newly built Riot.
311279

280+
**Note**: The build script uses inotify by default on Linux to monitor directories
281+
for changes. If the inotify watch limit is too low your build will silently fail.
282+
To avoid this issue, we recommend a limit of at least 128M.
283+
284+
To set a new inotify watch limit, execute:
285+
286+
```
287+
$ sudo sysctl fs.inotify.max_user_watches=131072
288+
$ sudo sysctl -p
289+
```
290+
291+
If you wish, you can make this new limit permanent, by executing:
292+
293+
```
294+
$ echo fs.inotify.max_user_watches=524288 | sudo tee -a /etc/sysctl.conf
295+
$ sudo sysctl -p
296+
```
312297
___
313298

314299
When you make changes to `matrix-react-sdk` or `matrix-js-sdk` they should be

__mocks__/cssMock.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
module.exports = "css-file-stub";

config.sample.json

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,13 @@
2626
"defaultCountryCode": "GB",
2727
"showLabsSettings": false,
2828
"features": {
29+
"feature_new_spinner": "labs",
30+
"feature_font_scaling": "labs",
2931
"feature_pinning": "labs",
3032
"feature_custom_status": "labs",
3133
"feature_custom_tags": "labs",
32-
"feature_state_counters": "labs"
34+
"feature_state_counters": "labs",
35+
"feature_irc_ui": "labs"
3336
},
3437
"default_federate": true,
3538
"default_theme": "light",

docs/app-load.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# App load order
2+
3+
Old slow flow:
4+
![image](https://user-images.githubusercontent.com/2403652/73848963-00a2a080-4821-11ea-97d4-1200fc2638f3.png)
5+
6+
Current more parallel flow:
7+
![image](https://user-images.githubusercontent.com/2403652/83146440-303a2900-a0ee-11ea-806b-4f53f039b957.png)
8+
9+
<details><summary>Code</summary>
10+
<p>
11+
<pre><code>
12+
digraph G {
13+
node [shape=box];
14+
15+
subgraph cluster_0 {
16+
color=orange;
17+
node [style=filled];
18+
label = "index.ts";
19+
20+
entrypoint, s0, ready [shape=point];
21+
rageshake, config, i18n, theme, skin, olm [shape=parallelogram];
22+
mobile [shape=diamond, label="mobile"];
23+
modernizr [shape=diamond];
24+
redirect, incompatible [shape=egg];
25+
26+
entrypoint -> rageshake;
27+
rageshake -> mobile [color=blue];
28+
mobile -> s0 [label="No"];
29+
mobile -> redirect [label="Yes"];
30+
31+
s0 -> platform;
32+
s0 -> olm;
33+
platform -> config;
34+
35+
config -> i18n [color=blue];
36+
config -> theme [color=blue];
37+
config -> skin [color=blue];
38+
39+
i18n -> modernizr [color=blue];
40+
theme -> modernizr [color=blue];
41+
skin -> modernizr [color=blue];
42+
43+
modernizr -> ready [label="Yes"];
44+
modernizr -> incompatible [label="No"];
45+
incompatible -> ready [label="user ignore"];
46+
47+
olm -> ready [color=red];
48+
config -> ready [color=red];
49+
skin -> ready [color=red];
50+
theme -> ready [color=red];
51+
i18n -> ready [color=red];
52+
}
53+
54+
subgraph cluster_1 {
55+
color = green;
56+
node [style=filled];
57+
label = "init.tsx";
58+
59+
ready -> loadApp;
60+
loadApp -> matrixchat;
61+
}
62+
}
63+
</code></pre>
64+
</p>
65+
</details>
66+
67+
Key:
68+
+ Parallelogram: async/await task
69+
+ Box: sync task
70+
+ Diamond: conditional branch
71+
+ Egg: user interaction
72+
+ Blue arrow: async task is allowed to settle but allowed to fail
73+
+ Red arrow: async task success is asserted
74+
75+
Notes:
76+
+ A task begins when all its dependencies (arrows going into it) are fulfilled.
77+
+ The success of setting up rageshake is never asserted, riot-web has a fallback path for running without IDB (and thus rageshake).
78+
+ Everything is awaited to be settled before the Modernizr check, to allow it to make use of things like i18n if they are successful.
79+
80+
Underlying dependencies:
81+
![image](https://user-images.githubusercontent.com/2403652/73848977-08624500-4821-11ea-9830-bb0317c41086.png)

docs/config.md

Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ For a good example, see https://riot.im/develop/config.json.
3232
homeserver know what email template to use when talking to you.
3333
1. `branding`: Configures various branding and logo details, such as:
3434
1. `welcomeBackgroundUrl`: An image to use as a wallpaper outside the app
35-
during authentication flows
35+
during authentication flows. If an array is passed, an image is chosen randomly for each visit.
3636
1. `authHeaderLogoUrl`: An logo image that is shown in the header during
3737
authentication flows
3838
1. `authFooterLinks`: a list of links to show in the authentication page footer:
@@ -84,10 +84,23 @@ For a good example, see https://riot.im/develop/config.json.
8484
By default, this is "https://matrix.to" to generate matrix.to (spec) permalinks.
8585
Set this to your Riot instance URL if you run an unfederated server (eg:
8686
"https://riot.example.org").
87-
1. `jitsi`: Used to change the default conference options.
87+
1. `jitsi`: Used to change the default conference options. Learn more about the
88+
Jitsi options at [jitsi.md](./jitsi.md).
8889
1. `preferredDomain`: The domain name of the preferred Jitsi instance. Defaults
8990
to `jitsi.riot.im`. This is used whenever a user clicks on the voice/video
9091
call buttons - integration managers may use a different domain.
92+
1. `enable_presence_by_hs_url`: The property key should be the URL of the homeserver
93+
and its value defines whether to enable/disable the presence status display
94+
from that homeserver. If no options are configured, presence is shown for all
95+
homeservers.
96+
1. `disable_guests`: Disables guest access tokens and auto-guest registrations.
97+
Defaults to false (guests are allowed).
98+
1. `disable_login_language_selector`: Disables the login language selector. Defaults
99+
to false (language selector is shown).
100+
1. `disable_3pid_login`: Disables 3rd party identity options on login and registration form
101+
Defaults to false (3rd party identity options are shown).
102+
1. `default_federate`: Default option for room federation when creating a room
103+
Defaults to true (room federation enabled).
91104

92105
Note that `index.html` also has an og:image meta tag that is set to an image
93106
hosted on riot.im. This is the image used if links to your copy of Riot
@@ -123,24 +136,11 @@ If none of these sources have an identity server set, then Riot will prompt the
123136
user to set an identity server first when attempting to use features that
124137
require one.
125138

126-
Currently the only two public identity servers are https://vector.im and
139+
Currently, the only two public identity servers are https://vector.im and
127140
https://matrix.org, however in the future identity servers will be
128141
decentralised.
129142

130143
Desktop app configuration
131144
=========================
132145

133-
To run multiple instances of the desktop app for different accounts, you can
134-
launch the executable with the `--profile` argument followed by a unique
135-
identifier, e.g `riot-web --profile Work` for it to run a separate profile and
136-
not interfere with the default one.
137-
138-
Alternatively, a custom location for the profile data can be specified using the
139-
`--profile-dir` flag followed by the desired path.
140-
141-
+ `%APPDATA%\$NAME\config.json` on Windows
142-
+ `$XDG_CONFIG_HOME\$NAME\config.json` or `~/.config/$NAME/config.json` on Linux
143-
+ `~Library/Application Support/$NAME/config.json` on macOS
144-
145-
In the paths above, `$NAME` is typically `Riot`, unless you use `--profile
146-
$PROFILE` in which case it becomes `Riot-$PROFILE`.
146+
See https://github.com/vector-im/riot-desktop#user-specified-configjson

docs/e2ee.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# End to end encryption by default
2+
3+
By default, Riot will create encrypted DM rooms if the user you are chatting with has keys uploaded on their account.
4+
For private room creation, Riot will default to encryption on but give you the choice to opt-out.
5+
6+
## Disabling encryption by default
7+
8+
Set the following on your homeserver's
9+
`/.well-known/matrix/client` config:
10+
```json
11+
{
12+
"im.vector.riot.e2ee": {
13+
"default": false
14+
}
15+
}
16+
```

0 commit comments

Comments
 (0)