Skip to content

Commit a72d0c5

Browse files
committed
Merge remote-tracking branch 'origin/develop' into dbkr/email_notifs
2 parents 3cb0920 + b801894 commit a72d0c5

45 files changed

Lines changed: 1059 additions & 319 deletions

Some content is hidden

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

‎CHANGELOG.md‎

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
Changes in [0.6.0](https://github.com/vector-im/vector-web/releases/tag/v0.6.0) (2016-04-19)
2+
============================================================================================
3+
[Full Changelog](https://github.com/vector-im/vector-web/compare/v0.5.0...v0.6.0)
4+
5+
* Matthew/design tweaks
6+
[\#1402](https://github.com/vector-im/vector-web/pull/1402)
7+
* Improve handling of notification rules we can't parse
8+
[\#1399](https://github.com/vector-im/vector-web/pull/1399)
9+
* Do less mangling of jenkins builds
10+
[\#1391](https://github.com/vector-im/vector-web/pull/1391)
11+
* Start Notifications component refactor
12+
[\#1386](https://github.com/vector-im/vector-web/pull/1386)
13+
* make the UI fadable to help with decluttering
14+
[\#1376](https://github.com/vector-im/vector-web/pull/1376)
15+
* Get and display a user's pushers in settings
16+
[\#1374](https://github.com/vector-im/vector-web/pull/1374)
17+
* URL previewing support
18+
[\#1343](https://github.com/vector-im/vector-web/pull/1343)
19+
* 😄 Emoji autocomplete and unicode emoji to image conversion using emojione.
20+
[\#1332](https://github.com/vector-im/vector-web/pull/1332)
21+
* Show full-size avatar on MemberInfo avatar click
22+
[\#1340](https://github.com/vector-im/vector-web/pull/1340)
23+
* Numerous other changes via [matrix-react-sdk 0.5.1](https://github.com/matrix-org/matrix-react-sdk/blob/v0.5.1/CHANGELOG.md)
24+
125
Changes in [0.5.0](https://github.com/vector-im/vector-web/releases/tag/v0.5.0) (2016-03-30)
226
============================================================================================
327
[Full Changelog](https://github.com/vector-im/vector-web/compare/v0.4.1...v0.5.0)
@@ -71,7 +95,7 @@ Changes in vector v0.1.2 (2015-10-28)
7195
* Better hover-over on member list
7296
* Support CAS auth
7397
* Many other bug fixes
74-
98+
7599
Changes in vector v0.1.1 (2015-08-10)
76100
======================================
77101

‎package.json‎

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "vector-web",
3-
"version": "0.5.0",
3+
"version": "0.6.0",
44
"description": "Vector webapp",
55
"author": "matrix.org",
66
"repository": {
@@ -16,7 +16,7 @@
1616
"build:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css --no-watch",
1717
"build:compile": "babel --source-maps -d lib src",
1818
"build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js",
19-
"build:bundle:dev": "webpack --optimize-occurence-order lib/vector/index.js vector/bundle.js",
19+
"build:bundle:dev": "NODE_ENV=production webpack --optimize-occurence-order lib/vector/index.js vector/bundle.js",
2020
"build": "npm run build:css && npm run build:compile && npm run build:bundle",
2121
"build:dev": "npm run build:css && npm run build:compile && npm run build:bundle:dev",
2222
"package": "scripts/package.sh",
@@ -37,19 +37,19 @@
3737
"extract-text-webpack-plugin": "^0.9.1",
3838
"filesize": "^3.1.2",
3939
"flux": "~2.0.3",
40-
"gemini-scrollbar": "matrix-org/gemini-scrollbar#7dc736d",
40+
"gemini-scrollbar": "matrix-org/gemini-scrollbar#87ebaa7",
4141
"gfm.css": "^1.1.1",
4242
"highlight.js": "^9.0.0",
4343
"linkifyjs": "^2.0.0-beta.4",
4444
"matrix-js-sdk": "matrix-org/matrix-js-sdk#develop",
4545
"matrix-react-sdk": "matrix-org/matrix-react-sdk#develop",
4646
"modernizr": "^3.1.0",
4747
"q": "^1.4.1",
48-
"react": "^0.14.8",
49-
"react-dnd": "^2.0.2",
50-
"react-dnd-html5-backend": "^2.0.0",
51-
"react-dom": "^0.14.2",
52-
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#869a86b",
48+
"react": "^15.0.1",
49+
"react-dnd": "^2.1.4",
50+
"react-dnd-html5-backend": "^2.1.2",
51+
"react-dom": "^15.0.1",
52+
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#c3d942e",
5353
"sanitize-html": "^1.11.1"
5454
},
5555
"devDependencies": {
@@ -72,7 +72,8 @@
7272
"mocha": "^2.4.5",
7373
"parallelshell": "^1.2.0",
7474
"phantomjs-prebuilt": "^2.1.7",
75-
"react-addons-test-utils": "^0.14.8",
75+
"react-addons-test-utils": "^15.0.1",
76+
"react-addons-perf": "^15.0",
7677
"rimraf": "^2.4.3",
7778
"source-map-loader": "^0.1.5",
7879
"webpack": "^1.12.14"

‎src/component-index.js‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,9 @@ limitations under the License.
1919
* You can edit it you like, but your changes will be overwritten,
2020
* so you'd just be trying to swim upstream like a salmon.
2121
* You are not a salmon.
22+
*
23+
* To update it, run:
24+
* ./reskindex.js -h header
2225
*/
2326

2427
module.exports.components = require('matrix-react-sdk/lib/component-index').components;
@@ -29,6 +32,7 @@ module.exports.components['structures.LeftPanel'] = require('./components/struct
2932
module.exports.components['structures.RightPanel'] = require('./components/structures/RightPanel');
3033
module.exports.components['structures.RoomDirectory'] = require('./components/structures/RoomDirectory');
3134
module.exports.components['structures.RoomSubList'] = require('./components/structures/RoomSubList');
35+
module.exports.components['structures.SearchBox'] = require('./components/structures/SearchBox');
3236
module.exports.components['structures.ViewSource'] = require('./components/structures/ViewSource');
3337
module.exports.components['views.elements.ImageView'] = require('./components/views/elements/ImageView');
3438
module.exports.components['views.elements.Spinner'] = require('./components/views/elements/Spinner');

‎src/components/structures/BottomLeftMenu.js‎

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -47,12 +47,19 @@ module.exports = React.createClass({
4747

4848
render: function() {
4949
var BottomLeftMenuTile = sdk.getComponent('rooms.BottomLeftMenuTile');
50+
var TintableSvg = sdk.getComponent('elements.TintableSvg');
5051
return (
5152
<div className="mx_BottomLeftMenu">
5253
<div className="mx_BottomLeftMenu_options">
53-
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/create-big.svg" label="Start chat" onClick={ this.onCreateRoomClick }/>
54-
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/directory-big.svg" label="Directory" onClick={ this.onRoomDirectoryClick }/>
55-
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/settings-big.svg" label="Settings" onClick={ this.onSettingsClick }/>
54+
<div className="mx_BottomLeftMenu_createRoom" title="Start chat" onClick={ this.onCreateRoomClick }>
55+
<TintableSvg src="img/icons-create-room.svg" width="24" height="24"/>
56+
</div>
57+
<div className="mx_BottomLeftMenu_directory" title="Room directory" onClick={ this.onRoomDirectoryClick }>
58+
<TintableSvg src="img/icons-directory.svg" width="24" height="24"/>
59+
</div>
60+
<div className="mx_BottomLeftMenu_settings" title="Settings" onClick={ this.onSettingsClick }>
61+
<TintableSvg src="img/icons-settings.svg" width="24" height="24"/>
62+
</div>
5663
</div>
5764
</div>
5865
);

‎src/components/structures/LeftPanel.js‎

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ var LeftPanel = React.createClass({
3131
getInitialState: function() {
3232
return {
3333
showCallElement: null,
34+
searchFilter: '',
3435
};
3536
},
3637

@@ -84,9 +85,14 @@ var LeftPanel = React.createClass({
8485
}
8586
},
8687

88+
onSearch: function(term) {
89+
this.setState({ searchFilter: term });
90+
},
91+
8792
render: function() {
8893
var RoomList = sdk.getComponent('rooms.RoomList');
8994
var BottomLeftMenu = sdk.getComponent('structures.BottomLeftMenu');
95+
var SearchBox = sdk.getComponent('structures.SearchBox');
9096

9197
var collapseButton;
9298
var classes = "mx_LeftPanel mx_fadable";
@@ -110,11 +116,13 @@ var LeftPanel = React.createClass({
110116

111117
return (
112118
<aside className={classes} style={{ opacity: this.props.opacity }}>
119+
<SearchBox collapsed={ this.props.collapsed } onSearch={ this.onSearch } />
113120
{ collapseButton }
114121
{ callPreview }
115122
<RoomList
116123
selectedRoom={this.props.selectedRoom}
117124
collapsed={this.props.collapsed}
125+
searchFilter={this.state.searchFilter}
118126
ConferenceHandler={VectorConferenceHandler} />
119127
<BottomLeftMenu collapsed={this.props.collapsed}/>
120128
</aside>

‎src/components/structures/RightPanel.js‎

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,10 @@ module.exports = React.createClass({
155155
panel = <MemberInfo roomId={this.props.roomId} member={this.state.member} key={this.props.roomId} />
156156
}
157157
}
158+
}
158159

160+
if (!panel) {
161+
panel = <div className="mx_RightPanel_blank"></div>;
159162
}
160163

161164
var classes = "mx_RightPanel mx_fadable";
@@ -169,6 +172,8 @@ module.exports = React.createClass({
169172
{ buttonGroup }
170173
</div>
171174
{ panel }
175+
<div className="mx_RightPanel_footer">
176+
</div>
172177
</aside>
173178
);
174179
}

‎src/components/structures/RoomDirectory.js‎

Lines changed: 20 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,14 @@ module.exports = React.createClass({
4343
}
4444
},
4545

46+
componentWillMount: function() {
47+
// dis.dispatch({
48+
// action: 'ui_opacity',
49+
// sideOpacity: 0.3,
50+
// middleOpacity: 0.3,
51+
// });
52+
},
53+
4654
componentDidMount: function() {
4755
var self = this;
4856
MatrixClientPeg.get().publicRooms(function (err, data) {
@@ -65,6 +73,14 @@ module.exports = React.createClass({
6573
});
6674
},
6775

76+
componentWillUnmount: function() {
77+
// dis.dispatch({
78+
// action: 'ui_opacity',
79+
// sideOpacity: 1.0,
80+
// middleOpacity: 1.0,
81+
// });
82+
},
83+
6884
showRoom: function(roomId) {
6985
// extract the metadata from the publicRooms structure to pass
7086
// as out-of-band data to view_room, because we get information
@@ -113,8 +129,8 @@ module.exports = React.createClass({
113129
var rooms = this.state.publicRooms.filter(function(a) {
114130
// FIXME: if incrementally typing, keep narrowing down the search set
115131
// incrementally rather than starting over each time.
116-
return (((a.name && a.name.toLowerCase().search(filter.toLowerCase()) >= 0) ||
117-
(a.aliases && a.aliases[0].toLowerCase().search(filter.toLowerCase()) >= 0)) &&
132+
return (((a.name && a.name.toLowerCase().search(filter.toLowerCase()) >= 0) ||
133+
(a.aliases && a.aliases[0].toLowerCase().search(filter.toLowerCase()) >= 0)) &&
118134
a.num_joined_members > 0);
119135
}).sort(function(a,b) {
120136
return a.num_joined_members - b.num_joined_members;
@@ -197,7 +213,8 @@ module.exports = React.createClass({
197213
<SimpleRoomHeader title="Directory" />
198214
<div className="mx_RoomDirectory_list">
199215
<input ref="roomAlias" placeholder="Join a room (e.g. #foo:domain.com)" className="mx_RoomDirectory_input" size="64" onKeyUp={ this.onKeyUp }/>
200-
<GeminiScrollbar className="mx_RoomDirectory_tableWrapper">
216+
<GeminiScrollbar className="mx_RoomDirectory_tableWrapper"
217+
relayoutOnUpdate={false} >
201218
<table ref="directory_table" className="mx_RoomDirectory_table">
202219
<tbody>
203220
{ this.getRows(this.state.roomAlias) }
@@ -209,4 +226,3 @@ module.exports = React.createClass({
209226
);
210227
}
211228
});
212-

‎src/components/structures/RoomSubList.js‎

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -65,16 +65,12 @@ var RoomSubList = React.createClass({
6565
selectedRoom: React.PropTypes.string.isRequired,
6666
startAsHidden: React.PropTypes.bool,
6767
showSpinner: React.PropTypes.bool, // true to show a spinner if 0 elements when expanded
68-
69-
// TODO: Fix the name of this. This is too easily confused with the
70-
// "hidden" state which is the expanded (or not) view of the list of rooms.
71-
// What this prop *really* does is control whether the room name is displayed
72-
// so it should be named as such.
73-
collapsed: React.PropTypes.bool.isRequired,
68+
collapsed: React.PropTypes.bool.isRequired, // is LeftPanel collapsed?
7469
onHeaderClick: React.PropTypes.func,
7570
alwaysShowHeader: React.PropTypes.bool,
7671
incomingCall: React.PropTypes.object,
77-
onShowMoreRooms: React.PropTypes.func
72+
onShowMoreRooms: React.PropTypes.func,
73+
searchFilter: React.PropTypes.string,
7874
},
7975

8076
getInitialState: function() {
@@ -93,13 +89,20 @@ var RoomSubList = React.createClass({
9389
},
9490

9591
componentWillMount: function() {
96-
this.sortList(this.props.list, this.props.order);
92+
this.sortList(this.applySearchFilter(this.props.list, this.props.searchFilter), this.props.order);
9793
},
9894

9995
componentWillReceiveProps: function(newProps) {
10096
// order the room list appropriately before we re-render
10197
//if (debug) console.log("received new props, list = " + newProps.list);
102-
this.sortList(newProps.list, newProps.order);
98+
this.sortList(this.applySearchFilter(newProps.list, newProps.searchFilter), newProps.order);
99+
},
100+
101+
applySearchFilter: function(list, filter) {
102+
if (filter === "") return list;
103+
return list.filter((room) => {
104+
return room.name && room.name.toLowerCase().indexOf(filter.toLowerCase()) >= 0
105+
});
103106
},
104107

105108
onClick: function(ev) {
@@ -278,7 +281,7 @@ var RoomSubList = React.createClass({
278281
return (
279282
<h2 onClick={ this.onClick } className="mx_RoomSubList_label">
280283
{ this.props.collapsed ? '' : this.props.label }
281-
<TintableSvg className="mx_RoomSubList_chevron"
284+
<img className="mx_RoomSubList_chevron"
282285
src={ this.state.hidden ? "img/list-close.svg" : "img/list-open.svg" }
283286
width="10" height="10" />
284287
</h2>

0 commit comments

Comments
 (0)