mirror of
https://github.com/Foundry376/Mailspring.git
synced 2024-12-26 01:53:13 +08:00
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:
parent
2c09cc18d7
commit
70a83a648d
3 changed files with 10 additions and 6 deletions
|
@ -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
|
||||
|
|
|
@ -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')
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue