Skip to content

Commit eb108c7

Browse files
committed
Merge branch 'develop' into matthew/scalar
2 parents 4dfb0e9 + 34a31a7 commit eb108c7

68 files changed

Lines changed: 1448 additions & 363 deletions

Some content is hidden

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

‎.gitignore‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
/cert.pem
2-
/.DS_Store
32
/karma-reports
43
/key.pem
54
/lib
@@ -8,3 +7,4 @@
87
/vector/bundle.*
98
/vector/components.css
109
/vector/config.json
10+
.DS_Store

‎README.md‎

Lines changed: 100 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,13 @@ Vector is a Matrix web client built using the Matrix React SDK (https://github.c
55

66
Getting Started
77
===============
8-
Vector is a modular webapp built with modern ES6 and requires and npm build system to build.
9-
Instructions for building are below, but building from source shouldn't be necessary
10-
for simple deployments.
8+
9+
The easiest way to test Vector is to just use the hosted copy at https://vector.im/beta.
10+
The develop branch is continuously deployed by Jenkins at https://vector.im/develop for
11+
those who like living dangerously.
12+
13+
To host your own copy of Vector, the quickest bet is to use a pre-built released version
14+
of Vector:
1115

1216
1. Download the latest version from https://vector.im/packages/
1317
1. Untar the tarball on your web server
@@ -19,10 +23,10 @@ for simple deployments.
1923
Building From Source
2024
====================
2125

22-
If you do wish to build vector from source:
26+
Vector is a modular webapp built with modern ES6 and requires a npm build system to build.
2327

2428
1. Install or update `node.js` so that your `npm` is at least at version `2.0.0`
25-
1. Clone the repo: `git clone https://github.com/vector-im/vector-web.git`
29+
1. Clone the repo: `git clone https://github.com/vector-im/vector-web.git`
2630
1. Switch to the vector directory: `cd vector-web`
2731
1. Install the prerequisites: `npm install`
2832
1. If you are using the `develop` branch of vector, you will probably need to
@@ -49,19 +53,73 @@ You can configure the app by copying `vector/config.sample.json` to
4953
1. `default_hs_url` is the default home server url.
5054
1. `default_is_url` is the default identity server url (this is the server used
5155
for verifying third party identifiers like email addresses). If this is blank,
52-
registering with an email address or adding an email address to your account
53-
will not work.
56+
registering with an email address, adding an email address to your account,
57+
or inviting users via email address will not work. Matrix identity servers are
58+
very simple web services which map third party identifiers (currently only email
59+
addresses) to matrix IDs: see http://matrix.org/docs/spec/identity_service/unstable.html
60+
for more details. Currently the only public matrix identity servers are https://matrix.org
61+
and https://vector.im. In future identity servers will be decentralised.
62+
63+
64+
Running as a Desktop app
65+
========================
66+
67+
In future we'll do an official distribution of Vector as an desktop app. Meanwhile,
68+
there are a few options:
69+
70+
@asdf:matrix.org points out that you can use nativefier and it just works(tm):
71+
72+
```
73+
sudo npm install nativefier -g
74+
nativefier https://vector.im/beta/
75+
```
76+
77+
krisa has a dedicated electron project at https://github.com/krisak/vector-electron-desktop
78+
(although you should swap out the 'vector' folder for the latest vector tarball you want to run)
79+
80+
There's also a (much) older electron distribution at https://github.com/stevenhammerton/vector-desktop
81+
5482

5583
Development
5684
===========
5785

86+
Before attempting to develop on Vector you **must** read the developer guide
87+
for `matrix-react-sdk` at https://github.com/matrix-org/matrix-react-sdk, which
88+
also defines the design, architecture and style for Vector too.
89+
90+
The idea of Vector is to be a relatively lightweight "skin" of customisations on
91+
top of the underlying `matrix-react-sdk`. `matrix-react-sdk` provides both the
92+
higher and lower level React components useful for building Matrix communication
93+
apps using React.
94+
95+
After creating a new component you must run `npm run reskindex` to regenerate
96+
the `component-index.js` for the app (used in future for skinning)
97+
98+
**However, as of July 2016 this layering abstraction is broken due to rapid
99+
development on Vector forcing `matrix-react-sdk` to move fast at the expense of
100+
maintaining a clear abstraction between the two.** Hacking on Vector inevitably
101+
means hacking equally on `matrix-react-sdk`, and there are bits of
102+
`matrix-react-sdk` behaviour incorrectly residing in the `vector-web` project
103+
(e.g. matrix-react-sdk specific CSS), and a bunch of Vector specific behaviour
104+
in the `matrix-react-sdk` (grep for Vector). This separation problem will be
105+
solved asap once development on Vector (and thus matrix-react-sdk) has
106+
stabilised. Until then, the two projects should basically be considered as a
107+
single unit. In particular, `matrix-react-sdk` issues are currently filed
108+
against `vector-web` in github.
109+
110+
Please note that Vector is intended to run correctly without access to the public
111+
internet. So please don't depend on resources (JS libs, CSS, images, fonts)
112+
hosted by external CDNs or servers but instead please package all dependencies
113+
into Vector itself.
114+
115+
Setting up a dev environment
116+
============================
117+
58118
Much of the functionality in Vector is actually in the `matrix-react-sdk` and
59119
`matrix-js-sdk` modules. It is possible to set these up in a way that makes it
60120
easy to track the `develop` branches in git and to make local changes without
61121
having to manually rebuild each time.
62122

63-
[Be aware that there may be problems with this process under npm version 3.]
64-
65123
First clone and build `matrix-js-sdk`:
66124

67125
1. `git clone git@github.com:matrix-org/matrix-js-sdk.git`
@@ -115,6 +173,37 @@ will watch for changes to the files and rebuild automatically.
115173
If you add or remove any components from the Vector skin, you will need to rebuild
116174
the skin's index by running, `npm run reskindex`.
117175
176+
Filing issues
177+
=============
178+
179+
All issues for Vector-web and Matrix-react-sdk should be filed at
180+
https://github.com/matrix-org/matrix-react-sdk/issues
181+
182+
Triaging issues
183+
===============
184+
185+
Issues will be triaged by the core team using the following primary set of tags:
186+
187+
priority:
188+
P1: top priority; typically blocks releases.
189+
P2: one below that
190+
P3: non-urgent
191+
P4/P5: bluesky some day, who knows.
192+
193+
bug or feature:
194+
bug severity:
195+
* cosmetic - feature works functionally but UI/UX is broken.
196+
* critical - whole app doesn't work
197+
* major - entire feature doesn't work
198+
* minor - partially broken feature (but still usable)
199+
200+
* release blocker
201+
202+
* ui/ux (think of this as cosmetic)
203+
204+
* network (specific to network conditions)
205+
* platform (platform specific)
206+
118207
Enabling encryption
119208
===================
120209
@@ -123,10 +212,7 @@ day-to-day use; it is experimental and should be considered only as a
123212
proof-of-concept. See https://matrix.org/jira/browse/SPEC-162 for an overview
124213
of the current progress.
125214
126-
To build a version of vector with support for end-to-end encryption, install
127-
the olm module with `npm i https://matrix.org/packages/npm/olm/olm-0.1.0.tgz`
128-
before running `npm start`. The olm library will be detected and used if
129-
available.
215+
Vector is built with support for end-to-end encryption by default.
130216
131217
To enable encryption for a room, type
132218
@@ -142,4 +228,4 @@ Note that historical encrypted messages cannot currently be decoded - history
142228
is therefore lost when the page is reloaded.
143229
144230
There is currently no visual indication of whether encryption is enabled for a
145-
room, or whether a particular message was encrypted.
231+
room.

‎package.json‎

Lines changed: 15 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -17,16 +17,17 @@
1717
"build:compile": "babel --source-maps -d lib src",
1818
"build:bundle": "NODE_ENV=production webpack -p lib/vector/index.js vector/bundle.js",
1919
"build:bundle:dev": "NODE_ENV=production webpack --optimize-occurence-order lib/vector/index.js vector/bundle.js",
20-
"build": "npm run build:css && npm run build:compile && npm run build:bundle",
21-
"build:dev": "npm run build:css && npm run build:compile && npm run build:bundle:dev",
20+
"build:staticfiles": "scripts/staticfiles.js",
21+
"build": "npm run build:staticfiles && npm run build:css && npm run build:compile && npm run build:bundle",
22+
"build:dev": "npm run build:staticfiles && npm run build:css && npm run build:compile && npm run build:bundle:dev",
2223
"package": "scripts/package.sh",
2324
"start:js": "webpack -w src/vector/index.js vector/bundle.js",
2425
"start:js:prod": "NODE_ENV=production webpack -w src/vector/index.js vector/bundle.js",
2526
"start:skins:css": "catw \"src/skins/vector/css/**/*.css\" -o vector/components.css",
2627
"//cache": "Note the -c 1 below due to https://code.google.com/p/chromium/issues/detail?id=508270",
27-
"start": "parallelshell \"npm run start:js\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
28-
"start:prod": "parallelshell \"npm run start:js:prod\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
29-
"clean": "rimraf lib vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css*",
28+
"start": "parallelshell \"npm run build:staticfiles\" \"npm run start:js\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
29+
"start:prod": "parallelshell \"npm run build:staticfiles\" \"npm run start:js:prod\" \"npm run start:skins:css\" \"http-server -c 1 vector\"",
30+
"clean": "rimraf lib vector/olm.js vector/bundle.css vector/bundle.js vector/bundle.js.map vector/webpack.css*",
3031
"prepublish": "npm run build:css && npm run build:compile",
3132
"test": "karma start --single-run=true --autoWatch=false --browsers PhantomJS --colors=false",
3233
"test:multi": "karma start"
@@ -39,19 +40,19 @@
3940
"extract-text-webpack-plugin": "^0.9.1",
4041
"filesize": "^3.1.2",
4142
"flux": "~2.0.3",
42-
"gemini-scrollbar": "matrix-org/gemini-scrollbar#87ebaa7",
43+
"gemini-scrollbar": "matrix-org/gemini-scrollbar#b302279",
4344
"gfm.css": "^1.1.1",
4445
"highlight.js": "^9.0.0",
4546
"linkifyjs": "^2.0.0-beta.4",
4647
"matrix-js-sdk": "matrix-org/matrix-js-sdk#develop",
4748
"matrix-react-sdk": "matrix-org/matrix-react-sdk#develop",
4849
"modernizr": "^3.1.0",
4950
"q": "^1.4.1",
50-
"react": "^15.0.1",
51+
"react": "^15.2.1",
5152
"react-dnd": "^2.1.4",
5253
"react-dnd-html5-backend": "^2.1.2",
53-
"react-dom": "^15.0.1",
54-
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#c3d942e",
54+
"react-dom": "^15.2.1",
55+
"react-gemini-scrollbar": "matrix-org/react-gemini-scrollbar#5e97aef",
5556
"sanitize-html": "^1.11.1"
5657
},
5758
"devDependencies": {
@@ -61,6 +62,7 @@
6162
"catw": "^1.0.1",
6263
"css-raw-loader": "^0.1.1",
6364
"expect": "^1.16.0",
65+
"fs-extra": "^0.30.0",
6466
"http-server": "^0.8.4",
6567
"json-loader": "^0.5.3",
6668
"karma": "^0.13.22",
@@ -74,10 +76,13 @@
7476
"mocha": "^2.4.5",
7577
"parallelshell": "^1.2.0",
7678
"phantomjs-prebuilt": "^2.1.7",
77-
"react-addons-test-utils": "^15.0.1",
7879
"react-addons-perf": "^15.0",
80+
"react-addons-test-utils": "^15.0.1",
7981
"rimraf": "^2.4.3",
8082
"source-map-loader": "^0.1.5",
8183
"webpack": "^1.12.14"
84+
},
85+
"optionalDependencies": {
86+
"olm": "https://matrix.org/packages/npm/olm/olm-1.0.0.tgz"
8287
}
8388
}

