From 10a989a003ec4d2b8c9e2bb72b7d342a4412b3d0 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 15:33:35 +0100 Subject: [PATCH 01/17] make icon optional in action button as we'll draw the icon with css --- src/components/views/elements/ActionButton.js | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/components/views/elements/ActionButton.js b/src/components/views/elements/ActionButton.js index e494c216de..a9d95e4a52 100644 --- a/src/components/views/elements/ActionButton.js +++ b/src/components/views/elements/ActionButton.js @@ -30,7 +30,7 @@ export default React.createClass({ action: PropTypes.string.isRequired, mouseOverAction: PropTypes.string, label: PropTypes.string.isRequired, - iconPath: PropTypes.string.isRequired, + iconPath: PropTypes.string, }, getDefaultProps: function() { @@ -72,6 +72,10 @@ export default React.createClass({ tooltip = ; } + const icon = this.props.iconPath ? + () : + undefined; + return ( - + { icon } { tooltip } ); From fe762870353a3bf0c75f21891285e0fd239cd862 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 15:34:05 +0100 Subject: [PATCH 02/17] style communities button, make it visible again --- res/css/structures/_TagPanel.scss | 27 +++++++-- res/img/icons-groups-nobg.svg | 60 +++++++++++++++++++ src/components/views/elements/GroupsButton.js | 1 - 3 files changed, 81 insertions(+), 7 deletions(-) create mode 100644 res/img/icons-groups-nobg.svg diff --git a/res/css/structures/_TagPanel.scss b/res/css/structures/_TagPanel.scss index 83e7d46524..85e5c1742f 100644 --- a/res/css/structures/_TagPanel.scss +++ b/res/css/structures/_TagPanel.scss @@ -124,13 +124,28 @@ limitations under the License. padding-right: 4px; } -.mx_TagPanel_groupsButton { +.mx_TagPanel_groupsButton > .mx_AccessibleButton { + flex: auto; margin-bottom: 17px; margin-top: 18px; - height: 25px; - display: none; -} + height: 40px; + width: 40px; + border-radius: 20px; + background-color: $roomheader-addroom-color; + position: relative; + /* overwrite mx_RoleButton inline-block */ + display: block !important; -.mx_TagPanel_groupsButton object { - pointer-events: none; + &:before { + background-color: $tagpanel-bg-color; + mask: url('../../img/icons-groups-nobg.svg'); + mask-repeat: no-repeat; + mask-position: center 8px; + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + } } diff --git a/res/img/icons-groups-nobg.svg b/res/img/icons-groups-nobg.svg new file mode 100644 index 0000000000..a3d223b76d --- /dev/null +++ b/res/img/icons-groups-nobg.svg @@ -0,0 +1,60 @@ + +image/svg+xml + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/components/views/elements/GroupsButton.js b/src/components/views/elements/GroupsButton.js index 75dfe4e9ad..854670cb3f 100644 --- a/src/components/views/elements/GroupsButton.js +++ b/src/components/views/elements/GroupsButton.js @@ -24,7 +24,6 @@ const GroupsButton = function(props) { return ( From f987a50fef56830c126d9efb959a835190fd03e6 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 15:43:57 +0100 Subject: [PATCH 03/17] make add community icon themeable and give it background so it's visible --- res/css/structures/_MyGroups.scss | 26 +++++++++++++++++++++----- src/components/structures/MyGroups.js | 1 - 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/res/css/structures/_MyGroups.scss b/res/css/structures/_MyGroups.scss index 6d140721c8..b6c82aa366 100644 --- a/res/css/structures/_MyGroups.scss +++ b/res/css/structures/_MyGroups.scss @@ -44,13 +44,29 @@ limitations under the License. .mx_MyGroups_headerCard .mx_MyGroups_headerCard_button { margin-right: 13px; - height: 50px; + height: 40px; + width: 40px; + border-radius: 20px; + background-color: $roomheader-addroom-color; + position: relative; + + &:before { + background-color: $accent-fg-color; + mask: url('../../img/icons-create-room.svg'); + mask-repeat: no-repeat; + mask-position: center; + mask-size: 80%; + content: ''; + position: absolute; + top: 0; + bottom: 0; + left: 0; + right: 0; + } } -.mx_MyGroups_headerCard_button object { - /* Otherwise the SVG object absorbs clicks and the button doesn't work */ - pointer-events: none; -} + + .mx_MyGroups_headerCard_header { font-weight: bold; diff --git a/src/components/structures/MyGroups.js b/src/components/structures/MyGroups.js index edb50fcedb..3ad1a00361 100644 --- a/src/components/structures/MyGroups.js +++ b/src/components/structures/MyGroups.js @@ -112,7 +112,6 @@ export default withMatrixClient(React.createClass({
-
From ab728ead722006a8c7ccc9182846a112360a7dcb Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 16:51:19 +0100 Subject: [PATCH 04/17] give group header some padding --- res/css/structures/_GroupView.scss | 2 ++ 1 file changed, 2 insertions(+) diff --git a/res/css/structures/_GroupView.scss b/res/css/structures/_GroupView.scss index 542d9d293b..398c51ba91 100644 --- a/res/css/structures/_GroupView.scss +++ b/res/css/structures/_GroupView.scss @@ -34,6 +34,8 @@ limitations under the License. .mx_GroupView_header_view { border-bottom: 1px solid $primary-hairline-color; padding-bottom: 0px; + padding-left: 8px; + padding-right: 8px; } .mx_GroupView_header_avatar, .mx_GroupView_header_info { From 75925f6192e1d1a9934325a9dedfa26e9378bc26 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 16:51:32 +0100 Subject: [PATCH 05/17] room sublist seems to get rendered w/o _scroll element when loading the page from a community url --- src/resizer/room.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/resizer/room.js b/src/resizer/room.js index 70f8be219a..def12d49eb 100644 --- a/src/resizer/room.js +++ b/src/resizer/room.js @@ -38,6 +38,9 @@ class RoomSizer extends Sizer { class RoomDistributor extends FixedDistributor { resize(itemSize) { const scrollItem = this.item.querySelector(".mx_RoomSubList_scroll"); + if (!scrollItem) { + return; //FIXME: happens when starting the page on a community url, taking the safe way out for now + } const fixedHeight = this.item.offsetHeight - scrollItem.offsetHeight; if (itemSize > (fixedHeight + scrollItem.scrollHeight)) { super.resize("resized-all"); From fb4a4413416cf39ab36d52a6b6b7d7f48ffaff00 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 16:52:45 +0100 Subject: [PATCH 06/17] fix navigation to room info in group view --- src/components/structures/RightPanel.js | 2 ++ src/components/views/right_panel/GroupHeaderButtons.js | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 33c09e1b16..8fd464e80d 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -141,6 +141,8 @@ export default class RightPanel extends React.Component { if (payload.action === "view_right_panel_phase") { this.setState({ phase: payload.phase, + groupRoomId: payload.groupRoomId, + groupId: payload.groupId, member: payload.member, }); } diff --git a/src/components/views/right_panel/GroupHeaderButtons.js b/src/components/views/right_panel/GroupHeaderButtons.js index 3cb0727928..cdbf027d57 100644 --- a/src/components/views/right_panel/GroupHeaderButtons.js +++ b/src/components/views/right_panel/GroupHeaderButtons.js @@ -45,7 +45,7 @@ export default class GroupHeaderButtons extends HeaderButtons { } else if (payload.action === "view_group") { this.setPhase(RightPanel.Phase.GroupMemberList); } else if (payload.action === "view_group_room") { - this.setPhase(RightPanel.Phase.GroupRoomInfo, {groupRoomId: payload.groupRoomId}); + this.setPhase(RightPanel.Phase.GroupRoomInfo, {groupRoomId: payload.groupRoomId, groupId: payload.groupId}); } else if (payload.action === "view_group_room_list") { this.setPhase(RightPanel.Phase.GroupRoomList); } else if (payload.action === "view_group_member_list") { From f4e61b2bf169c060a48b24a5e368200a7c979297 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 16:53:04 +0100 Subject: [PATCH 07/17] fixup for roomsublist fix --- src/components/views/rooms/RoomList.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 10fce0ccf0..3ff3ce694a 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -164,7 +164,12 @@ module.exports = React.createClass({ // load stored sizes Object.entries(this.subListSizes).forEach(([id, size]) => { - this.resizer.forHandleWithId(id).resize(size); + const handle = this.resizer.forHandleWithId(id); + if (handle) { + try { + handle.resize(size); + } catch(_e) {} + } }); this.resizer.attach(); From dbe5449d0c1c27680dc147480207c6fa0830b161 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 17:21:55 +0100 Subject: [PATCH 08/17] bring invite buttons back in group member / room list also put filter field on bottom --- src/components/structures/RightPanel.js | 20 ------------- .../views/groups/GroupMemberList.js | 29 ++++++++++++++++++- src/components/views/groups/GroupRoomList.js | 21 +++++++++++++- 3 files changed, 48 insertions(+), 22 deletions(-) diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 8fd464e80d..3687764712 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -192,26 +192,6 @@ export default class RightPanel extends React.Component { panel = ; } - // TODO: either include this in the DOM again, or move it to other component - if (this.props.groupId && this.state.isUserPrivilegedInGroup) { - // inviteGroup = - isPhaseGroup ? ( - -
- -
-
{ _t('Invite to this community') }
-
- ) : ( - -
- -
-
{ _t('Add rooms to this community') }
-
- ); - } - const classes = classNames("mx_RightPanel", "mx_fadable", { "collapsed": this.props.collapsed, "mx_fadable_faded": this.props.disabled, diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index 38c679a5b5..411ed138d4 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -19,6 +19,9 @@ import { _t } from '../../../languageHandler'; import sdk from '../../../index'; import GroupStore from '../../../stores/GroupStore'; import PropTypes from 'prop-types'; +import { showGroupInviteDialog } from '../../../GroupAddressPicker'; +import AccessibleButton from '../elements/AccessibleButton'; +import TintableSvg from '../elements/TintableSvg'; const INITIAL_LOAD_NUM_MEMBERS = 30; @@ -135,6 +138,16 @@ export default React.createClass({ ; }, + onInviteToGroupButtonClick() { + showGroupInviteDialog(this.props.groupId).then(() => { + dis.dispatch({ + action: 'view_right_panel_phase', + phase: RightPanel.Phase.GroupMemberList, + groupId: this.props.groupId, + }); + }); + }, + render: function() { const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper"); if (this.state.fetching || this.state.fetchingInvitedMembers) { @@ -162,13 +175,27 @@ export default React.createClass({ { this.makeGroupMemberTiles(this.state.searchQuery, this.state.invitedMembers) }
:
; + let inviteButton; + if (GroupStore.isUserPrivileged(this.props.groupId)) { + inviteButton = ( +
+ +
+
{ _t('Invite to this community') }
+
); + } + return ( + + +
- { inputBox } + { inviteButton } { joined } { invited } + { inputBox }
); }, diff --git a/src/components/views/groups/GroupRoomList.js b/src/components/views/groups/GroupRoomList.js index cfd2b806d4..968e10eb61 100644 --- a/src/components/views/groups/GroupRoomList.js +++ b/src/components/views/groups/GroupRoomList.js @@ -18,6 +18,9 @@ import { _t } from '../../../languageHandler'; import sdk from '../../../index'; import GroupStore from '../../../stores/GroupStore'; import PropTypes from 'prop-types'; +import { showGroupAddRoomDialog } from '../../../GroupAddressPicker'; +import AccessibleButton from '../elements/AccessibleButton'; +import TintableSvg from '../elements/TintableSvg'; const INITIAL_LOAD_NUM_ROOMS = 30; @@ -90,6 +93,12 @@ export default React.createClass({ this.setState({ searchQuery: ev.target.value }); }, + onAddRoomToGroupButtonClick() { + showGroupAddRoomDialog(this.props.groupId).then(() => { + this.forceUpdate(); + }); + }, + makeGroupRoomTiles: function(query) { const GroupRoomTile = sdk.getComponent("groups.GroupRoomTile"); query = (query || "").toLowerCase(); @@ -120,6 +129,15 @@ export default React.createClass({ return null; } + let inviteButton; + if (GroupStore.isUserPrivileged(this.props.groupId)) { + inviteButton = ( +
+ +
+
{ _t('Add rooms to this community') }
+
); + } const inputBox = (
- { inputBox } + { inviteButton } { this.makeGroupRoomTiles(this.state.searchQuery) } + { inputBox }
); }, From cc97b4690890bbbc344556c4fc316cac98f2b1ee Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 17:44:45 +0100 Subject: [PATCH 09/17] fix group room tiles layout --- res/css/views/groups/_GroupRoomList.scss | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/res/css/views/groups/_GroupRoomList.scss b/res/css/views/groups/_GroupRoomList.scss index fb41ebaa9e..20c003c1f6 100644 --- a/res/css/views/groups/_GroupRoomList.scss +++ b/res/css/views/groups/_GroupRoomList.scss @@ -18,4 +18,12 @@ limitations under the License. position: relative; color: $primary-fg-color; cursor: pointer; + display: flex; + align-items: center; +} + +.mx_GroupRoomList_wrapper { + padding: 10px; +} + } From 397e44b7ba8721478f9bad937e6676c7aeb0ec23 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 17:45:30 +0100 Subject: [PATCH 10/17] fix query field width --- src/components/views/groups/GroupMemberList.js | 8 +++----- src/components/views/groups/GroupRoomList.js | 8 +++----- 2 files changed, 6 insertions(+), 10 deletions(-) diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index 411ed138d4..eb1412afd7 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -158,11 +158,9 @@ export default React.createClass({ } const inputBox = ( - - - + ); const joined = this.state.members ?
diff --git a/src/components/views/groups/GroupRoomList.js b/src/components/views/groups/GroupRoomList.js index 968e10eb61..815f90c43d 100644 --- a/src/components/views/groups/GroupRoomList.js +++ b/src/components/views/groups/GroupRoomList.js @@ -139,11 +139,9 @@ export default React.createClass({ ); } const inputBox = ( -
- -
+ ); const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper"); From ccf65d5f3cd1c6a9216a983385658e2d3bf1bfdf Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 17:45:47 +0100 Subject: [PATCH 11/17] remove background from group room list header button --- res/img/icons-room-nobg.svg | 28 +++++++++++++++++++ .../views/right_panel/GroupHeaderButtons.js | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 res/img/icons-room-nobg.svg diff --git a/res/img/icons-room-nobg.svg b/res/img/icons-room-nobg.svg new file mode 100644 index 0000000000..8ca7ab272b --- /dev/null +++ b/res/img/icons-room-nobg.svg @@ -0,0 +1,28 @@ + +image/svg+xml + + + + + + + \ No newline at end of file diff --git a/src/components/views/right_panel/GroupHeaderButtons.js b/src/components/views/right_panel/GroupHeaderButtons.js index cdbf027d57..388059a88c 100644 --- a/src/components/views/right_panel/GroupHeaderButtons.js +++ b/src/components/views/right_panel/GroupHeaderButtons.js @@ -71,7 +71,7 @@ export default class GroupHeaderButtons extends HeaderButtons { clickPhase={RightPanel.Phase.GroupMemberList} analytics={['Right Panel', 'Group Member List Button', 'click']} />, - Date: Mon, 10 Dec 2018 17:46:22 +0100 Subject: [PATCH 12/17] fix invite button layout --- res/css/views/rooms/_MemberList.scss | 54 +++++++++++-------- .../views/groups/GroupMemberList.js | 2 +- src/components/views/groups/GroupRoomList.js | 2 +- 3 files changed, 33 insertions(+), 25 deletions(-) diff --git a/res/css/views/rooms/_MemberList.scss b/res/css/views/rooms/_MemberList.scss index e21bc22f2e..2695ebcf31 100644 --- a/res/css/views/rooms/_MemberList.scss +++ b/res/css/views/rooms/_MemberList.scss @@ -20,10 +20,21 @@ limitations under the License. flex: 1; display: flex; flex-direction: column; -} -.mx_MemberList .mx_Spinner { - flex: 1 0 auto; + .mx_Spinner { + flex: 1 0 auto; + } + + h2 { + text-transform: uppercase; + color: $h3-color; + font-weight: 600; + font-size: 13px; + padding-left: 3px; + padding-right: 12px; + margin-top: 8px; + margin-bottom: 4px; + } } .mx_MemberList_chevron { @@ -45,23 +56,15 @@ limitations under the License. flex: 1 1 0; } -.mx_MemberList h2, .mx_GroupMemberList h2 { - text-transform: uppercase; - color: $h3-color; - font-weight: 600; - font-size: 13px; - padding-left: 3px; - padding-right: 12px; - margin-top: 8px; - margin-bottom: 4px; -} + .mx_MemberList_wrapper { padding: 10px; } -.mx_MemberList_invite { +.mx_MemberList_invite, +.mx_RightPanel_invite { flex: 0 0 auto; position: relative; background-color: $button-bg-color; @@ -69,15 +72,20 @@ limitations under the License. padding: 8px; margin: 9px; display: flex; + color: $button-fg-color; + font-weight: 600; - span { - margin: 0 auto; - background-image: url('../../img/icon-invite-people.svg'); - background-repeat: no-repeat; - background-position: center left; - padding-left: 25px; - - font-weight: 600; - color: $button-fg-color; + .mx_RightPanel_icon { + padding-right: 5px; + padding-top: 2px; } } + +.mx_MemberList_invite span { + margin: 0 auto; + background-image: url('../../img/icon-invite-people.svg'); + background-repeat: no-repeat; + background-position: center left; + padding-left: 25px; + +} diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index eb1412afd7..3ca4b0ad26 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -177,7 +177,7 @@ export default React.createClass({ if (GroupStore.isUserPrivileged(this.props.groupId)) { inviteButton = (
- +
{ _t('Invite to this community') }
); diff --git a/src/components/views/groups/GroupRoomList.js b/src/components/views/groups/GroupRoomList.js index 815f90c43d..e62752267a 100644 --- a/src/components/views/groups/GroupRoomList.js +++ b/src/components/views/groups/GroupRoomList.js @@ -133,7 +133,7 @@ export default React.createClass({ if (GroupStore.isUserPrivileged(this.props.groupId)) { inviteButton = (
- +
{ _t('Add rooms to this community') }
); From 6488b01324f7f399924a646572b5f6d4b6e318d3 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 17:48:11 +0100 Subject: [PATCH 13/17] fix mergo-error --- res/css/views/groups/_GroupRoomList.scss | 2 -- 1 file changed, 2 deletions(-) diff --git a/res/css/views/groups/_GroupRoomList.scss b/res/css/views/groups/_GroupRoomList.scss index 20c003c1f6..fefd17849c 100644 --- a/res/css/views/groups/_GroupRoomList.scss +++ b/res/css/views/groups/_GroupRoomList.scss @@ -25,5 +25,3 @@ limitations under the License. .mx_GroupRoomList_wrapper { padding: 10px; } - -} From a8f9a74920257cb3ae8b240df9b2aa7907e0ea70 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Mon, 10 Dec 2018 17:55:30 +0100 Subject: [PATCH 14/17] make mygroups look slightly more in line with redesign --- res/css/structures/_MyGroups.scss | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/res/css/structures/_MyGroups.scss b/res/css/structures/_MyGroups.scss index b6c82aa366..f9433909a5 100644 --- a/res/css/structures/_MyGroups.scss +++ b/res/css/structures/_MyGroups.scss @@ -15,10 +15,6 @@ limitations under the License. */ .mx_MyGroups { - max-width: 960px; - margin-left: auto; - margin-right: auto; - display: flex; flex-direction: column; } @@ -34,6 +30,11 @@ limitations under the License. flex-wrap: wrap; } +.mx_MyGroups > :not(.mx_RoomHeader) { + max-width: 960px; + margin: 40px; +} + .mx_MyGroups_headerCard { flex: 1 0 50%; margin-bottom: 30px; @@ -43,6 +44,7 @@ limitations under the License. } .mx_MyGroups_headerCard .mx_MyGroups_headerCard_button { + flex: 0 0 auto; margin-right: 13px; height: 40px; width: 40px; From 3040f2d2e2adfe4ff7b7ad7a6159288f382458d4 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 11 Dec 2018 10:51:14 +0100 Subject: [PATCH 15/17] remove try/catch as the error is already prevented inside resize --- src/components/views/rooms/RoomList.js | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/components/views/rooms/RoomList.js b/src/components/views/rooms/RoomList.js index 3ff3ce694a..9e766bdc15 100644 --- a/src/components/views/rooms/RoomList.js +++ b/src/components/views/rooms/RoomList.js @@ -166,9 +166,7 @@ module.exports = React.createClass({ Object.entries(this.subListSizes).forEach(([id, size]) => { const handle = this.resizer.forHandleWithId(id); if (handle) { - try { - handle.resize(size); - } catch(_e) {} + handle.resize(size); } }); From 02367742bcff6cdd10afe738c4d233322592579d Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 11 Dec 2018 10:54:36 +0100 Subject: [PATCH 16/17] bring back autocomplete attribute --- src/components/views/groups/GroupMemberList.js | 2 +- src/components/views/groups/GroupRoomList.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index 3ca4b0ad26..a71fbe2540 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -160,7 +160,7 @@ export default React.createClass({ const inputBox = ( + placeholder={_t('Filter community members')} autoComplete="off" /> ); const joined = this.state.members ?
diff --git a/src/components/views/groups/GroupRoomList.js b/src/components/views/groups/GroupRoomList.js index e62752267a..4329410092 100644 --- a/src/components/views/groups/GroupRoomList.js +++ b/src/components/views/groups/GroupRoomList.js @@ -141,7 +141,7 @@ export default React.createClass({ const inputBox = ( + placeholder={_t('Filter community rooms')} autoComplete="off" /> ); const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper"); From 84044fca1cc50342be75dad7b0bba666cb5ee9c0 Mon Sep 17 00:00:00 2001 From: Bruno Windels Date: Tue, 11 Dec 2018 11:09:11 +0100 Subject: [PATCH 17/17] fix lint --- src/components/structures/MainSplit.js | 1 - src/components/structures/MyGroups.js | 1 - src/components/structures/RightPanel.js | 10 ---------- src/components/views/groups/GroupMemberList.js | 11 +++++++---- src/components/views/groups/GroupRoomList.js | 9 +++++++-- .../views/right_panel/GroupHeaderButtons.js | 1 - src/components/views/right_panel/HeaderButtons.js | 1 - src/components/views/right_panel/RoomHeaderButtons.js | 1 - 8 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/components/structures/MainSplit.js b/src/components/structures/MainSplit.js index ea3a97e161..6fd0274f1a 100644 --- a/src/components/structures/MainSplit.js +++ b/src/components/structures/MainSplit.js @@ -19,7 +19,6 @@ import ResizeHandle from '../views/elements/ResizeHandle'; import {Resizer, FixedDistributor} from '../../resizer'; export default class MainSplit extends React.Component { - constructor(props) { super(props); this._setResizeContainerRef = this._setResizeContainerRef.bind(this); diff --git a/src/components/structures/MyGroups.js b/src/components/structures/MyGroups.js index 3ad1a00361..c5bf74d561 100644 --- a/src/components/structures/MyGroups.js +++ b/src/components/structures/MyGroups.js @@ -60,7 +60,6 @@ export default withMatrixClient(React.createClass({ render: function() { const Loader = sdk.getComponent("elements.Spinner"); const SimpleRoomHeader = sdk.getComponent('rooms.SimpleRoomHeader'); - const TintableSvg = sdk.getComponent("elements.TintableSvg"); const GroupTile = sdk.getComponent("groups.GroupTile"); const GeminiScrollbarWrapper = sdk.getComponent("elements.GeminiScrollbarWrapper"); diff --git a/src/components/structures/RightPanel.js b/src/components/structures/RightPanel.js index 3687764712..be40957673 100644 --- a/src/components/structures/RightPanel.js +++ b/src/components/structures/RightPanel.js @@ -20,17 +20,14 @@ limitations under the License. import React from 'react'; import PropTypes from 'prop-types'; import classNames from 'classnames'; -import { _t } from '../../languageHandler'; import sdk from '../../index'; import dis from '../../dispatcher'; import { MatrixClient } from 'matrix-js-sdk'; import RateLimitedFunc from '../../ratelimitedfunc'; -import AccessibleButton from '../../components/views/elements/AccessibleButton'; import { showGroupInviteDialog, showGroupAddRoomDialog } from '../../GroupAddressPicker'; import GroupStore from '../../stores/GroupStore'; export default class RightPanel extends React.Component { - static get propTypes() { return { roomId: React.PropTypes.string, // if showing panels for a given room, this is set @@ -159,13 +156,6 @@ export default class RightPanel extends React.Component { const GroupRoomList = sdk.getComponent('groups.GroupRoomList'); const GroupRoomInfo = sdk.getComponent('groups.GroupRoomInfo'); - const TintableSvg = sdk.getComponent("elements.TintableSvg"); - - const isPhaseGroup = [ - RightPanel.Phase.GroupMemberInfo, - RightPanel.Phase.GroupMemberList, - ].includes(this.state.phase); - let panel =
; if (this.props.roomId && this.state.phase === RightPanel.Phase.RoomMemberList) { diff --git a/src/components/views/groups/GroupMemberList.js b/src/components/views/groups/GroupMemberList.js index a71fbe2540..46653f1599 100644 --- a/src/components/views/groups/GroupMemberList.js +++ b/src/components/views/groups/GroupMemberList.js @@ -17,11 +17,13 @@ limitations under the License. import React from 'react'; import { _t } from '../../../languageHandler'; import sdk from '../../../index'; +import dis from '../../../dispatcher'; import GroupStore from '../../../stores/GroupStore'; import PropTypes from 'prop-types'; import { showGroupInviteDialog } from '../../../GroupAddressPicker'; import AccessibleButton from '../elements/AccessibleButton'; import TintableSvg from '../elements/TintableSvg'; +import RightPanel from '../../structures/RightPanel'; const INITIAL_LOAD_NUM_MEMBERS = 30; @@ -175,7 +177,11 @@ export default React.createClass({ let inviteButton; if (GroupStore.isUserPrivileged(this.props.groupId)) { - inviteButton = ( + inviteButton = ( +
@@ -184,9 +190,6 @@ export default React.createClass({ } return ( - - -
{ inviteButton } diff --git a/src/components/views/groups/GroupRoomList.js b/src/components/views/groups/GroupRoomList.js index 4329410092..81fcfa8c8b 100644 --- a/src/components/views/groups/GroupRoomList.js +++ b/src/components/views/groups/GroupRoomList.js @@ -131,12 +131,17 @@ export default React.createClass({ let inviteButton; if (GroupStore.isUserPrivileged(this.props.groupId)) { - inviteButton = ( + inviteButton = ( +
{ _t('Add rooms to this community') }
-
); +
+ ); } const inputBox = (