Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Wmwragg/chat message presentation #1987

Merged
merged 23 commits into from
Aug 23, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
2c8e778
Initial reposition of the timestamp
wmwragg Aug 16, 2016
757e885
Initial reposition of the read avatars
wmwragg Aug 16, 2016
650a0f1
Added context button, and initial highlighting and readReceipts posit…
wmwragg Aug 16, 2016
9541808
Updating timestamp format
wmwragg Aug 16, 2016
f0bac3a
Design tweaks
wmwragg Aug 16, 2016
3099ef6
Added linked message styling
wmwragg Aug 16, 2016
9f57015
Altered message composer size to match that of the message timeline m…
wmwragg Aug 16, 2016
012f085
alignment tweaks and persistent highlight when meni clicked, plus men…
wmwragg Aug 16, 2016
08e5f61
Image button now has cursor set to pointer
wmwragg Aug 16, 2016
d164977
Images now slighlty set in so they don't appear under the context but…
wmwragg Aug 16, 2016
67175c5
Positional tweaks, and font standardisation, so all browser now use t…
wmwragg Aug 18, 2016
29759ca
Initial pass at the /me and action messages, without name highlightin…
wmwragg Aug 18, 2016
5005675
Some CSS tidy-up, and fix for readAvatars when the message is not cla…
wmwragg Aug 18, 2016
9e542ba
Alignment adjustment so that the readAvatars sit in the center of the…
wmwragg Aug 19, 2016
173e601
Alignment tweak to the readAvatars
wmwragg Aug 19, 2016
78692c8
Removal of the mini avatars for action (info) messages
wmwragg Aug 19, 2016
85084f5
Fixed spacing on multiline messages
wmwragg Aug 19, 2016
4a2c899
Merge branch 'develop' into wmwragg/chat-message-presentation
wmwragg Aug 19, 2016
dbadb07
Moved the font-size into the .mx_MessageComposer_input so that it set…
wmwragg Aug 19, 2016
bdaa9fa
Added the font-size back in, as the textarea gets overidden otherwise
wmwragg Aug 19, 2016
0b1fc1b
Avatar and Sender Profile alignment, along with reducing the distance…
wmwragg Aug 22, 2016
600a1ca
Read avatars position tweaked, now that the spacing has changed
wmwragg Aug 22, 2016
e9eafc3
Further tweak
wmwragg Aug 22, 2016
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/components/views/messages/MessageTimestamp.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ module.exports = React.createClass({
var date = new Date(this.props.ts);
return (
<span className="mx_MessageTimestamp">
{ DateUtils.formatDate(date) }
{ DateUtils.formatTime(date) }
</span>
);
},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ limitations under the License.
-webkit-order: 2;
order: 2;

padding-left: 25px;
padding-left: 20px;
padding-right: 22px;
background-color: #fff;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

.mx_MImageBody {
display: block;
margin-right: 34px;
}

.mx_MImageBody_thumbnail {
Expand Down
202 changes: 115 additions & 87 deletions src/skins/vector/css/matrix-react-sdk/views/rooms/EventTile.css
Original file line number Diff line number Diff line change
Expand Up @@ -17,23 +17,25 @@ limitations under the License.
.mx_EventTile {
max-width: 100%;
clear: both;
padding-top: 24px;
margin-left: 65px;
padding-top: 18px;
font-size: 14px;
position: relative;
}

.mx_EventTile.mx_EventTile_info {
padding-top: 0px;
}

.mx_EventTile_avatar {
padding-left: 18px;
padding-right: 12px;
margin-left: -73px;
margin-top: -2px;
float: left;
position: relative;
top: 0px;
position: absolute;
top: 14px;
left: 8px;
cursor: pointer;
z-index: 2;
}

.mx_EventTile_continuation {
padding-top: 8px ! important;
padding-top: 0px ! important;
}

.mx_EventTile_verified {
Expand All @@ -47,79 +49,38 @@ limitations under the License.
.mx_EventTile .mx_SenderProfile {
color: #454545;
opacity: 0.5;
display: inline-block;
font-size: 13px;
font-size: 14px;
overflow-y: hidden;
cursor: pointer;
padding-left: 65px; /* left gutter */
padding-bottom: 0px;
padding-top: 0px;
margin: 0px;
line-height: 22px;
}

.mx_EventTile .mx_MessageTimestamp {
display: block;
visibility: hidden;
white-space: nowrap;
color: #acacac;
font-size: 11px;
left: 8px;
position: absolute;
}

.mx_EventTile_line {
position: relative;
/* ideally should be 100px, but 95px gives us a max thumbnail size of 800x600, which is nice */
margin-right: 95px;
}

/* all the overflow-y: hidden; are to trap Zalgos -
but they introduce an implicit overflow-x: auto.
so make that explicitly hidden too to avoid random
horizontal scrollbars occasionally appearing, like in
/~https://github.com/vector-im/vector-web/issues/1154
*/
.mx_EventTile_content {
display: block;
overflow-y: hidden;
overflow-x: hidden;
}

/* De-zalgoing */
.mx_EventTile_body {
overflow-y: hidden;
}

/* Various markdown overrides */

.mx_EventTile_content .markdown-body {
font-family: inherit ! important;
white-space: normal ! important;
line-height: inherit ! important;
color: inherit;
font-size: 15px;
}

/* have to use overlay rather than auto otherwise Linux and Windows
Chrome gets very confused about vertical spacing:
/~https://github.com/vector-im/vector-web/issues/754
*/
.mx_EventTile_content .markdown-body pre {
overflow-x: overlay;
overflow-y: visible;
margin-right: 110px;
padding-left: 65px; /* left gutter */
padding-top: 4px;
padding-bottom: 2px;
border-radius: 4px;
min-height: 24px;
line-height: 22px;
}

.mx_EventTile_content .markdown-body h1,
.mx_EventTile_content .markdown-body h2,
.mx_EventTile_content .markdown-body h3,
.mx_EventTile_content .markdown-body h4,
.mx_EventTile_content .markdown-body h5,
.mx_EventTile_content .markdown-body h6
{
font-family: inherit ! important;
}

.mx_EventTile_content .markdown-body a {
color: #76cfa6;
}

.mx_EventTile_content .markdown-body .hljs {
display: inline ! important;
}

/* end of overrides */

/* HACK to override line-height which is already marked important elsewhere */
.mx_EventTile_bigEmoji.mx_EventTile_bigEmoji {
font-size: 48px ! important;
Expand All @@ -129,10 +90,16 @@ limitations under the License.
/* this is used for the tile for the event which is selected via the URL.
* TODO: ultimately we probably want some transition on here.
*/
.mx_EventTile_selected {
.mx_EventTile_selected .mx_EventTile_line {
border-left: #76cfa6 5px solid;
margin-left: 53px;
padding-left: 7px;
padding-left: 60px;
background-color: #f7f7f7;
}

.mx_EventTile:hover .mx_EventTile_line,
.mx_EventTile.menu .mx_EventTile_line
{
background-color: #f7f7f7;
}

.mx_EventTile_searchHighlight {
Expand Down Expand Up @@ -181,32 +148,29 @@ limitations under the License.
text-decoration: none;
}

.mx_EventTile .mx_MessageTimestamp {
display: block;
visibility: hidden;
text-align: right;
white-space: nowrap;
}

.mx_EventTile_last .mx_MessageTimestamp {
.mx_EventTile_last .mx_MessageTimestamp,
.mx_EventTile:hover .mx_MessageTimestamp,
.mx_EventTile.menu .mx_MessageTimestamp
{
visibility: visible;
}

.mx_EventTile:hover .mx_MessageTimestamp {
visibility: visible;
.mx_EventTile_selected .mx_MessageTimestamp {
left: 3px;
}

.mx_EventTile_editButton {
position: absolute;
display: inline-block;
visibility: hidden;
cursor: pointer;
top: 6px;
right: 6px;
}

.mx_EventTile:hover .mx_EventTile_editButton {
visibility: visible;
}

.mx_EventTile.menu .mx_EventTile_editButton {
.mx_EventTile:hover .mx_EventTile_editButton,
.mx_EventTile.menu .mx_EventTile_editButton
{
visibility: visible;
}

Expand All @@ -219,6 +183,13 @@ limitations under the License.
display: inline-block;
width: 14px;
height: 14px;
top: 29px;
}

.mx_EventTile_continuation .mx_EventTile_readAvatars,
.mx_EventTile_info .mx_EventTile_readAvatars
{
top: 7px;
}

.mx_EventTile_readAvatars .mx_BaseAvatar {
Expand All @@ -231,3 +202,60 @@ limitations under the License.
font-size: 11px;
position: absolute;
}

/* all the overflow-y: hidden; are to trap Zalgos -
but they introduce an implicit overflow-x: auto.
so make that explicitly hidden too to avoid random
horizontal scrollbars occasionally appearing, like in
/~https://github.com/vector-im/vector-web/issues/1154
*/
.mx_EventTile_content {
display: block;
overflow-y: hidden;
overflow-x: hidden;
margin-right: 34px;
}

/* De-zalgoing */
.mx_EventTile_body {
overflow-y: hidden;
}

/* Various markdown overrides */

.mx_EventTile_content .markdown-body {
font-family: inherit ! important;
white-space: normal ! important;
line-height: inherit ! important;
color: inherit;
font-size: 14px;
}

/* have to use overlay rather than auto otherwise Linux and Windows
Chrome gets very confused about vertical spacing:
/~https://github.com/vector-im/vector-web/issues/754
*/
.mx_EventTile_content .markdown-body pre {
overflow-x: overlay;
overflow-y: visible;
}

.mx_EventTile_content .markdown-body h1,
.mx_EventTile_content .markdown-body h2,
.mx_EventTile_content .markdown-body h3,
.mx_EventTile_content .markdown-body h4,
.mx_EventTile_content .markdown-body h5,
.mx_EventTile_content .markdown-body h6
{
font-family: inherit ! important;
}

.mx_EventTile_content .markdown-body a {
color: #76cfa6;
}

.mx_EventTile_content .markdown-body .hljs {
display: inline ! important;
}

/* end of overrides */
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ limitations under the License.
display: flex;
align-items: center;
overflow: auto;
font-size: 14px;
}
.mx_MessageComposer_input_rte {
border-top: 2px solid #76cfa6; /* placeholder RTE indicator */
Expand All @@ -73,7 +74,6 @@ limitations under the License.

.mx_MessageComposer_input textarea {
display: block;
font-size: 15px;
width: 100%;
padding: 0px;
margin-top: 6px;
Expand All @@ -86,6 +86,7 @@ limitations under the License.
box-shadow: none;
color: #454545;
background-color: #fff;
font-size: 14px;

/* needed for FF */
font-family: 'Open Sans', Arial, Helvetica, Sans-Serif;
Expand Down
65 changes: 65 additions & 0 deletions src/skins/vector/css/vector-web/fonts.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Open Sans
* Includes extended Latin, Greek, Cyrillic and Vietnamese character sets
*/

@font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-Italic.ttf') format('truetype');
font-weight: 400;
font-style: italic;
}

@font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-Semibold.ttf') format('truetype');
font-weight: 600;
font-style: normal;
}

@font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-SemiboldItalic.ttf') format('truetype');
font-weight: 600;
font-style: italic;
}

@font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-Bold.ttf') format('truetype');
font-weight: 700;
font-style: normal;
}

@font-face {
font-family: 'Open Sans';
src: url('fonts/Open_Sans/OpenSans-BoldItalic.ttf') format('truetype');
font-weight: 700;
font-style: italic;
}

/*
* Fira Mono
* Used for monospace copy, i.e. code
*/

@font-face {
font-family: 'Fira Mono';
src: url('fonts/Fira_Mono/FiraMono-Regular.ttf') format('truetype');
font-weight: 400;
font-style: normal;
}

@font-face {
font-family: 'Fira Mono';
src: url('fonts/Fira_Mono/FiraMono-Bold.ttf') format('truetype');
font-weight: 700;
font-style: normal;
}
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading