Skip to content

Commit a6155c9

Browse files
author
Weblate
committed
Merge branch 'develop' of https://github.com/vector-im/riot-web into develop
Conflicts: src/i18n/strings/eo.json
2 parents a26473b + 0d229f0 commit a6155c9

47 files changed

Lines changed: 262 additions & 132 deletions

Some content is hidden

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

README.md

Lines changed: 30 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ You can configure the app by copying `config.sample.json` to
128128
1. `cross_origin_renderer_url`: URL to a static HTML page hosting code to help display
129129
encrypted file attachments. This MUST be hosted on a completely separate domain to
130130
anything else since it is used to isolate the privileges of file attachments to this
131-
domain. Default: `usercontent.riot.im`. This needs to contain v1.html from
131+
domain. Default: `https://usercontent.riot.im/v1.html`. This needs to contain v1.html from
132132
https://github.com/matrix-org/usercontent/blob/master/v1.html
133133
1. `piwik`: an object containing the following properties:
134134
1. `url`: The URL of the Piwik instance to use for collecting Analytics
@@ -319,31 +319,51 @@ For a developer guide, see the [translating dev doc](docs/translating-dev.md).
319319
Triaging issues
320320
===============
321321
322-
Issues will be triaged by the core team using the following primary set of tags:
322+
Issues will be triaged by the core team using the below set of tags.
323323
324-
priority:
324+
Tags are meant to be used in combination - e.g.:
325+
* P1 critical bug == really urgent stuff that should be next in the bugfixing todo list
326+
* "release blocker" == stuff which is blocking us from cutting the next release.
327+
* P1 feature type:voip == what VoIP features should we be working on next?
325328
326-
* P1: top priority; typically blocks releases
329+
priority: **compulsory**
330+
331+
* P1: top priority - i.e. pool of stuff which we should be working on next
327332
* P2: still need to fix, but lower than P1
328333
* P3: non-urgent
329-
* P4: intereseting idea - bluesky some day
334+
* P4: interesting idea - bluesky some day
330335
* P5: recorded for posterity/to avoid duplicates. No intention to resolves right now.
331336
332-
bug or feature:
337+
bug or feature: **compulsory**
333338
334339
* bug
335340
* feature
336341
337-
bug severity:
342+
bug severity: **compulsory, if bug**
338343
339-
* cosmetic - feature works functionally but UI/UX is broken
340344
* critical - whole app doesn't work
341345
* major - entire feature doesn't work
342346
* minor - partially broken feature (but still usable)
347+
* cosmetic - feature works functionally but UI/UX is broken
348+
349+
types
350+
* type:* - refers to a particular part of the app; used to filter bugs
351+
on a given topic - e.g. VOIP, signup, timeline, etc.
343352
344-
additional categories:
353+
additional categories (self-explanatory):
345354
346355
* release blocker
347356
* ui/ux (think of this as cosmetic)
348357
* network (specific to network conditions)
349-
* platform (platform specific)
358+
* platform specific
359+
* accessibility
360+
* maintenance
361+
* performance
362+
* i18n
363+
* blocked - whether this issue currently can't be progressed due to outside factors
364+
365+
community engagement
366+
* easy
367+
* hacktoberfest
368+
* bounty? - proposal to be included in a bounty programme
369+
* bounty - included in Status Open Bounty

src/components/structures/RightPanel.js

