Skip to content

Commit 0ef03c5

Browse files
committed
Merge pull request element-hq#653 from vector-im/matthew/roomsettings2
Finish off RoomSettings (part 2)
2 parents 5a1b0a1 + 40d2018 commit 0ef03c5

12 files changed

Lines changed: 239 additions & 68 deletions

File tree

‎src/components/structures/BottomLeftMenu.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ module.exports = React.createClass({
5050
return (
5151
<div className="mx_BottomLeftMenu">
5252
<div className="mx_BottomLeftMenu_options">
53-
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/create-big.svg" label="Create new room" onClick={ this.onCreateRoomClick }/>
53+
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/create-big.svg" label="Start chat" onClick={ this.onCreateRoomClick }/>
5454
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/directory-big.svg" label="Directory" onClick={ this.onRoomDirectoryClick }/>
5555
<BottomLeftMenuTile collapsed={ this.props.collapsed } img="img/settings-big.svg" label="Settings" onClick={ this.onSettingsClick }/>
5656
</div>

‎src/skins/vector/css/common.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ a:visited {
5252
color: #76cfa6;
5353
}
5454

55-
input[type=text]:focus, textarea:focus, .mx_RoomSettings textarea:focus {
55+
input[type=text]:focus, textarea:focus {
5656
border: 1px solid #76CFA6;
5757
outline: none;
5858
box-shadow: none;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ limitations under the License.
4444
min-width: 0px;
4545
max-width: 960px;
4646
width: 100%;
47-
font-size: 20px;
47+
font-size: 18px;
4848
text-align: center;
4949

5050
pointer-events: none;

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

Lines changed: 49 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,38 @@ limitations under the License.
1818
width: 960px;
1919
margin-left: auto;
2020
margin-right: auto;
21-
overflow-y: auto;
21+
22+
display: -webkit-box;
23+
display: -moz-box;
24+
display: -ms-flexbox;
25+
display: -webkit-flex;
26+
display: flex;
27+
flex-direction: column;
28+
-webkit-flex-direction: column;
29+
}
30+
31+
.mx_UserSettings .mx_RoomHeader {
32+
-webkit-box-ordinal-group: 1;
33+
-moz-box-ordinal-group: 1;
34+
-ms-flex-order: 1;
35+
-webkit-order: 1;
36+
order: 1;
37+
38+
-webkit-flex: 0 0 83px;
39+
flex: 0 0 83px;
40+
}
41+
42+
.mx_UserSettings_body {
43+
-webkit-box-ordinal-group: 2;
44+
-moz-box-ordinal-group: 2;
45+
-ms-flex-order: 2;
46+
-webkit-order: 2;
47+
order: 2;
48+
49+
-webkit-flex: 1 1 0;
50+
flex: 1 1 0;
51+
52+
overflow-y: auto;
2253
}
2354

2455
.mx_UserSettings_spinner {
@@ -33,7 +64,6 @@ limitations under the License.
3364
display: inline;
3465
vertical-align: middle;
3566
border: 0px;
36-
height: 36px;
3767
border-radius: 36px;
3868
font-weight: 400;
3969
font-size: 16px;
@@ -97,6 +127,7 @@ limitations under the License.
97127
.mx_UserSettings_profileInputCell input,
98128
.mx_UserSettings_profileInputCell .mx_EditableText
99129
{
130+
display: inline-block;
100131
border: 0px;
101132
border-bottom: 1px solid rgba(151, 151, 151, 0.5);
102133
padding: 0px;
@@ -106,6 +137,10 @@ limitations under the License.
106137
font-size: 16px;
107138
}
108139

140+
.mx_UserSettings_profileInputCell .mx_EditableText_placeholder {
141+
color: rgba(74, 74, 74, 0.5);
142+
}
143+
109144
.mx_UserSettings_notifInputCell {
110145
display: table-cell;
111146
padding-bottom: 21px;
@@ -121,37 +156,27 @@ limitations under the License.
121156
}
122157

123158
.mx_UserSettings_logout {
124-
margin-right: 24px;
125-
margin-bottom: 24px;
126-
margin-left: 63px;
159+
float: right;
160+
margin-right: 32px;
161+
margin-left: 32px;
127162
}
128163

129164
.mx_UserSettings_avatarPicker {
130-
width: 320px;
165+
margin-left: 32px;
166+
margin-right: 32px;
131167
float: right;
168+
cursor: pointer;
169+
}
170+
171+
.mx_UserSettings_avatarPicker .mx_RoomAvatar {
172+
border-radius: 40px;
132173
}
133174

134175
.mx_UserSettings_avatarPicker_edit {
135-
position: relative;
136-
left: 50%;
137-
display: inline-block;
176+
text-align: center;
138177
margin-top: 10px;
139178
}
140179

141-
.mx_UserSettings_avatarPicker_edit > input{
180+
.mx_UserSettings_avatarPicker_edit > input {
142181
display: none;
143182
}
144-
145-
.mx_UserSettings_avatarPicker_edit > label {
146-
cursor: pointer;
147-
}
148-
149-
.mx_UserSettings_avatarPicker_img {
150-
margin: 0 auto;
151-
width: 75%;
152-
}
153-
154-
.mx_UserSettings_avatarPicker_img > img {
155-
display: block;
156-
margin: 0 auto;
157-
}

‎src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ limitations under the License.
8989
}
9090

9191
.mx_EventTile_content .markdown-body .hljs {
92-
display: inherit ! important;
92+
display: inline ! important;
9393
}
9494

9595
/* end of overrides */

‎src/skins/vector/css/matrix-react-sdk/views/rooms/RoomHeader.css‎

Lines changed: 67 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,10 @@ See the License for the specific language governing permissions and
1414
limitations under the License.
1515
*/
1616

17-
.mx_RoomHeader {
17+
/* add 20px to the height of the header when editing */
18+
.mx_RoomHeader_editing {
19+
-webit-flex: 0 0 103px ! important;
20+
flex: 0 0 103px ! important;
1821
}
1922

2023
.mx_RoomHeader_wrapper {
@@ -33,6 +36,10 @@ limitations under the License.
3336
display: flex;
3437
}
3538

39+
.mx_RoomHeader_editing .mx_RoomHeader_wrapper {
40+
border-bottom: 1px solid transparent;
41+
}
42+
3643
.mx_RoomHeader_leftRow {
3744
margin-left: -2px;
3845

@@ -47,12 +54,13 @@ limitations under the License.
4754
}
4855

4956
.mx_RoomHeader_textButton {
50-
height: 48px;
57+
height: 36px;
5158
background-color: #76cfa6;
52-
border-radius: 48px;
59+
border-radius: 36px;
5360
margin-right: 8px;
5461
color: #fff;
55-
line-height: 48px;
62+
line-height: 34px;
63+
margin-top: -2px;
5664
text-align: center;
5765

5866
-webkit-box-ordinal-group: 2;
@@ -69,7 +77,20 @@ limitations under the License.
6977
*/
7078
padding-left: 12px;
7179
padding-right: 12px;
72-
}
80+
}
81+
82+
.mx_RoomHeader_cancelButton {
83+
-webkit-box-ordinal-group: 2;
84+
-moz-box-ordinal-group: 2;
85+
-ms-flex-order: 2;
86+
-webkit-order: 2;
87+
order: 2;
88+
89+
cursor: pointer;
90+
91+
padding-left: 12px;
92+
padding-right: 12px;
93+
}
7394

7495
.mx_RoomHeader_rightRow {
7596
margin-top: 4px;
@@ -84,7 +105,7 @@ limitations under the License.
84105

85106
.mx_RoomHeader_info {
86107
display: table-cell;
87-
/* height: 48px; */
108+
width: 100%;
88109
vertical-align: middle;
89110
}
90111

@@ -107,9 +128,9 @@ limitations under the License.
107128
}
108129

109130
.mx_RoomHeader_name {
110-
cursor: pointer;
111131
vertical-align: middle;
112-
height: 30px;
132+
width: 100%;
133+
height: 31px;
113134
overflow: hidden;
114135
color: #454545;
115136
font-weight: bold;
@@ -118,6 +139,7 @@ limitations under the License.
118139
padding-right: 16px;
119140
/* why isn't text-overflow working? */
120141
text-overflow: ellipsis;
142+
border-bottom: 1px solid transparent;
121143
}
122144

123145
.mx_RoomHeader_nametext {
@@ -142,11 +164,18 @@ limitations under the License.
142164
pointer-events: none;
143165
}
144166

145-
.mx_RoomHeader_leftRow:hover .mx_RoomHeader_name {
167+
.mx_RoomHeader_name,
168+
.mx_RoomHeader_avatar,
169+
.mx_RoomHeader_avatarPicker,
170+
.mx_RoomHeader_avatarPicker_edit {
171+
cursor: pointer;
172+
}
173+
174+
.mx_RoomHeader_name:hover div:not(.mx_RoomHeader_editable) {
146175
color: #76cfa6;
147176
}
148177

149-
.mx_RoomHeader_leftRow:hover .mx_RoomHeader_settingsButton {
178+
.mx_RoomHeader_name:hover .mx_RoomHeader_settingsButton {
150179
visibility: visible;
151180
}
152181

@@ -159,24 +188,20 @@ limitations under the License.
159188
visibility: visible;
160189
}
161190

162-
163-
.mx_RoomHeader_nameEditing {
164-
padding-left: 8px;
165-
padding-right: 16px;
166-
margin-top: -5px;
191+
.mx_RoomHeader_placeholder {
192+
color: #a2a2a2 ! important;
167193
}
168194

169-
.mx_RoomHeader_name input, .mx_RoomHeader_nameInput {
170-
border-radius: 3px;
171-
width: 260px;
172-
border: 1px solid #c7c7c7;
173-
font-weight: 300;
174-
font-size: 13px;
175-
padding: 9px;
195+
.mx_RoomHeader_editable {
196+
border-bottom: 1px solid #c7c7c7 ! important;
197+
min-width: 70px;
198+
cursor: text;
176199
}
177200

178-
.mx_RoomHeader_nameInput {
179-
margin-top: 6px;
201+
.mx_RoomHeader_editable:focus {
202+
border-bottom: 1px solid #76CFA6 ! important;
203+
outline: none;
204+
box-shadow: none;
180205
}
181206

182207
.mx_RoomHeader_topic {
@@ -185,10 +210,11 @@ limitations under the License.
185210
max-height: 42px;
186211
color: #454545;
187212
font-weight: 300;
188-
padding-left: 19px;
189-
padding-right: 16px;
213+
margin-left: 19px;
214+
margin-right: 16px;
190215
overflow: hidden;
191216
text-overflow: ellipsis;
217+
border-bottom: 1px solid transparent;
192218
}
193219

194220
.mx_RoomHeader_avatar {
@@ -198,10 +224,24 @@ limitations under the License.
198224
vertical-align: middle;
199225
}
200226

201-
.mx_RoomHeader_avatar img {
227+
.mx_RoomHeader_avatar .mx_RoomAvatar {
202228
border-radius: 24px;
203229
}
204230

231+
.mx_RoomHeader_avatarPicker_edit {
232+
position: absolute;
233+
margin-left: 16px;
234+
margin-top: 4px;
235+
}
236+
237+
.mx_RoomHeader_avatarPicker_edit > label {
238+
cursor: pointer;
239+
}
240+
241+
.mx_RoomHeader_avatarPicker_edit > input {
242+
display: none;
243+
}
244+
205245
.mx_RoomHeader_button {
206246
display: table-cell;
207247
vertical-align: top;

0 commit comments

Comments
 (0)