Skip to content

Commit 43bdc04

Browse files
committed
Merge remote-tracking branch 'origin/develop' into dbkr/my_groups
2 parents 17bd323 + e36899c commit 43bdc04

17 files changed

Lines changed: 303 additions & 364 deletions

File tree

‎.travis.yml‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# we need trusty for the chrome addon
2+
dist: trusty
3+
4+
# we don't need sudo, so can run in a container, which makes startup much
5+
# quicker.
6+
sudo: false
7+
18
language: node_js
29
node_js:
310
# make sure we work with a range of node versions.
@@ -16,6 +23,8 @@ node_js:
1623
- 6.3
1724
- 6
1825
- 7
26+
addons:
27+
chrome: stable
1928
install:
2029
# clone the deps with depth 1: we know we will only ever need that one
2130
# commit.

‎README.md‎

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ to build.
8181
npm run build
8282
```
8383
However, we recommend setting up a proper development environment (see "Setting
84-
up a development environment" below) if you want to run your own copy of the
84+
up a dev environment" below) if you want to run your own copy of the
8585
`develop` branch, as it makes it much easier to keep these dependencies
8686
up-to-date. Or just use https://riot.im/develop - the continuous integration
8787
release of the develop branch.
@@ -253,7 +253,6 @@ Finally, build and start Riot itself:
253253
1. `rm -r node_modules/matrix-react-sdk; ln -s ../../matrix-react-sdk node_modules/`
254254
1. `npm start`
255255
1. Wait a few seconds for the initial build to finish; you should see something like:
256-
257256
```
258257
Hash: b0af76309dd56d7275c8
259258
Version: webpack 1.12.14
@@ -282,18 +281,33 @@ If any of these steps error with, `file table overflow`, you are probably on a m
282281
which has a very low limit on max open files. Run `ulimit -Sn 1024` and try again.
283282
You'll need to do this in each new terminal you open before building Riot.
284283
285-
How to add a new translation?
286-
=============================
284+
Running the tests
285+
-----------------
287286
288-
[<img src="https://translate.riot.im/widgets/riot-web/-/multi-auto.svg" alt="translationsstatus" width="340">](https://translate.riot.im/engage/riot-web/?utm_source=widget)
287+
There are a number of application-level tests in the `tests` directory; these
288+
are designed to run in a browser instance under the control of
289+
[karma](https://karma-runner.github.io). To run them:
290+
291+
* Make sure you have Chrome installed (a recent version, like 59)
292+
* Make sure you have `matrix-js-sdk` and `matrix-react-sdk` installed and
293+
built, as above
294+
* `npm run test`
289295
296+
The above will run the tests under Chrome in a `headless` mode.
290297
291-
Head to the [translating doc](docs/translating.md)
298+
You can also tell karma to run the tests in a loop (every time the source
299+
changes), in an instance of Chrome on your desktop, with `npm run
300+
test-multi`. This also gives you the option of running the tests in 'debug'
301+
mode, which is useful for stepping through the tests in the developer tools.
292302
293-
Adding Strings to the translations (Developer Guide)
294-
====================================================
303+
Translations
304+
============
295305
296-
Head to the [translating dev doc](docs/translating-dev.md)
306+
To add a new translation, head to the [translating doc](docs/translating.md).
307+
308+
For a developer guide, see the [translating dev doc](docs/translating-dev.md).
309+
310+
[<img src="https://translate.riot.im/widgets/riot-web/-/multi-auto.svg" alt="translationsstatus" width="340">](https://translate.riot.im/engage/riot-web/?utm_source=widget)
297311
298312
Triaging issues
299313
===============

‎karma.conf.js‎

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,23 @@ module.exports = function (config) {
113113
browsers: [
114114
'Chrome',
115115
//'PhantomJS',
116+
//'ChromeHeadless'
116117
],
117118

119+
customLaunchers: {
120+
'ChromeHeadless': {
121+
base: 'Chrome',
122+
flags: [
123+
// '--no-sandbox',
124+
// See https://chromium.googlesource.com/chromium/src/+/lkgr/headless/README.md
125+
'--headless',
126+
'--disable-gpu',
127+
// Without a remote debugging port, Google Chrome exits immediately.
128+
'--remote-debugging-port=9222',
129+
],
130+
}
131+
},
132+
118133
// Continuous Integration mode
119134
// if true, Karma captures browsers, runs the tests and exits
120135
// singleRun: false,

‎package.json‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@
4848
"lintall": "eslint src/ test/",
4949
"clean": "rimraf lib webapp electron_app/dist",
5050
"prepublish": "npm run build:compile",
51-
"test": "karma start --single-run=true --autoWatch=false --browsers PhantomJS --colors=false",
51+
"test": "karma start --single-run=true --autoWatch=false --browsers ChromeHeadless --colors=false",
5252
"test-multi": "karma start"
5353
},
5454
"dependencies": {
@@ -119,13 +119,12 @@
119119
"karma-cli": "^0.1.2",
120120
"karma-junit-reporter": "^0.4.1",
121121
"karma-mocha": "^0.2.2",
122-
"karma-phantomjs-launcher": "^1.0.0",
123122
"karma-webpack": "^1.7.0",
123+
"matrix-mock-request": "^1.0.0",
124124
"minimist": "^1.2.0",
125125
"mkdirp": "^0.5.1",
126126
"mocha": "^2.4.5",
127127
"parallelshell": "^1.2.0",
128-
"phantomjs-prebuilt": "^2.1.7",
129128
"postcss-extend": "^1.0.5",
130129
"postcss-import": "^9.0.0",
131130
"postcss-loader": "^1.2.2",

‎src/components/structures/RoomDirectory.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@ module.exports = React.createClass({
7373
this.protocols = response;
7474
this.setState({protocolsLoading: false});
7575
}, (err) => {
76+
console.warn(`error loading thirdparty protocols: ${err}`);
7677
this.setState({protocolsLoading: false});
7778
if (MatrixClientPeg.get().isGuest()) {
7879
// Guests currently aren't allowed to use this API, so

‎src/components/views/context_menus/MessageContextMenu.js‎

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -67,15 +67,15 @@ module.exports = React.createClass({
6767

6868
onResendClick: function() {
6969
Resend.resend(this.props.mxEvent);
70-
if (this.props.onFinished) this.props.onFinished();
70+
this.closeMenu();
7171
},
7272

7373
onViewSourceClick: function() {
7474
const ViewSource = sdk.getComponent('structures.ViewSource');
7575
Modal.createDialog(ViewSource, {
7676
content: this.props.mxEvent.event,
7777
}, 'mx_Dialog_viewsource');
78-
if (this.props.onFinished) this.props.onFinished();
78+
this.closeMenu();
7979
},
8080

8181
onViewClearSourceClick: function() {
@@ -84,7 +84,7 @@ module.exports = React.createClass({
8484
// FIXME: _clearEvent is private
8585
content: this.props.mxEvent._clearEvent,
8686
}, 'mx_Dialog_viewsource');
87-
if (this.props.onFinished) this.props.onFinished();
87+
this.closeMenu();
8888
},
8989

9090
onRedactClick: function() {
@@ -106,12 +106,12 @@ module.exports = React.createClass({
106106
}).done();
107107
},
108108
}, 'mx_Dialog_confirmredact');
109-
if (this.props.onFinished) this.props.onFinished();
109+
this.closeMenu();
110110
},
111111

112112
onCancelSendClick: function() {
113113
Resend.removeFromQueue(this.props.mxEvent);
114-
if (this.props.onFinished) this.props.onFinished();
114+
this.closeMenu();
115115
},
116116

117117
onForwardClick: function() {
@@ -130,7 +130,7 @@ module.exports = React.createClass({
130130
if (this.props.eventTileOps) {
131131
this.props.eventTileOps.unhideWidget();
132132
}
133-
if (this.props.onFinished) this.props.onFinished();
133+
this.closeMenu();
134134
},
135135

136136
onQuoteClick: function() {
@@ -139,6 +139,7 @@ module.exports = React.createClass({
139139
action: 'quote',
140140
event: this.props.mxEvent,
141141
});
142+
this.closeMenu();
142143
},
143144

144145
render: function() {

‎src/skins/vector/css/_components.scss‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@
5858
@import "./matrix-react-sdk/views/rooms/_SearchableEntityList.scss";
5959
@import "./matrix-react-sdk/views/rooms/_TabCompleteBar.scss";
6060
@import "./matrix-react-sdk/views/rooms/_TopUnreadMessagesBar.scss";
61+
@import "./matrix-react-sdk/views/rooms/_AppsDrawer.scss";
6162
@import "./matrix-react-sdk/views/settings/_DevicesPanel.scss";
6263
@import "./matrix-react-sdk/views/settings/_IntegrationsManager.scss";
6364
@import "./matrix-react-sdk/views/voip/_CallView.scss";

‎src/skins/vector/css/matrix-react-sdk/views/messages/_MEmoteBody.scss‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17+
.mx_MEmoteBody {
18+
white-space: pre-wrap;
19+
}
20+
1721
.mx_MEmoteBody_sender {
1822
cursor: pointer;
1923
}
Lines changed: 159 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,159 @@
1+
/*
2+
Copyright 2015, 2016 OpenMarket Ltd
3+
4+
Licensed under the Apache License, Version 2.0 (the "License");
5+
you may not use this file except in compliance with the License.
6+
You may obtain a copy of the License at
7+
8+
http://www.apache.org/licenses/LICENSE-2.0
9+
10+
Unless required by applicable law or agreed to in writing, software
11+
distributed under the License is distributed on an "AS IS" BASIS,
12+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
See the License for the specific language governing permissions and
14+
limitations under the License.
15+
*/
16+
17+
.mx_AppsDrawer {
18+
}
19+
20+
.mx_AppsContainer {
21+
display: flex;
22+
flex-direction: row;
23+
align-items: center;
24+
}
25+
26+
.mx_AddWidget_button {
27+
order: 2;
28+
cursor: pointer;
29+
padding-right: 12px;
30+
padding: 0;
31+
margin: 0 0 5px 0;
32+
color: $accent-color;
33+
font-size: 12px;
34+
}
35+
36+
.mx_SetAppURLDialog_input {
37+
border-radius: 3px;
38+
border: 1px solid $input-border-color;
39+
padding: 9px;
40+
color: $primary-hairline-color;
41+
background-color: $primary-bg-color;
42+
font-size: 15px;
43+
}
44+
45+
.mx_AppTile {
46+
width: 50%;
47+
margin: 0 5px 2px 0;
48+
border: 1px solid $primary-hairline-color;
49+
border-radius: 2px;
50+
// height: 350px;
51+
// display: inline-block;
52+
}
53+
54+
.mx_AppTileFullWidth {
55+
width: 100%;
56+
margin: 0;
57+
padding: 0;
58+
border: 1px solid $primary-hairline-color;
59+
border-radius: 2px;
60+
// height: 350px;
61+
// display: inline-block;
62+
}
63+
64+
.mx_AppTileMenuBar {
65+
// height: 15px;
66+
margin: 0;
67+
padding: 2px 10px;
68+
// background-color: $e2e-verified-color;
69+
border-bottom: 1px solid $primary-hairline-color;
70+
font-size: 10px;
71+
}
72+
73+
.mx_AppTileMenuBarWidgets {
74+
float: right;
75+
}
76+
.mx_AppTileMenuBarWidget {
77+
// pointer-events: none;
78+
cursor: pointer;
79+
}
80+
81+
.mx_AppTileBody iframe {
82+
width: 100%;
83+
height: 350px;
84+
overflow: hidden;
85+
border: none;
86+
padding: 0;
87+
margin: 0;
88+
display: block;
89+
}
90+
91+
.mx_CloseAppWidget {
92+
}
93+
94+
.mx_AppTileMenuBarWidgetPadding {
95+
margin-right: 5px;
96+
}
97+
98+
.mx_AppIconTile {
99+
background-color: $lightbox-bg-color;
100+
border: 1px solid rgba(0, 0, 0, 0);
101+
width: 200px;
102+
box-shadow: 0 4px 8px 0 rgba(0,0,0,0.2);
103+
transition: 0.3s;
104+
border-radius: 3px;
105+
margin: 5px;
106+
display: inline-block;
107+
}
108+
109+
.mx_AppIconTile.mx_AppIconTile_active {
110+
color: $accent-color;
111+
border-color: $accent-color;
112+
}
113+
114+
.mx_AppIconTile:hover {
115+
border: 1px solid $accent-color;
116+
box-shadow: 0 0 10px 5px rgba(200,200,200,0.5);
117+
}
118+
119+
.mx_AppIconTile_content {
120+
padding: 2px 16px;
121+
height: 60px;
122+
overflow: hidden;
123+
}
124+
125+
.mx_AppIconTile_content h4 {
126+
margin-top: 5px;
127+
margin-bottom: 2px;
128+
}
129+
130+
.mx_AppIconTile_content p {
131+
margin-top: 0;
132+
margin-bottom: 5px;
133+
font-size: smaller;
134+
}
135+
136+
.mx_AppIconTile_image {
137+
padding: 10px;
138+
width: 75%;
139+
max-width:100px;
140+
max-height:100px;
141+
width: auto;
142+
height: auto;
143+
}
144+
145+
.mx_AppIconTile_imageContainer {
146+
text-align: center;
147+
width: 100%;
148+
background-color: white;
149+
border-radius: 3px 3px 0 0;
150+
height: 155px;
151+
display: flex;
152+
justify-content: center;
153+
align-items: center;
154+
}
155+
156+
form.mx_Custom_Widget_Form div {
157+
margin-top: 10px;
158+
margin-bottom: 10px;
159+
}

0 commit comments

Comments
 (0)