Lines changed: 35 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import sdk from 'matrix-react-sdk';
2424
import dis from 'matrix-react-sdk/lib/dispatcher';
2525
import { MatrixClient } from 'matrix-js-sdk';
2626
import Analytics from 'matrix-react-sdk/lib/Analytics';
27-
import rate_limited_func from 'matrix-react-sdk/lib/ratelimitedfunc';
27+
import RateLimitedFunc from 'matrix-react-sdk/lib/ratelimitedfunc';
2828
import AccessibleButton from 'matrix-react-sdk/lib/components/views/elements/AccessibleButton';
2929
import { showGroupInviteDialog, showGroupAddRoomDialog } from 'matrix-react-sdk/lib/GroupAddressPicker';
3030
import GroupStoreCache from 'matrix-react-sdk/lib/stores/GroupStoreCache';
@@ -58,8 +58,8 @@ class HeaderButton extends React.Component {
5858
<div className="mx_RightPanel_headerButton_badge">
5959
{ this.props.badge ? this.props.badge : <span>&nbsp;</span> }
6060
</div>
61-
<TintableSvg src={this.props.iconSrc} width="25" height="25"/>
62-
{ this.props.isHighlighted ? <div className="mx_RightPanel_headerButton_highlight"></div> : <div/> }
61+
<TintableSvg src={this.props.iconSrc} width="25" height="25" />
62+
{ this.props.isHighlighted ? <div className="mx_RightPanel_headerButton_highlight" /> : <div /> }
6363

6464
</AccessibleButton>;
6565
}
@@ -184,18 +184,17 @@ module.exports = React.createClass({
184184

185185
onRoomStateMember: function(ev, state, member) {
186186
// redraw the badge on the membership list
187-
if (this.state.phase == this.Phase.RoomMemberList && member.roomId === this.props.roomId) {
187+
if (this.state.phase === this.Phase.RoomMemberList && member.roomId === this.props.roomId) {
188188
this._delayedUpdate();
189-
}
190-
else if (this.state.phase === this.Phase.RoomMemberInfo && member.roomId === this.props.roomId &&
189+
} else if (this.state.phase === this.Phase.RoomMemberInfo && member.roomId === this.props.roomId &&
191190
member.userId === this.state.member.userId) {
192191
// refresh the member info (e.g. new power level)
193192
this._delayedUpdate();
194193
}
195194
},
196195

197-
_delayedUpdate: new rate_limited_func(function() {
198-
this.forceUpdate();
196+
_delayedUpdate: new RateLimitedFunc(function() {
197+
this.forceUpdate(); // eslint-disable-line babel/no-invalid-this
199198
}, 500),
200199

201200
onAction: function(payload) {
@@ -266,22 +265,23 @@ module.exports = React.createClass({
266265
let inviteGroup;
267266

268267
let membersBadge;
269-
if ((this.state.phase == this.Phase.RoomMemberList || this.state.phase === this.Phase.RoomMemberInfo)
268+
let membersTitle = _t('Members');
269+
if ((this.state.phase === this.Phase.RoomMemberList || this.state.phase === this.Phase.RoomMemberInfo)
270270
&& this.props.roomId
271271
) {
272272
const cli = this.context.matrixClient;
273273
const room = cli.getRoom(this.props.roomId);
274-
let userIsInRoom;
274+
let isUserInRoom;
275275
if (room) {
276-
membersBadge = formatCount(room.getJoinedMembers().length);
277-
userIsInRoom = room.hasMembershipState(
278-
this.context.matrixClient.credentials.userId, 'join',
279-
);
276+
const numMembers = room.getJoinedMembers().length;
277+
membersTitle = _t('%(count)s Members', { count: numMembers });
278+
membersBadge = <div title={membersTitle}>{ formatCount(numMembers) }</div>;
279+
isUserInRoom = room.hasMembershipState(this.context.matrixClient.credentials.userId, 'join');
280280
}
281281

282-
if (userIsInRoom) {
282+
if (isUserInRoom) {
283283
inviteGroup =
284-
<AccessibleButton className="mx_RightPanel_invite" onClick={ this.onInviteButtonClick } >
284+
<AccessibleButton className="mx_RightPanel_invite" onClick={this.onInviteButtonClick}>
285285
<div className="mx_RightPanel_icon" >
286286
<TintableSvg src="img/icon-invite-people.svg" width="35" height="35" />
287287
</div>
@@ -292,13 +292,13 @@ module.exports = React.createClass({
292292

293293
const isPhaseGroup = [
294294
this.Phase.GroupMemberInfo,
295-
this.Phase.GroupMemberList
295+
this.Phase.GroupMemberList,
296296
].includes(this.state.phase);
297297

298298
let headerButtons = [];
299299
if (this.props.roomId) {
300300
headerButtons = [
301-
<HeaderButton key="_membersButton" title={_t('Members')} iconSrc="img/icons-people.svg"
301+
<HeaderButton key="_membersButton" title={membersTitle} iconSrc="img/icons-people.svg"
302302
isHighlighted={[this.Phase.RoomMemberList, this.Phase.RoomMemberInfo].includes(this.state.phase)}
303303
clickPhase={this.Phase.RoomMemberList}
304304
badge={membersBadge}
@@ -336,54 +336,54 @@ module.exports = React.createClass({
336336
// button on these 2 screens or you won't be able to re-expand the panel.
337337
headerButtons.push(
338338
<div className="mx_RightPanel_headerButton mx_RightPanel_collapsebutton" key="_minimizeButton"
339-
title={ _t("Hide panel") } aria-label={ _t("Hide panel") } onClick={ this.onCollapseClick }
339+
title={_t("Hide panel")} aria-label={_t("Hide panel")} onClick={this.onCollapseClick}
340340
>
341-
<TintableSvg src="img/minimise.svg" width="10" height="16"/>
341+
<TintableSvg src="img/minimise.svg" width="10" height="16" />
342342
</div>,
343343
);
344344
}
345345

346346
let panel = <div />;
347347
if (!this.props.collapsed) {
348-
if (this.props.roomId && this.state.phase == this.Phase.RoomMemberList) {
348+
if (this.props.roomId && this.state.phase === this.Phase.RoomMemberList) {
349349
panel = <MemberList roomId={this.props.roomId} key={this.props.roomId} />;
350-
} else if (this.props.groupId && this.state.phase == this.Phase.GroupMemberList) {
350+
} else if (this.props.groupId && this.state.phase === this.Phase.GroupMemberList) {
351351
panel = <GroupMemberList groupId={this.props.groupId} key={this.props.groupId} />;
352352
} else if (this.state.phase === this.Phase.GroupRoomList) {
353353
panel = <GroupRoomList groupId={this.props.groupId} key={this.props.groupId} />;
354-
} else if (this.state.phase == this.Phase.RoomMemberInfo) {
354+
} else if (this.state.phase === this.Phase.RoomMemberInfo) {
355355
panel = <MemberInfo member={this.state.member} key={this.props.roomId || this.state.member.userId} />;
356-
} else if (this.state.phase == this.Phase.GroupMemberInfo) {
356+
} else if (this.state.phase === this.Phase.GroupMemberInfo) {
357357
panel = <GroupMemberInfo
358358
groupMember={this.state.member}
359359
groupId={this.props.groupId}
360360
key={this.state.member.user_id} />;
361-
} else if (this.state.phase == this.Phase.GroupRoomInfo) {
361+
} else if (this.state.phase === this.Phase.GroupRoomInfo) {
362362
panel = <GroupRoomInfo
363363
groupRoomId={this.state.groupRoomId}
364364
groupId={this.props.groupId}
365365
key={this.state.groupRoomId} />;
366-
} else if (this.state.phase == this.Phase.NotificationPanel) {
366+
} else if (this.state.phase === this.Phase.NotificationPanel) {
367367
panel = <NotificationPanel />;
368-
} else if (this.state.phase == this.Phase.FilePanel) {
368+
} else if (this.state.phase === this.Phase.FilePanel) {
369369
panel = <FilePanel roomId={this.props.roomId} />;
370370
}
371371
}
372372

373373
if (!panel) {
374-
panel = <div className="mx_RightPanel_blank"></div>;
374+
panel = <div className="mx_RightPanel_blank" />;
375375
}
376376

377377
if (this.props.groupId && this.state.isUserPrivilegedInGroup) {
378378
inviteGroup = isPhaseGroup ? (
379-
<AccessibleButton className="mx_RightPanel_invite" onClick={ this.onInviteButtonClick } >
379+
<AccessibleButton className="mx_RightPanel_invite" onClick={this.onInviteButtonClick}>
380380
<div className="mx_RightPanel_icon" >
381381
<TintableSvg src="img/icon-invite-people.svg" width="35" height="35" />
382382
</div>
383383
<div className="mx_RightPanel_message">{ _t('Invite to this community') }</div>
384384
</AccessibleButton>
385385
) : (
386-
<AccessibleButton className="mx_RightPanel_invite" onClick={ this.onInviteButtonClick } >
386+
<AccessibleButton className="mx_RightPanel_invite" onClick={this.onInviteButtonClick}>
387387
<div className="mx_RightPanel_icon" >
388388
<TintableSvg src="img/icons-room-add.svg" width="35" height="35" />
389389
</div>
@@ -392,19 +392,16 @@ module.exports = React.createClass({
392392
);
393393
}
394394

395-
let classes = classNames(
396-
"mx_RightPanel", "mx_fadable",
397-
{
398-
"collapsed": this.props.collapsed,
399-
"mx_fadable_faded": this.props.disabled,
400-
}
401-
);
395+
const classes = classNames("mx_RightPanel", "mx_fadable", {
396+
"collapsed": this.props.collapsed,
397+
"mx_fadable_faded": this.props.disabled,
398+
});
402399

403400
return (
404401
<aside className={classes}>
405402
<div className="mx_RightPanel_header">
406403
<div className="mx_RightPanel_headerButtonGroup">
407-
{headerButtons}
404+
{ headerButtons }
408405
</div>
409406
</div>
410407
{ panel }

src/components/structures/ViewSource.js

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -16,14 +16,17 @@ limitations under the License.
1616

1717
'use strict';
1818

19-
var React = require('react');
19+
import React from 'react';
20+
import PropTypes from 'prop-types';
21+
import SyntaxHighlight from '../views/elements/SyntaxHighlight';
22+
2023

2124
module.exports = React.createClass({
2225
displayName: 'ViewSource',
2326

2427
propTypes: {
25-
content: React.PropTypes.object.isRequired,
26-
onFinished: React.PropTypes.func.isRequired,
28+
content: PropTypes.object.isRequired,
29+
onFinished: PropTypes.func.isRequired,
2730
},
2831

2932
componentDidMount: function() {
@@ -45,9 +48,9 @@ module.exports = React.createClass({
4548
render: function() {
4649
return (
4750
<div className="mx_ViewSource">
48-
<pre>
49-
{JSON.stringify(this.props.content, null, 2)}
50-
</pre>
51+
<SyntaxHighlight className="json">
52+
{ JSON.stringify(this.props.content, null, 2) }
53+
</SyntaxHighlight>
5154
</div>
5255
);
5356
}

src/components/views/context_menus/RoomTileContextMenu.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -275,7 +275,7 @@ module.exports = React.createClass({
275275
<div className={ alertMeClasses } onClick={this._onClickAlertMe} >
276276
<img className="mx_RoomTileContextMenu_notif_activeIcon" src="img/notif-active.svg" width="12" height="12" />
277277
<img className="mx_RoomTileContextMenu_notif_icon mx_filterFlipColor" src="img/icon-context-mute-off-copy.svg" width="16" height="12" />
278-
{ _t('All messages (loud)') }
278+
{ _t('All messages (noisy)') }
279279
</div>
280280
<div className={ allNotifsClasses } onClick={this._onClickAllNotifs} >
281281
<img className="mx_RoomTileContextMenu_notif_activeIcon" src="img/notif-active.svg" width="12" height="12" />

0 commit comments

Comments
 (0)