Commit graph

14 commits

Author SHA1 Message Date
Evan Morikawa ae4ca59526 fix(sidebar): keep trying on 202s
Also fixed a bug where the email could come back with different
capitalization causing a cache miss
2016-03-11 16:27:04 -05:00
Evan Morikawa 963d1d92cb fix(sidebar): return valid person to prevent cache miss 2016-03-10 18:49:00 -05:00
Evan Morikawa b9810d5983 fix(sidebar): change optional bit in package 2016-03-10 18:40:26 -05:00
Evan Morikawa 8f94012dd7 fix(sidebar): don't show nulled profiles 2016-03-10 18:32:37 -05:00
Evan Morikawa 93cdbf1d6e fix(sidebar): explicitly detect 202 and cache null people 2016-03-10 18:16:32 -05:00
Evan Morikawa 9c8237caf3 fix(sidebar): design tweaks to sidebar 2016-03-10 15:06:59 -05:00
Evan Morikawa 47e2ef8436 fix(sidebar): minor sidebar style and padding tweaks 2016-03-10 15:06:59 -05:00
Evan Morikawa c38ef2f34a fix(sidebar): use http basic auth to pass token 2016-03-10 14:06:48 -05:00
Evan Morikawa 9018ae6a87 Revert "fix(sidebar): use n1_id to verify edgehill server"
This reverts commit ebd2973cf9.
2016-03-09 21:11:53 -05:00
Evan Morikawa 3a28bb0529 fix(sidebar): fix ordering and add hover state 2016-03-09 20:57:13 -05:00
Evan Morikawa ebd2973cf9 fix(sidebar): use n1_id to verify edgehill server 2016-03-09 20:27:31 -05:00
Evan Morikawa c616ded318 feat(sidebar): add timestamps to related messages 2016-03-09 16:17:20 -05:00
Evan Morikawa 2d972ea462 fix(sidebar): ui tweaks to narrow sidebar 2016-03-09 15:46:10 -05:00
Evan Morikawa 58004b29a7 feat(sidebar): Add thread list of currently selected participants
Summary:
WIP. I added a collection index to make displaying the threads of a
currently selected participant on the sidebar easy and fast.

The problem is that the `participants` of a thread, while a collection of
`Contact` objects, have no "ids" for those contact objects.

One idea was to create the join table but access contacts by email instead
of id. This required a minor change to the way the data is entered in the
join table.

This means the sidebar can now simply do:

`DatabaseStore.findAll(Thread).where(Thread.attributes.participants.contains('foo@bar.com'))`

While I didn't for this initial test, we could also/instead create the
`Message-Contact` join table. The trick about a Message-Contact table is
that I believe we'd have to create additional columns further specifying
which field we're interested in.

The following two queries:

`DatabaseStore.findAll(Message).where(Message.attributes.to.contains('foo@bar.com'))`

`DatabaseStore.findAll(Message).where(Message.attributes.from.contains('foo@bar.com'))`

would require additional columns in the `Message-Contact` join table
because currently the only columns are `id` and `value`.

In the case of the sidebar use case, I think the Thread participants is
what you want to see anyway.

Unfortunately an email-centric scheme can't distinguish between
`noreply@phab.com <Evan>` and `noreply@phab.com <Juan>`. I actually think
this may be a good thing since I think most people think in terms of email
address as the unique key anyway and for the use case of showing related
emails in the sidebar I'd rather overshow than undershow.

This solution seems to be working pretty well in initial testing, but I
want to see if you guys can think of anything this may subtly screw up
down the line, or if you can think of a simpler way to do this.

Test Plan: todo

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2687
2016-03-09 14:33:31 -05:00