Skip to content

Commit 1d1f89e

Browse files
authored
Merge pull request element-hq#1987 from vector-im/wmwragg/chat-message-presentation
Wmwragg/chat message presentation
2 parents 9b5e5c9 + e9eafc3 commit 1d1f89e

27 files changed

Lines changed: 292 additions & 163 deletions

‎src/components/views/messages/MessageTimestamp.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ module.exports = React.createClass({
2626
var date = new Date(this.props.ts);
2727
return (
2828
<span className="mx_MessageTimestamp">
29-
{ DateUtils.formatDate(date) }
29+
{ DateUtils.formatTime(date) }
3030
</span>
3131
);
3232
},

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ limitations under the License.
109109
-webkit-order: 2;
110110
order: 2;
111111

112-
padding-left: 25px;
112+
padding-left: 20px;
113113
padding-right: 22px;
114114
background-color: #fff;
115115

‎src/skins/vector/css/matrix-react-sdk/views/messages/MImageBody.css‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ limitations under the License.
1616

1717
.mx_MImageBody {
1818
display: block;
19+
margin-right: 34px;
1920
}
2021

2122
.mx_MImageBody_thumbnail {

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

Lines changed: 115 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,25 @@ limitations under the License.
1717
.mx_EventTile {
1818
max-width: 100%;
1919
clear: both;
20-
padding-top: 24px;
21-
margin-left: 65px;
20+
padding-top: 18px;
21+
font-size: 14px;
22+
position: relative;
23+
}
24+
25+
.mx_EventTile.mx_EventTile_info {
26+
padding-top: 0px;
2227
}
2328

2429
.mx_EventTile_avatar {
25-
padding-left: 18px;
26-
padding-right: 12px;
27-
margin-left: -73px;
28-
margin-top: -2px;
29-
float: left;
30-
position: relative;
31-
top: 0px;
30+
position: absolute;
31+
top: 14px;
32+
left: 8px;
3233
cursor: pointer;
34+
z-index: 2;
3335
}
3436

3537
.mx_EventTile_continuation {
36-
padding-top: 8px ! important;
38+
padding-top: 0px ! important;
3739
}
3840

3941
.mx_EventTile_verified {
@@ -47,79 +49,38 @@ limitations under the License.
4749
.mx_EventTile .mx_SenderProfile {
4850
color: #454545;
4951
opacity: 0.5;
50-
display: inline-block;
51-
font-size: 13px;
52+
font-size: 14px;
5253
overflow-y: hidden;
5354
cursor: pointer;
55+
padding-left: 65px; /* left gutter */
56+
padding-bottom: 0px;
57+
padding-top: 0px;
58+
margin: 0px;
59+
line-height: 22px;
5460
}
5561

5662
.mx_EventTile .mx_MessageTimestamp {
63+
display: block;
64+
visibility: hidden;
65+
white-space: nowrap;
5766
color: #acacac;
5867
font-size: 11px;
68+
left: 8px;
69+
position: absolute;
5970
}
6071

6172
.mx_EventTile_line {
6273
position: relative;
6374
/* ideally should be 100px, but 95px gives us a max thumbnail size of 800x600, which is nice */
64-
margin-right: 95px;
65-
}
66-
67-
/* all the overflow-y: hidden; are to trap Zalgos -
68-
but they introduce an implicit overflow-x: auto.
69-
so make that explicitly hidden too to avoid random
70-
horizontal scrollbars occasionally appearing, like in
71-
https://github.com/vector-im/vector-web/issues/1154
72-
*/
73-
.mx_EventTile_content {
74-
display: block;
75-
overflow-y: hidden;
76-
overflow-x: hidden;
77-
}
78-
79-
/* De-zalgoing */
80-
.mx_EventTile_body {
81-
overflow-y: hidden;
82-
}
83-
84-
/* Various markdown overrides */
85-
86-
.mx_EventTile_content .markdown-body {
87-
font-family: inherit ! important;
88-
white-space: normal ! important;
89-
line-height: inherit ! important;
90-
color: inherit;
91-
font-size: 15px;
92-
}
93-
94-
/* have to use overlay rather than auto otherwise Linux and Windows
95-
Chrome gets very confused about vertical spacing:
96-
https://github.com/vector-im/vector-web/issues/754
97-
*/
98-
.mx_EventTile_content .markdown-body pre {
99-
overflow-x: overlay;
100-
overflow-y: visible;
75+
margin-right: 110px;
76+
padding-left: 65px; /* left gutter */
77+
padding-top: 4px;
78+
padding-bottom: 2px;
79+
border-radius: 4px;
80+
min-height: 24px;
81+
line-height: 22px;
10182
}
10283

103-
.mx_EventTile_content .markdown-body h1,
104-
.mx_EventTile_content .markdown-body h2,
105-
.mx_EventTile_content .markdown-body h3,
106-
.mx_EventTile_content .markdown-body h4,
107-
.mx_EventTile_content .markdown-body h5,
108-
.mx_EventTile_content .markdown-body h6
109-
{
110-
font-family: inherit ! important;
111-
}
112-
113-
.mx_EventTile_content .markdown-body a {
114-
color: #76cfa6;
115-
}
116-
117-
.mx_EventTile_content .markdown-body .hljs {
118-
display: inline ! important;
119-
}
120-
121-
/* end of overrides */
122-
12384
/* HACK to override line-height which is already marked important elsewhere */
12485
.mx_EventTile_bigEmoji.mx_EventTile_bigEmoji {
12586
font-size: 48px ! important;
@@ -129,10 +90,16 @@ limitations under the License.
12990
/* this is used for the tile for the event which is selected via the URL.
13091
* TODO: ultimately we probably want some transition on here.
13192
*/
132-
.mx_EventTile_selected {
93+
.mx_EventTile_selected .mx_EventTile_line {
13394
border-left: #76cfa6 5px solid;
134-
margin-left: 53px;
135-
padding-left: 7px;
95+
padding-left: 60px;
96+
background-color: #f7f7f7;
97+
}
98+
99+
.mx_EventTile:hover .mx_EventTile_line,
100+
.mx_EventTile.menu .mx_EventTile_line
101+
{
102+
background-color: #f7f7f7;
136103
}
137104

138105
.mx_EventTile_searchHighlight {
@@ -181,32 +148,29 @@ limitations under the License.
181148
text-decoration: none;
182149
}
183150

184-
.mx_EventTile .mx_MessageTimestamp {
185-
display: block;
186-
visibility: hidden;
187-
text-align: right;
188-
white-space: nowrap;
189-
}
190-
191-
.mx_EventTile_last .mx_MessageTimestamp {
151+
.mx_EventTile_last .mx_MessageTimestamp,
152+
.mx_EventTile:hover .mx_MessageTimestamp,
153+
.mx_EventTile.menu .mx_MessageTimestamp
154+
{
192155
visibility: visible;
193156
}
194157

195-
.mx_EventTile:hover .mx_MessageTimestamp {
196-
visibility: visible;
158+
.mx_EventTile_selected .mx_MessageTimestamp {
159+
left: 3px;
197160
}
198161

199162
.mx_EventTile_editButton {
200163
position: absolute;
201164
display: inline-block;
202165
visibility: hidden;
166+
cursor: pointer;
167+
top: 6px;
168+
right: 6px;
203169
}
204170

205-
.mx_EventTile:hover .mx_EventTile_editButton {
206-
visibility: visible;
207-
}
208-
209-
.mx_EventTile.menu .mx_EventTile_editButton {
171+
.mx_EventTile:hover .mx_EventTile_editButton,
172+
.mx_EventTile.menu .mx_EventTile_editButton
173+
{
210174
visibility: visible;
211175
}
212176

@@ -219,6 +183,13 @@ limitations under the License.
219183
display: inline-block;
220184
width: 14px;
221185
height: 14px;
186+
top: 29px;
187+
}
188+
189+
.mx_EventTile_continuation .mx_EventTile_readAvatars,
190+
.mx_EventTile_info .mx_EventTile_readAvatars
191+
{
192+
top: 7px;
222193
}
223194

224195
.mx_EventTile_readAvatars .mx_BaseAvatar {
@@ -231,3 +202,60 @@ limitations under the License.
231202
font-size: 11px;
232203
position: absolute;
233204
}
205+
206+
/* all the overflow-y: hidden; are to trap Zalgos -
207+
but they introduce an implicit overflow-x: auto.
208+
so make that explicitly hidden too to avoid random
209+
horizontal scrollbars occasionally appearing, like in
210+
https://github.com/vector-im/vector-web/issues/1154
211+
*/
212+
.mx_EventTile_content {
213+
display: block;
214+
overflow-y: hidden;
215+
overflow-x: hidden;
216+
margin-right: 34px;
217+
}
218+
219+
/* De-zalgoing */
220+
.mx_EventTile_body {
221+
overflow-y: hidden;
222+
}
223+
224+
/* Various markdown overrides */
225+
226+
.mx_EventTile_content .markdown-body {
227+
font-family: inherit ! important;
228+
white-space: normal ! important;
229+
line-height: inherit ! important;
230+
color: inherit;
231+
font-size: 14px;
232+
}
233+
234+
/* have to use overlay rather than auto otherwise Linux and Windows
235+
Chrome gets very confused about vertical spacing:
236+
https://github.com/vector-im/vector-web/issues/754
237+
*/
238+
.mx_EventTile_content .markdown-body pre {
239+
overflow-x: overlay;
240+
overflow-y: visible;
241+
}
242+
243+
.mx_EventTile_content .markdown-body h1,
244+
.mx_EventTile_content .markdown-body h2,
245+
.mx_EventTile_content .markdown-body h3,
246+
.mx_EventTile_content .markdown-body h4,
247+
.mx_EventTile_content .markdown-body h5,
248+
.mx_EventTile_content .markdown-body h6
249+
{
250+
font-family: inherit ! important;
251+
}
252+
253+
.mx_EventTile_content .markdown-body a {
254+
color: #76cfa6;
255+
}
256+
257+
.mx_EventTile_content .markdown-body .hljs {
258+
display: inline ! important;
259+
}
260+
261+
/* end of overrides */

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,7 @@ limitations under the License.
6262
display: flex;
6363
align-items: center;
6464
overflow: auto;
65+
font-size: 14px;
6566
}
6667
.mx_MessageComposer_input_rte {
6768
border-top: 2px solid #76cfa6; /* placeholder RTE indicator */
@@ -73,7 +74,6 @@ limitations under the License.
7374

7475
.mx_MessageComposer_input textarea {
7576
display: block;
76-
font-size: 15px;
7777
width: 100%;
7878
padding: 0px;
7979
margin-top: 6px;
@@ -86,6 +86,7 @@ limitations under the License.
8686
box-shadow: none;
8787
color: #454545;
8888
background-color: #fff;
89+
font-size: 14px;
8990

9091
/* needed for FF */
9192
font-family: 'Open Sans', Arial, Helvetica, Sans-Serif;
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
/*
2+
* Open Sans
3+
* Includes extended Latin, Greek, Cyrillic and Vietnamese character sets
4+
*/
5+
6+
@font-face {
7+
font-family: 'Open Sans';
8+
src: url('fonts/Open_Sans/OpenSans-Regular.ttf') format('truetype');
9+
font-weight: 400;
10+
font-style: normal;
11+
}
12+
13+
@font-face {
14+
font-family: 'Open Sans';
15+
src: url('fonts/Open_Sans/OpenSans-Italic.ttf') format('truetype');
16+
font-weight: 400;
17+
font-style: italic;
18+
}
19+
20+
@font-face {
21+
font-family: 'Open Sans';
22+
src: url('fonts/Open_Sans/OpenSans-Semibold.ttf') format('truetype');
23+
font-weight: 600;
24+
font-style: normal;
25+
}
26+
27+
@font-face {
28+
font-family: 'Open Sans';
29+
src: url('fonts/Open_Sans/OpenSans-SemiboldItalic.ttf') format('truetype');
30+
font-weight: 600;
31+
font-style: italic;
32+
}
33+
34+
@font-face {
35+
font-family: 'Open Sans';
36+
src: url('fonts/Open_Sans/OpenSans-Bold.ttf') format('truetype');
37+
font-weight: 700;
38+
font-style: normal;
39+
}
40+
41+
@font-face {
42+
font-family: 'Open Sans';
43+
src: url('fonts/Open_Sans/OpenSans-BoldItalic.ttf') format('truetype');
44+
font-weight: 700;
45+
font-style: italic;
46+
}
47+
48+
/*
49+
* Fira Mono
50+
* Used for monospace copy, i.e. code
51+
*/
52+
53+
@font-face {
54+
font-family: 'Fira Mono';
55+
src: url('fonts/Fira_Mono/FiraMono-Regular.ttf') format('truetype');
56+
font-weight: 400;
57+
font-style: normal;
58+
}
59+
60+
@font-face {
61+
font-family: 'Fira Mono';
62+
src: url('fonts/Fira_Mono/FiraMono-Bold.ttf') format('truetype');
63+
font-weight: 700;
64+
font-style: normal;
65+
}
Binary file not shown.
Binary file not shown.
131 KB
Binary file not shown.
137 KB
Binary file not shown.

0 commit comments

Comments
 (0)