fix(*): minor fixes

Summary:
Fixes T1905 - Gost line in recipients field
Fixes T1877 - Collapsed dates should not show time

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1877, T1905

Differential Revision: https://phab.nylas.com/D1671
This commit is contained in:
Evan Morikawa 2015-06-26 07:06:57 -07:00
parent 2c09cc18d7
commit 70a83a648d
3 changed files with 10 additions and 6 deletions

View file

@ -33,7 +33,7 @@ class MessageTimestamp extends React.Component
if diff < 1
return "h:mm a"
if diff < 4
return "MMM D, h:mm a"
return "MMM D"
else if diff > 1 and diff <= 365
return "MMM D"
else

View file

@ -17,17 +17,21 @@ describe "MessageTimestamp", ->
spyOn(@item, "_today").andCallFake -> testDate().add(2, 'years')
expect(@item._timeFormat()).toBe "MMM D YYYY"
it "displays the time and date from messages a bit ago", ->
it "displays the time and date from a while ago", ->
spyOn(@item, "_today").andCallFake -> testDate().add(7, 'days')
expect(@item._timeFormat()).toBe "MMM D"
it "displays the time and date from messages a couple days ago", ->
spyOn(@item, "_today").andCallFake -> testDate().add(2, 'days')
expect(@item._timeFormat()).toBe "MMM D, h:mm a"
expect(@item._timeFormat()).toBe "MMM D"
it "displays the time and date messages exactly a day ago", ->
spyOn(@item, "_today").andCallFake -> testDate().add(1, 'day')
expect(@item._timeFormat()).toBe "MMM D, h:mm a"
expect(@item._timeFormat()).toBe "MMM D"
it "displays the time from messages yesterday with the day, even though it's less than 24 hours ago", ->
spyOn(@item, "_today").andCallFake -> moment([2010, 1, 15, 2, 25, 50, 125])
expect(@item._timeFormat()).toBe "MMM D, h:mm a"
expect(@item._timeFormat()).toBe "MMM D"
it "displays the time from messages recently", ->
spyOn(@item, "_today").andCallFake -> testDate().add(2, 'hours')

View file

@ -92,7 +92,7 @@
width: initial;
vertical-align:top;
border: none;
min-width: 5em;
min-width: 0.5em;
background-color:transparent;
// NOTE: padding-top and padding-bottom need to match that of