Skip to content

Commit 144cbd1

Browse files
authored
Merge branch 'develop' into travis/more-pinned-css
2 parents 5a1498d + f280fe3 commit 144cbd1

9 files changed

Lines changed: 85 additions & 8 deletions

File tree

‎src/components/structures/RightPanel.js‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -127,8 +127,9 @@ module.exports = React.createClass({
127127
},
128128

129129
_initGroupStore(groupId) {
130+
if (!groupId) return;
130131
this._groupStore = GroupStoreCache.getGroupStore(
131-
this.context.matrixClient, this.props.groupId,
132+
this.context.matrixClient, groupId,
132133
);
133134
this._groupStore.registerListener(this.onGroupStoreUpdated);
134135
},

‎src/components/views/rooms/RoomTooltip.js‎

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,13 +19,16 @@ limitations under the License.
1919
var React = require('react');
2020
var ReactDOM = require('react-dom');
2121
var dis = require('matrix-react-sdk/lib/dispatcher');
22+
import classNames from 'classnames';
2223

2324
module.exports = React.createClass({
2425
displayName: 'RoomTooltip',
2526

2627
propTypes: {
27-
// Alllow the tooltip to be styled by the parent element
28+
// Class applied to the element used to position the tooltip
2829
className: React.PropTypes.string.isRequired,
30+
// Class applied to the tooltip itself
31+
tooltipClassName: React.PropTypes.string,
2932
// The tooltip is derived from either the room name or a label
3033
room: React.PropTypes.object,
3134
label: React.PropTypes.string,
@@ -69,8 +72,12 @@ module.exports = React.createClass({
6972
style.left = 6 + parent.getBoundingClientRect().right + window.pageXOffset;
7073
style.display = "block";
7174

75+
const tooltipClasses = classNames(
76+
"mx_RoomTooltip", this.props.tooltipClassName,
77+
);
78+
7279
var tooltip = (
73-
<div className="mx_RoomTooltip" style={style} >
80+
<div className={tooltipClasses} style={style} >
7481
<div className="mx_RoomTooltip_chevron"></div>
7582
{ label }
7683
</div>

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,7 @@
3535
@import "./matrix-react-sdk/views/elements/_ProgressBar.scss";
3636
@import "./matrix-react-sdk/views/elements/_RichText.scss";
3737
@import "./matrix-react-sdk/views/elements/_RoleButton.scss";
38+
@import "./matrix-react-sdk/views/elements/_ToolTipButton.scss";
3839
@import "./matrix-react-sdk/views/groups/_GroupRoomList.scss";
3940
@import "./matrix-react-sdk/views/login/_InteractiveAuthEntryComponents.scss";
4041
@import "./matrix-react-sdk/views/login/_ServerConfig.scss";

‎src/skins/vector/css/matrix-react-sdk/structures/_GroupView.scss‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -304,6 +304,18 @@ limitations under the License.
304304
}
305305

306306
.mx_GroupView_groupDesc textarea {
307-
width: 50%;
307+
width: 100%;
308+
max-width: 100%;
308309
height: 150px;
309310
}
311+
312+
.mx_GroupView_groupDesc_placeholder {
313+
background-color: $info-plinth-bg-color;
314+
color: $info-plinth-fg-color;
315+
border-radius: 10px;
316+
text-align: center;
317+
318+
cursor: pointer;
319+
padding: 100px 20px;
320+
margin: 20px 0px;
321+
}

‎src/skins/vector/css/matrix-react-sdk/structures/_MyGroups.scss‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,8 +87,8 @@ limitations under the License.
8787
}
8888

8989
.mx_MyGroups_placeholder {
90-
background-color: $group-my-groups-placeholder-bg;
91-
color: $group-my-groups-placeholder-fg;
90+
background-color: $info-plinth-bg-color;
91+
color: $info-plinth-fg-color;
9292
line-height: 400px;
9393
border-radius: 10px;
9494
text-align: center;

‎src/skins/vector/css/matrix-react-sdk/views/elements/_RichText.scss‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@
2626
}
2727

2828
.mx_EventTile_highlight .mx_EventTile_content .markdown-body a.mx_UserPill_me,
29-
.mx_EventTile_content .mx_AtRoomPill {
29+
.mx_EventTile_content .mx_AtRoomPill,
30+
.mx_MessageComposer_input .mx_AtRoomPill {
3031
color: $accent-fg-color;
3132
background-color: $mention-user-pill-bg-color;
3233
padding-right: 5px;
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
/*
2+
Copyright 2017 New Vector 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_ToolTipButton {
18+
display: inline-block;
19+
width: 11px;
20+
height: 11px;
21+
margin-left: 5px;
22+
23+
border: 2px solid $neutral-badge-color;
24+
border-radius: 20px;
25+
color: $neutral-badge-color;
26+
27+
transition: opacity 0.2s ease-in;
28+
opacity: 0.6;
29+
30+
line-height: 11px;
31+
text-align: center;
32+
33+
cursor: pointer;
34+
}
35+
36+
.mx_ToolTipButton:hover {
37+
opacity: 1.0;
38+
}
39+
40+
.mx_ToolTipButton_container {
41+
position: relative;
42+
top: -18px;
43+
left: 4px;
44+
}
45+
46+
.mx_ToolTipButton_helpText {
47+
width: 200px;
48+
text-align: center;
49+
line-height: 17px !important;
50+
}
51+

‎src/skins/vector/css/themes/_base.scss‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,10 @@ $pinned-color: #888;
3030
$group-my-groups-placeholder-bg: #f7f7f7;
3131
$group-my-groups-placeholder-fg: #888;
3232

33+
// informational plinth
34+
$info-plinth-bg-color: #f7f7f7;
35+
$info-plinth-fg-color: #888;
36+
3337
$preview-bar-bg-color: #f7f7f7;
3438

3539
// left-panel style muted accent color

‎src/skins/vector/css/themes/_dark.scss‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $focus-brightness: 200%;
2121
$warning-color: #ff0064;
2222

2323
// groups
24-
$group-my-groups-placeholder-bg: #454545;
24+
$info-plinth-bg-color: #454545;
2525

2626
$other-user-pill-bg-color: rgba(255, 255, 255, 0.1);
2727

0 commit comments

Comments
 (0)