Mailspring/internal_packages/message-list/lib
Evan Morikawa d4ef6a20e5 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
..
plugins fix(tracking): tracking pixel won't register if it's from you 2016-02-24 12:55:00 -08:00
email-frame-styles-store.coffee fix(dark-mode): Adjust email CSS immediately upon switching themes 2015-11-23 20:20:06 -08:00
email-frame.cjsx feat(find-in-thread): add the ability to find in a thread 2016-03-02 14:46:27 -08:00
find-in-thread.jsx fix(find-in-thread): minor rename fixes 2016-03-02 15:00:01 -08:00
main.cjsx feat(sidebar): Add thread list of currently selected participants 2016-03-09 14:33:31 -05:00
message-controls.cjsx fix(msg-ctrls): reorder hidden options to reduce accidental error reports 2016-03-07 18:24:31 -08:00
message-item-body.cjsx fix(body-processor): Observe the db to clear cache. Fixes #1133 2016-03-08 13:14:06 -08:00
message-item-container.cjsx fix(MessageContainer): Fix state, prevent from getting different messages. #1175 2016-03-03 12:10:03 -08:00
message-item.cjsx fix(hidden-messages): Address diff feedback from @jstejada 2016-03-02 10:28:32 -08:00
message-list-hidden-messages-toggle.jsx fix(hidden-messages): Address diff feedback from @jstejada 2016-03-02 10:28:32 -08:00
message-list.cjsx fix(MessageContainer): Fix state, prevent from getting different messages. #1175 2016-03-03 12:10:03 -08:00
message-participants.cjsx 💄: White buttons, dropdown / popover cleanup, hairline dividers 2016-02-18 15:21:42 -08:00
message-timestamp.cjsx Standardize message-list capitalization to AM/PM, 2016-01-19 15:54:44 -07:00
message-toolbar-items.cjsx fix(toolbars): Cross disolve toolbar items on a one-off basis 2015-10-21 10:34:14 -07:00
sidebar-participant-picker.jsx feat(sidebar): Add thread list of currently selected participants 2016-03-09 14:33:31 -05:00
sidebar-plugin-container.cjsx feat(sidebar): Add thread list of currently selected participants 2016-03-09 14:33:31 -05:00
thread-archive-button.cjsx fix(remove-from-view): Fix logic for delete/remove-from-view behavior: 2016-03-07 18:16:37 -08:00
thread-star-button.cjsx feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
thread-toggle-unread-button.cjsx Harmonize require and remove unused ones. 2015-12-17 00:02:37 +01:00
thread-trash-button.cjsx fix(remove-from-view): Fix logic for delete/remove-from-view behavior: 2016-03-07 18:16:37 -08:00