Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 2 additions & 1 deletion internal_packages/message-list/lib/message-item.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,14 +54,15 @@ class MessageItem extends React.Component

_renderCollapsed: =>
attachmentIcon = []
isCompact = not NylasEnv.config.get('core.reading.useLongDisplayNames')
if Utils.showIconForAttachments(@props.message.files)
attachmentIcon = <div className="collapsed-attachment"></div>

<div className={@props.className} onClick={@_toggleCollapsed}>
<div className="message-item-white-wrap">
<div className="message-item-area">
<div className="collapsed-from">
{@props.message.from?[0]?.displayName(compact: true)}
{@props.message.from?[0]?.displayName(compact: isCompact)}
</div>
<div className="collapsed-snippet">
{@props.message.snippet}
Expand Down
5 changes: 3 additions & 2 deletions internal_packages/message-list/lib/message-participants.cjsx
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ class MessageParticipants extends React.Component
selection.addRange(range)

_shortNames: (contacts = [], max = MAX_COLLAPSED) =>
names = _.map(contacts, (c) -> c.displayName(includeAccountLabel: true, compact: true))
isCompact = not NylasEnv.config.get('core.reading.useLongDisplayNames')
names = _.map(contacts, (c) -> c.displayName(includeAccountLabel: true, compact: isCompact))
if names.length > max
extra = names.length - max
names = names.slice(0, max)
Expand All @@ -61,7 +62,7 @@ class MessageParticipants extends React.Component
{c.fullName()}
</div>
<div className="participant-secondary">
{"<"}<span onClick={@_selectText}>{c.email}</span>{">#{comma}"}
&nbsp;{"<"}<span onClick={@_selectText}>{c.email}</span>{">#{comma}"}
</div>
</div>
else
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ describe "MessageParticipants", ->

it "uses full names", ->
to = ReactTestUtils.findRenderedDOMComponentWithClass(@participants, "to-contact")
expect(ReactDOM.findDOMNode(to).innerText.trim()).toEqual "User Two<[email protected]>"
expect(ReactDOM.findDOMNode(to).innerText.trim()).toEqual "User Two <[email protected]>"


# TODO: We no longer display "to everyone"
Expand Down
4 changes: 4 additions & 0 deletions src/config-schema.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,10 @@ module.exports =
type: 'boolean'
default: false
title: "Swipe gesture and backspace / delete move messages to trash"
useLongDisplayNames:
type: 'boolean'
default: false
title: "Use full contact names instead of compact"
sending:
type: 'object'
properties:
Expand Down