Skip to content

Commit eac6c46

Browse files
committed
Merge branches 'develop' and 't3chguy/remove_bluebird' of https://github.com/vector-im/riot-web into t3chguy/remove_bluebird
2 parents 385ad5f + 8b2ca56 commit eac6c46

File tree

25 files changed

+527
-110
lines changed

25 files changed

+527
-110
lines changed

CHANGELOG.md

Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,75 @@
1+
Changes in [1.5.3](https://github.com/vector-im/riot-web/releases/tag/v1.5.3) (2019-11-06)
2+
==========================================================================================
3+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.2...v1.5.3)
4+
5+
* Remove the 'auto hide menu bar' option on Mac
6+
[\#11326](https://github.com/vector-im/riot-web/pull/11326)
7+
* Expose feature_user_info_panel on riot.im/develop
8+
[\#11304](https://github.com/vector-im/riot-web/pull/11304)
9+
* Upgrade electron-notarize
10+
[\#11312](https://github.com/vector-im/riot-web/pull/11312)
11+
* Fix close window behaviour on Macos
12+
[\#11309](https://github.com/vector-im/riot-web/pull/11309)
13+
* Merge: Add dependency to eslint-plugin-react-hooks as react-sdk did
14+
[\#11307](https://github.com/vector-im/riot-web/pull/11307)
15+
* Add dependency to eslint-plugin-react-hooks as react-sdk did
16+
[\#11306](https://github.com/vector-im/riot-web/pull/11306)
17+
* Update from Weblate
18+
[\#11300](https://github.com/vector-im/riot-web/pull/11300)
19+
20+
Changes in [1.5.2](https://github.com/vector-im/riot-web/releases/tag/v1.5.2) (2019-11-04)
21+
==========================================================================================
22+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.1...v1.5.2)
23+
24+
* Fix close window behaviour on Macos
25+
[\#11311](https://github.com/vector-im/riot-web/pull/11311)
26+
27+
Changes in [1.5.1](https://github.com/vector-im/riot-web/releases/tag/v1.5.1) (2019-11-04)
28+
==========================================================================================
29+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.1-rc.2...v1.5.1)
30+
31+
* No changes since rc.2
32+
33+
Changes in [1.5.1-rc.2](https://github.com/vector-im/riot-web/releases/tag/v1.5.1-rc.2) (2019-11-01)
34+
====================================================================================================
35+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.1-rc.1...v1.5.1-rc.2)
36+
37+
* Updated react-sdk with fix for bug that caused room filtering to
38+
omit results.
39+
40+
Changes in [1.5.1-rc.1](https://github.com/vector-im/riot-web/releases/tag/v1.5.1-rc.1) (2019-10-30)
41+
====================================================================================================
42+
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.0...v1.5.1-rc.1)
43+
44+
* Add ability to hide tray icon on non-Mac (which has no tray icon)
45+
[\#11258](https://github.com/vector-im/riot-web/pull/11258)
46+
* Fix bug preventing display from sleeping after a call
47+
[\#11264](https://github.com/vector-im/riot-web/pull/11264)
48+
* Remove mention of CI scripts from docs
49+
[\#11257](https://github.com/vector-im/riot-web/pull/11257)
50+
* Fix skinning replaces being broken since being rewritten as React FC's
51+
[\#11254](https://github.com/vector-im/riot-web/pull/11254)
52+
* Update config docs about identity servers
53+
[\#11249](https://github.com/vector-im/riot-web/pull/11249)
54+
* Remove unneeded help about identity servers
55+
[\#11248](https://github.com/vector-im/riot-web/pull/11248)
56+
* Update from Weblate
57+
[\#11243](https://github.com/vector-im/riot-web/pull/11243)
58+
* Update sample config for new matrix.org CS API URL
59+
[\#11207](https://github.com/vector-im/riot-web/pull/11207)
60+
* clarify where the e2e tests are located
61+
[\#11115](https://github.com/vector-im/riot-web/pull/11115)
62+
* Update from Weblate
63+
[\#11171](https://github.com/vector-im/riot-web/pull/11171)
64+
* Prevent referrers from being sent
65+
[\#6155](https://github.com/vector-im/riot-web/pull/6155)
66+
* Add darkModeSupport to allow dark themed title bar.
67+
[\#11140](https://github.com/vector-im/riot-web/pull/11140)
68+
* Fix the label of Turkish language
69+
[\#11124](https://github.com/vector-im/riot-web/pull/11124)
70+
* Update default HS config to match well-known
71+
[\#11112](https://github.com/vector-im/riot-web/pull/11112)
72+
173
Changes in [1.5.0](https://github.com/vector-im/riot-web/releases/tag/v1.5.0) (2019-10-18)
274
==========================================================================================
375
[Full Changelog](https://github.com/vector-im/riot-web/compare/v1.5.0-rc.1...v1.5.0)

docs/config.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,10 @@ For a good example, see https://riot.im/develop/config.json.
2222
`default_hs_url` is specified. When multiple sources are specified, it is unclear
2323
which should take priority and therefore the application cannot continue.
2424
* As of Riot 1.4.0, identity servers are optional. See [Identity servers](#identity-servers) below.
25-
1. `features`: Lookup of optional features that may be `enable`d, `disable`d, or exposed to the user
26-
in the `labs` section of settings. The available optional experimental features vary from
27-
release to release. The available features are described in [labs.md](labs.md).
25+
1. `features`: Lookup of optional features that may be `enable`d, `disable`d, or
26+
exposed to the user in the `labs` section of settings. The available
27+
optional experimental features vary from release to release and are [documented](labs.md). The feature flag process is
28+
[documented](feature-flags.md) as well.
2829
1. `showLabsSettings`: Shows the "labs" tab of user settings even when no `features` are enabled
2930
or present. Useful for getting at settings which may be otherwise hidden.
3031
1. `brand`: String to pass to your homeserver when configuring email notifications, to let the

docs/feature-flags.md

Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
# Feature flags
2+
3+
When developing new features for Riot, we use feature flags to give us more
4+
flexibility and control over when and where those features are enabled.
5+
6+
For example, flags make the following things possible:
7+
8+
* Extended testing of a feature via labs on develop
9+
* Enabling features when ready instead of the first moment the code is released
10+
* Testing a feature with a specific set of users (by enabling only on a specific
11+
Riot instance)
12+
13+
The size of the feature controlled by a feature flag may vary widely: it could
14+
be a large project like reactions or a smaller change to an existing algorithm.
15+
A large project might use several feature flags if it's useful to control the
16+
deployment of different portions independently.
17+
18+
Everyone involved in a feature (engineering, design, product, reviewers) should
19+
think about its deployment plan up front as best as possible so we can have the
20+
right feature flags in place from the start.
21+
22+
## Interaction with spec process
23+
24+
Historically, we have often used feature flags to guard client features that
25+
depend on unstable spec features. Unfortunately, there was never clear agreement
26+
about how long such a flag should live for, when it should be removed, etc.
27+
28+
Under the [new spec
29+
process](https://github.com/matrix-org/matrix-doc/pull/2324), server-side
30+
unstable features can be used by clients and enabled by default as long as
31+
clients commit to doing the associated clean up work once a feature stabilises.
32+
33+
## Starting work on a feature
34+
35+
When starting work on a feature, we should create a matching feature flag:
36+
37+
1. Add a new
38+
[setting](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.js)
39+
of the form:
40+
```js
41+
"feature_cats": {
42+
isFeature: true,
43+
displayName: _td("Adds cats everywhere"),
44+
supportedLevels: LEVELS_FEATURE,
45+
default: false,
46+
},
47+
```
48+
2. Check whether the feature is enabled as appropriate:
49+
```js
50+
SettingsStore.isFeatureEnabled("feature_cats")
51+
```
52+
3. Add the feature to the [set of labs on develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json):
53+
```json
54+
"features": {
55+
"feature_cats": "labs"
56+
},
57+
```
58+
4. Document the feature in the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md)
59+
60+
With these steps completed, the feature is disabled by default, but can be
61+
enabled on develop by interested users for testing.
62+
63+
Different features may have different deployment plans for when to enable where.
64+
The following lists a few common options.
65+
66+
## Enabling by default on develop
67+
68+
Set the feature to `enable` in the [develop config](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json):
69+
70+
```json
71+
"features": {
72+
"feature_cats": "enable"
73+
},
74+
```
75+
76+
## Enabling by default on staging and app
77+
78+
Set the feature to `enable` in the [app
79+
config](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json).
80+
81+
## Feature deployed successfully
82+
83+
Once we're confident that a feature is working well, we should remove the flag:
84+
85+
1. Remove the [setting](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.js)
86+
2. Remove all `isFeatureEnabled` lines that test for the feature's setting
87+
3. Remove the feature from the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md)
88+
4. Remove feature state from
89+
[develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json)
90+
and [app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json)
91+
configs
92+
5. Celebrate! 🥳
93+
94+
## Convert to a regular setting (optional)
95+
96+
Sometimes we decide a feature should always be user-controllable as a setting
97+
even after it has been fully deployed. In that case, we would craft a new,
98+
regular setting:
99+
100+
1. Remove the feature flag from
101+
[settings](https://github.com/matrix-org/matrix-react-sdk/blob/develop/src/settings/Settings.js)
102+
and add a regular setting with the appropriate levels for your feature
103+
2. Replace the `isFeatureEnabled` lines with `getValue` or similar calls
104+
according to the [settings
105+
docs](https://github.com/matrix-org/matrix-react-sdk/blob/develop/docs/settings.md)
106+
(checking carefully, as we may want a different mix of code paths when the
107+
feature is always present but gated by a setting)
108+
3. Remove the feature from the [labs documentation](https://github.com/vector-im/riot-web/blob/develop/docs/labs.md)
109+
4. Remove feature state from
110+
[develop](https://github.com/vector-im/riot-web/blob/develop/riot.im/develop/config.json)
111+
and [app](https://github.com/vector-im/riot-web/blob/develop/riot.im/app/config.json)
112+
configs

docs/labs.md

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,25 @@ That's it. Now should see your new counter under the header.
4949
## Multiple integration managers (`feature_many_integration_managers`)
5050

5151
Exposes a way to access all the integration managers known to Riot. This is an implementation of [MSC1957](https://github.com/matrix-org/matrix-doc/pull/1957).
52+
53+
## New ways to ignore people (`feature_mjolnir`)
54+
55+
When enabled, a new settings tab appears for users to be able to manage their ban lists.
56+
This is a different kind of ignoring where the ignored user's messages still get rendered,
57+
but are hidden by default.
58+
59+
Ban lists are rooms within Matrix, proposed as [MSC2313](https://github.com/matrix-org/matrix-doc/pull/2313).
60+
[Mjolnir](https://github.com/matrix-org/mjolnir) is a set of moderation tools which support
61+
ban lists.
62+
63+
## Verifications in DMs (`feature_dm_verification`)
64+
65+
An implementation of [MSC2241](https://github.com/matrix-org/matrix-doc/pull/2241). When enabled, verification might not work with devices which don't support MSC2241.
66+
67+
This also includes a new implementation of the user & member info panel, designed to share more code between showing community members & room members. Built on top of this new panel is also a new UX for verification from the member panel.
68+
69+
## Cross-signing (`feature_cross_signing`)
70+
71+
Cross-signing ([MSC1756](https://github.com/matrix-org/matrix-doc/pull/1756))
72+
improves the device verification experience by allowing you to verify a user
73+
instead of verifying each of their devices.

docs/theming.md

Lines changed: 60 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -11,15 +11,70 @@ As of Jan 2017, skins are not fully supported; riot is the only available skin.
1111
To define a theme for Riot:
1212

1313
1. Pick a name, e.g. `teal`. at time of writing we have `light` and `dark`.
14-
2. Fork `src/skins/vector/css/themes/dark.scss` to be teal.scss
15-
3. Fork `src/skins/vector/css/themes/_base.scss` to be _teal.scss
16-
4. Override variables in _teal.scss as desired. You may wish to delete ones
17-
which don't differ from _base.scss, to make it clear which are being
18-
overridden. If every single colour is being changed (as per _dark.scss)
14+
2. Fork `src/skins/vector/css/themes/dark.scss` to be `teal.scss`
15+
3. Fork `src/skins/vector/css/themes/_base.scss` to be `_teal.scss`
16+
4. Override variables in `_teal.scss` as desired. You may wish to delete ones
17+
which don't differ from `_base.scss`, to make it clear which are being
18+
overridden. If every single colour is being changed (as per `_dark.scss`)
1919
then you might as well keep them all.
2020
5. Add the theme to the list of entrypoints in webpack.config.js
2121
6. Add the theme to the list of themes in matrix-react-sdk's UserSettings.js
2222
7. Sit back and admire your handywork.
2323

2424
In future, the assets for a theme will probably be gathered together into a
2525
single directory tree.
26+
27+
Custom Themes
28+
=============
29+
30+
Themes derived from the built in themes may also be defined in settings.
31+
32+
To avoid name collisions, the internal name of a theme is
33+
`custom-${theme.name}`. So if you want to set the custom theme below as the
34+
default theme, you would use `default_theme: "custom-Electric Blue"`.
35+
36+
eg. in config.json:
37+
38+
```
39+
"settingDefaults": {
40+
"custom_themes": [
41+
{
42+
"name": "Electric Blue",
43+
"is_dark": false,
44+
"colors": {
45+
"accent-color": "#3596fc",
46+
"primary-color": "#368bd6",
47+
"warning-color": "#ff4b55",
48+
"sidebar-color": "#27303a",
49+
"roomlist-background-color": "#f3f8fd",
50+
"roomlist-text-color": "#2e2f32",
51+
"roomlist-text-secondary-color": "#61708b",
52+
"roomlist-highlights-color": "#ffffff",
53+
"roomlist-separator-color": "#e3e8f0",
54+
"timeline-background-color": "#ffffff",
55+
"timeline-text-color": "#2e2f32",
56+
"timeline-text-secondary-color": "#61708b",
57+
"timeline-highlights-color": "#f3f8fd"
58+
}
59+
}, {
60+
"name": "Deep Purple",
61+
"is_dark": true,
62+
"colors": {
63+
"accent-color": "#6503b3",
64+
"primary-color": "#368bd6",
65+
"warning-color": "#b30356",
66+
"sidebar-color": "#15171B",
67+
"roomlist-background-color": "#22262E",
68+
"roomlist-text-color": "#A1B2D1",
69+
"roomlist-text-secondary-color": "#EDF3FF",
70+
"roomlist-highlights-color": "#343A46",
71+
"roomlist-separator-color": "#a1b2d1",
72+
"timeline-background-color": "#181b21",
73+
"timeline-text-color": "#EDF3FF",
74+
"timeline-text-secondary-color": "#A1B2D1",
75+
"timeline-highlights-color": "#22262E"
76+
}
77+
}
78+
]
79+
}
80+
```
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
3+
<plist version="1.0">
4+
<dict>
5+
<!-- Entitlements from electron-builder's defaults
6+
(https://github.com/electron-userland/electron-builder/blob/master/packages/app-builder-lib/templates/entitlements.mac.plist)
7+
nb. This does *not* include the app sandbox: at the time of adding this file,
8+
we were using electron-builder 21.2.0 which does not have the sandbox entitlement.
9+
Latest electron-builder does, but it appears to be causing issues:
10+
(https://github.com/electron-userland/electron-builder/issues/4390)
11+
-->
12+
<key>com.apple.security.cs.allow-unsigned-executable-memory</key>
13+
<true/>
14+
<!-- https://github.com/electron-userland/electron-builder/issues/3940 -->
15+
<key>com.apple.security.cs.disable-library-validation</key>
16+
<true/>
17+
18+
<!-- Our own additional entitlements (we need to access the camera and
19+
mic for VoIP calls -->
20+
<key>com.apple.security.device.camera</key>
21+
<true/>
22+
<key>com.apple.security.device.audio-input</key>
23+
<true/>
24+
</dict>
25+
</plist>

electron_app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "riot-web",
33
"productName": "Riot",
44
"main": "src/electron-main.js",
5-
"version": "1.5.0",
5+
"version": "1.5.3",
66
"description": "A feature-rich client for Matrix.org",
77
"author": "New Vector Ltd.",
88
"dependencies": {

electron_app/src/electron-main.js

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,18 @@ try {
7777
try {
7878
// Load local config and use it to override values from the one baked with the build
7979
const localConfig = require(path.join(app.getPath('userData'), 'config.json'));
80+
81+
// If the local config has a homeserver defined, don't use the homeserver from the build
82+
// config. This is to avoid a problem where Riot thinks there are multiple homeservers
83+
// defined, and panics as a result.
84+
const homeserverProps = ['default_is_url', 'default_hs_url', 'default_server_name', 'default_server_config'];
85+
if (Object.keys(localConfig).find(k => homeserverProps.includes(k))) {
86+
// Rip out all the homeserver options from the vector config
87+
vectorConfig = Object.keys(vectorConfig)
88+
.filter(k => !homeserverProps.includes(k))
89+
.reduce((obj, key) => {obj[key] = vectorConfig[key]; return obj;}, {});
90+
}
91+
8092
vectorConfig = Object.assign(vectorConfig, localConfig);
8193
} catch (e) {
8294
// Could not load local config, this is expected in most cases.
@@ -393,7 +405,7 @@ app.on('ready', () => {
393405
});
394406
mainWindow.on('close', (e) => {
395407
// If we are not quitting and have a tray icon then minimize to tray
396-
if (!global.appQuitting && tray.hasTray()) {
408+
if (!global.appQuitting && (tray.hasTray() || process.platform === 'darwin')) {
397409
// On Mac, closing the window just hides it
398410
// (this is generally how single-window Mac apps
399411
// behave, eg. Mail.app)

0 commit comments

Comments
 (0)