‎scripts/staticfiles.js‎

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/usr/bin/env node
2+
3+
// copy static files from node_modules to the vector directory
4+
//
5+
6+
var fs = require('fs-extra');
7+
8+
function exists(f) {
9+
try {
10+
fs.statSync(f);
11+
return true;
12+
} catch(e) {
13+
return false;
14+
}
15+
}
16+
17+
const olm = 'node_modules/olm/olm.js';
18+
if (exists(olm)) {
19+
console.log("copy", olm, "-> vector");
20+
fs.copySync(olm, 'vector/olm.js');
21+
}

‎src/component-index.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,8 @@ module.exports.components['structures.RoomDirectory'] = require('./components/st
3434
module.exports.components['structures.RoomSubList'] = require('./components/structures/RoomSubList');
3535
module.exports.components['structures.SearchBox'] = require('./components/structures/SearchBox');
3636
module.exports.components['structures.ViewSource'] = require('./components/structures/ViewSource');
37+
module.exports.components['views.context_menus.MessageContextMenu'] = require('./components/views/context_menus/MessageContextMenu');
38+
module.exports.components['views.context_menus.NotificationStateContextMenu'] = require('./components/views/context_menus/NotificationStateContextMenu');
3739
module.exports.components['views.elements.ImageView'] = require('./components/views/elements/ImageView');
3840
module.exports.components['views.elements.Spinner'] = require('./components/views/elements/Spinner');
3941
module.exports.components['views.globals.GuestWarningBar'] = require('./components/views/globals/GuestWarningBar');
@@ -46,7 +48,6 @@ module.exports.components['views.messages.DateSeparator'] = require('./component
4648
module.exports.components['views.messages.MessageTimestamp'] = require('./components/views/messages/MessageTimestamp');
4749
module.exports.components['views.messages.SenderProfile'] = require('./components/views/messages/SenderProfile');
4850
module.exports.components['views.rooms.BottomLeftMenuTile'] = require('./components/views/rooms/BottomLeftMenuTile');
49-
module.exports.components['views.rooms.MessageContextMenu'] = require('./components/views/rooms/MessageContextMenu');
5051
module.exports.components['views.rooms.RoomDNDView'] = require('./components/views/rooms/RoomDNDView');
5152
module.exports.components['views.rooms.RoomDropTarget'] = require('./components/views/rooms/RoomDropTarget');
5253
module.exports.components['views.rooms.RoomTooltip'] = require('./components/views/rooms/RoomTooltip');

‎src/components/structures/BottomLeftMenu.js‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,13 +52,13 @@ module.exports = React.createClass({
5252
<div className="mx_BottomLeftMenu">
5353
<div className="mx_BottomLeftMenu_options">
5454
<div className="mx_BottomLeftMenu_createRoom" title="Start chat" onClick={ this.onCreateRoomClick }>
55-
<TintableSvg src="img/icons-create-room.svg" width="24" height="24"/>
55+
<TintableSvg src="img/icons-create-room.svg" width="25" height="25"/>
5656
</div>
5757
<div className="mx_BottomLeftMenu_directory" title="Room directory" onClick={ this.onRoomDirectoryClick }>
58-
<TintableSvg src="img/icons-directory.svg" width="24" height="24"/>
58+
<TintableSvg src="img/icons-directory.svg" width="25" height="25"/>
5959
</div>
6060
<div className="mx_BottomLeftMenu_settings" title="Settings" onClick={ this.onSettingsClick }>
61-
<TintableSvg src="img/icons-settings.svg" width="24" height="24"/>
61+
<TintableSvg src="img/icons-settings.svg" width="25" height="25"/>
6262
</div>
6363
</div>
6464
</div>

‎src/components/structures/CompatibilityPage.js‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,8 +45,8 @@ module.exports = React.createClass({
4545
available or experimental in your current browser.
4646
</p>
4747
<p>
48-
Please install <a href="https://www.google.com/chrome">Chrome</a> for
49-
the best experience. <a href="https://getfirefox.com">Firefox</a>,
48+
Please install <a href="https://www.google.com/chrome">Chrome</a> or
49+
<a href="https://getfirefox.com">Firefox</a> for the best experience.
5050
<a href="http://apple.com/safari">Safari</a> and
5151
<a href="http://opera.com">Opera</a> work too.
5252
</p>

‎src/components/structures/RightPanel.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -136,8 +136,8 @@ module.exports = React.createClass({
136136
buttonGroup =
137137
<div className="mx_RightPanel_headerButtonGroup">
138138
<div className="mx_RightPanel_headerButton" title="Members" onClick={ this.onMemberListButtonClick }>
139-
<TintableSvg src="img/members.svg" width="17" height="22"/>
140139
{ membersBadge }
140+
<TintableSvg src="img/icons-people.svg" width="25" height="25"/>
141141
{ membersHighlight }
142142
</div>
143143
<div className="mx_RightPanel_headerButton mx_RightPanel_filebutton" title="Files">

0 commit comments

Comments
 (0)