Summary: Desired functionality works, and passing test cases added. Ready for code review for real now! @evan @bengotow
Test Plan: Added extra tests to cover recipient-only cases.
Reviewers: evan, bengotow
Reviewed By: bengotow
Maniphest Tasks: T2239
Differential Revision: https://phab.nylas.com/D1889
Summary:
Features:
- ThreadListParticipants ignores drafts when computing participants, renders "Draft" label, pending design
- Put the WorkspaceStore in every window—means they all get toolbars and custom gumdrop icons on Mac OS X
Bug Fixes:
- Never display notifications for email the user just sent
- Fix obscure issue with DatabaseView trying to update metadata on items it froze. This resolves issue with names remaining bold after marking as read, drafts not appearing in message list immediately.
- When you pop out a draft, save it first and *wait* for the commit() promise to succeed.
- If you scroll very fast, you node.contentWindow can be null in eventedIframe
Other:
Make it OK to re-register the same component
Make it possible to unregister a hot window
Break the Sheet Toolbar out into it's own file to make things manageable
Replace `package.windowPropsReceived` with a store-style model where anyone can listen for changes to `windowProps`
When I put the WorkspaceStore in every window, I ran into a problem because the package was no longer rendering an instance of the Composer, it was declaring a root sheet with a composer in it. This meant that it was actually a React component that needed to listen to window props, not the package itself.
`atom` is already an event emitter, so I added a `onWindowPropsReceived` hook so that components can listen to window props as if they were listening to a store. I think this might be more flexible than only broadcasting the props change event to packages.
Test Plan: Run tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1592
Summary:
Fixes: T1334
remove final InboxApp references
move out all underscore-plus methods
Mass find and replace of underscore-plus
sed -i '' -- 's/underscore-plus/underscore/g' **/*.coffee
sed -i '' -- 's/underscore-plus/underscore/g' **/*.cjsx
Test Plan: edgehill --test
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D1534
Summary:
NamespaceStore needs to be more careful about triggering unnecessarily
ThreadListParticipants should use minimum set of <span> tags, not one per name
FocusedTagStore triggers only when the tag has actually changed
New InboxSyncWorker is responsible for fetching contacts, calendars, threads
Update the draft list to look like the thread list
ThreadStore now uses a "Database View" to vend items, which will free it up to focus on things like selection soon. The DatabaseView handles pagination and maintains a cache of items in a "retained range" the view needs. It also abstracts the...
..."thread metadata" concept into a general purpose pattern
Thread-list package implements SearchView to match the DatabaseView. Instead of fetching items from the database it uses the search API
Update existing specs
Bug fix
Specs for focused stores
New specs!
Pad search range so we prefetch the next pages
Clear the scroll offset if the view is changed (between tabs)
Test Plan: Run 58 new tests with 110 new assertions!
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1398
Summary:
A change in the spec caused an error when message metatdata wasn't
available. The specs were also not updated to reflect the change.
fix thread list participants spec
fix thread list spec
Test Plan: edgehill --test
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://review.inboxapp.com/D1372
Summary:
This diff uses the new ?expanded=true threads request to fetch threads and the messages inside them at the same time. The messages from this endpoint don't contain bodies. Message bodies have been moved to a new "secondary attribute" type, which can be optionally requested when making queries. This allows us to 1) quickly fetch messages without worrying about MBs of JSON, 2) update messages without updating their bodies, and 3) avoid calls to /messages?thread_id=123. The new message store fetches just the items it wants to display in expanded mode, and we'll show snippets for the rest.
Fix up forwarded message
Approach: Thread.messageMetadata
join approach WIP
join approach complete
"" || null = null. OMG.
Make spinner a bit smarter, use code delays and not css delays
Search suggestion store should only show first 10 matches
Msg collapsing, refactored msg store that will fetch individual messages that are marked as expanded, set loaded = true when it's all done
Test Plan: Tests coming soon. The query refactoring here broke a lot of tests...
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1345