Skip to content

Commit

Permalink
handling padding on wrapper
Browse files Browse the repository at this point in the history
  • Loading branch information
Eschults committed Aug 3, 2016
1 parent 3659dbf commit 6a35c99
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 13 deletions.
8 changes: 5 additions & 3 deletions app/assets/javascripts/components/inbox.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ var Inbox = React.createClass({
selectedUserIndex: null,
selectedUserId: null,
createConversation: false,
padded: false
paddedTwoLine: false,
paddedThreeLine: false
}
},

Expand All @@ -23,7 +24,8 @@ var Inbox = React.createClass({
"hidden": !this.state.selectUser
})
var wrapperClass = classNames({
"focused": this.state.padded
"two-line": this.state.paddedTwoLine,
"three-line": this.state.paddedThreeLine
})
var userList
if (this.state.selectUser) {
Expand Down Expand Up @@ -295,4 +297,4 @@ var Inbox = React.createClass({
var wrapper = this.refs.wrapper
wrapper.scrollTop = wrapper.scrollHeight
}
})
})
1 change: 0 additions & 1 deletion app/assets/javascripts/components/message_list.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ var MessageList = React.createClass({
return <MessageListItem
message={message}
key={index}
// TODO props
/>
})}
</div>
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/config/_markdown.scss
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
.markdown-body {
-ms-text-size-adjust: 100%;
-webkit-text-size-adjust: 100%;
color: #333;
font-family: "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
// color: #333;
font-family: "Open Sans", "Helvetica Neue", Helvetica, "Segoe UI", Arial, freesans, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol";
font-size: 16px;
line-height: 1.6;
word-wrap: break-word;
Expand Down
13 changes: 8 additions & 5 deletions app/assets/stylesheets/pages/_conversations.scss
Original file line number Diff line number Diff line change
Expand Up @@ -185,10 +185,10 @@
border-color: #5898f1;
box-shadow: none;
&.two-line {
height: 4em;
height: 4.2em;
}
&.three-line {
height: 5em;
height: 5.5em;
}
}
}
Expand Down Expand Up @@ -226,9 +226,12 @@
height: 100%;
overflow: scroll;
padding-bottom: 67px;
// &.focused {
// padding-bottom: 159px;
// }
&.two-line {
padding-bottom: 84px;
}
&.three-line {
padding-bottom: 101px;
}
// display: flex;
// justify-content: flex-end;
}
Expand Down
4 changes: 2 additions & 2 deletions app/views/conversations/_conversation.json.jbuilder
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
json.extract! conversation, :id

json.other_user_picture_url conversation.other_user(current_user).avatar_url
json.other_user_picture_url conversation.other_user(current_user).one_avatar_url
json.other_user_first_name conversation.other_user(current_user).first_name
json.last_message_created_at conversation.last_message.created_at.strftime("%b %e")
json.last_message_content conversation.last_message.content
json.last_message_read_at conversation.last_message.read_at
json.is_last_message_writer_current_user conversation.last_message.user == current_user
json.user conversation.other_user(current_user)
json.user conversation.other_user(current_user)

0 comments on commit 6a35c99

Please sign in to comment.