ConversationHeader: centered title, ConvoListItem: unbold name

pull/1/head
Scott Nonnenberg 7 years ago
parent b7d5013558
commit 7dd931fb7e

@ -1414,6 +1414,26 @@
cursor: pointer; cursor: pointer;
} }
.module-conversation-header__title-container {
flex-grow: 1;
flex-shrink: 1;
min-width: 0;
display: block;
text-align: center;
height: 48px;
}
.module-conversation-header__title-flex {
margin-left: auto;
margin-right: auto;
display: inline-flex;
flex-direction: row;
align-items: center;
height: 48px;
max-width: 100%;
}
.module-conversation-header___avatar { .module-conversation-header___avatar {
height: 32px; height: 32px;
width: 32px; width: 32px;
@ -1459,16 +1479,16 @@
} }
.module-conversation-header__title { .module-conversation-header__title {
flex-grow: 1;
display: block;
margin-left: 8px; margin-left: 8px;
min-width: 0;
font-size: 16px; font-size: 16px;
line-height: 24px; line-height: 24px;
font-weight: 300; font-weight: 300;
color: $color-light-90; color: $color-light-90;
// width of avatar and our 8px left margin
max-width: calc(100% - 40px);
white-space: nowrap; white-space: nowrap;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@ -1505,13 +1525,14 @@
.module-conversation-header__expiration__setting { .module-conversation-header__expiration__setting {
margin-left: 5px; margin-left: 5px;
text-align: center;
} }
.module-conversation-header__gear-icon { .module-conversation-header__gear-icon {
@include color-svg('../images/gear.svg', $color-light-60); @include color-svg('../images/gear.svg', $color-light-60);
height: 20px; height: 20px;
width: 20px; width: 20px;
padding-left: 4px; margin-left: 4px;
cursor: pointer; cursor: pointer;
} }
@ -1975,13 +1996,16 @@
flex-shrink: 1; flex-shrink: 1;
font-size: 14px; font-size: 14px;
line-height: 18px; line-height: 18px;
font-weight: 300;
overflow-x: hidden; overflow-x: hidden;
white-space: nowrap; white-space: nowrap;
text-overflow: ellipsis; text-overflow: ellipsis;
} }
.module-conversation-list-item__header__name--with-unread {
font-weight: 300;
}
.module-conversation-list-item__header__timestamp { .module-conversation-list-item__header__timestamp {
flex-shrink: 0; flex-shrink: 0;
margin-left: 6px; margin-left: 6px;

@ -82,7 +82,14 @@ export class ConversationListItem extends React.Component<Props> {
return ( return (
<div className="module-conversation-list-item__header"> <div className="module-conversation-list-item__header">
<div className="module-conversation-list-item__header__name"> <div
className={classNames(
'module-conversation-list-item__header__name',
unreadCount > 0
? 'module-conversation-list-item__header__name--with-unread'
: null
)}
>
<ContactName <ContactName
phoneNumber={phoneNumber} phoneNumber={phoneNumber}
name={name} name={name}

@ -242,8 +242,12 @@ export class ConversationHeader extends React.Component<Props> {
return ( return (
<div className="module-conversation-header"> <div className="module-conversation-header">
{this.renderBackButton()} {this.renderBackButton()}
<div className="module-conversation-header__title-container">
<div className="module-conversation-header__title-flex">
{this.renderAvatar()} {this.renderAvatar()}
{this.renderTitle()} {this.renderTitle()}
</div>
</div>
{this.renderExpirationLength()} {this.renderExpirationLength()}
{this.renderGear(id)} {this.renderGear(id)}
{this.renderMenu(id)} {this.renderMenu(id)}

Loading…
Cancel
Save