Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.
This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.
When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.
Search bar doesn't need to do full refresh on clear if it never committed
Allow drafts to be switched to a different account when not in reply to an existing thread
Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal
Show many dots for many accounts in long polling status bar
add/remove accounts from prefs
Spec fixes!
Test Plan: Run tests, none broken!
Reviewers: evan, dillon
Reviewed By: evan, dillon
Differential Revision: https://phab.nylas.com/D1928
Summary: I'm proposing this patch as a temp fix for this issue. Desired functionality should probably be defined before adding more code.
Test Plan: Attempting to test manually... can't get my runtime edgehill to propagate these changes tho :(
Reviewers: bengotow
Reviewed By: bengotow
Maniphest Tasks: T2391
Differential Revision: https://phab.nylas.com/D1911
Summary: moved non-view logic outside of the render function, which also helped for testing purposes
Test Plan: added a test, but this also leaves the window open for testing the other use cases beyond T3377. not sure whether we should add tests for this patch or for another ticket.
Reviewers: evan
Reviewed By: evan
Maniphest Tasks: T3377
Differential Revision: https://phab.nylas.com/D1916
Summary:
Adding serialzable registry
Added DatabaseObjectRegistry
rename modelReviver to deserializeObject
Consolidate deserizlie
Get rid of model methods from Utils
DatabaseRegistry change notifications
Logic to throttle database refresh requests
Fixes in nylas-exports
Silent model setup
Continue to resolving the database setup phase for non main windows.
A packages `activate` method does not actually get called until the
DatabaseStore says that it's ready. This is necessary to ensure that a
package that introduces database changes has those schema changes take
hold before the activate happens.
However, in windows like the `onboarding` window that do not depend on a
database at all, there is no setup that is run and the promise use to
never resolve thereby making the packages never activate.
In this case, any external windows will go ahead and let their packages
activate.
Check subclass instead of instance!
Use the correct types for "messages" and "drafts"
Move Salesforce models
Proper references to Model and Attributes
Convert Salesforce stores to NylasStores and fix paths
Move database setup to DB
Test Plan: todo
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D1899
Summary: small fix
Test Plan: I didn't add any tests, but this should probably be tested. Not sure the best way to test though. Would love to discuss with somebody!
Reviewers: bengotow
Reviewed By: bengotow
Maniphest Tasks: T3388
Differential Revision: https://phab.nylas.com/D1919
Summary:
Fixes T3252
When links were clicked with malformed, relative, or malicious href links
we'd perform default behavior instead of catching them.
If you have href="www.foo.bar" the browser by default thinks it's a
relative link. In our case it would prepend the full default base URI
which is file://path/to/edgehill. This would at best fail to do anything
and at worst execute an arbitrary file.
We now blacklist `file:` and check for the existence of a valid RFC 3986
schema on the URI.
Test Plan: manual
Reviewers: bengotow
Reviewed By: bengotow
Maniphest Tasks: T3252
Differential Revision: https://phab.nylas.com/D1888
Features:
- Preferences! You can now change all kinds of things from Menu > Preferences, including:
+ Key binding sets (Gmail, Outlook, Mail.app)
+ Theme (light or dark)
+ Mark-as-read delay
+ Attachment downloading policy
+ Sounds and notifications
+ Default reply behavior
- Layout and theme are now remembered when you re-launch Nylas Mail
- You can now star the message under the keyboard cursor by pressing 'S'
Performance:
- Creating drafts is now much faster on long threads
Fixes:
- "Hover and Archive" is now displayed correctly
- Signing in with an email with capitalization ("BEN@Nylas.com") no longer breaks subtle things
- Messages sent yesterday are now shown with relative time (2:31PM, 12 hours ago)
- NylasSyncWorker now backs off when it encounters network failure
- On Windows, the database is deleted properly when you log out
- Archiving now properly sends mail to All Mail in Gmail
- Images inside some emails now render without becoming distorted
- Mailto link handling is now case-insensitive
Summary:
Fix edge cases where _getRangeInScope is null, fix logic errors
fix(1932) Edge case where we can't find a container for the message Id we're asked to scroll to
Check view exists before trying to perform actions. Will be fixed once keybindings are a React container
Test Plan: Run specs
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1906
Summary: @evan -- would love to get your opinion on this approach!
Test Plan: add new tests
Reviewers: evan
Reviewed By: evan
Subscribers: evan
Maniphest Tasks: T3360
Differential Revision: https://phab.nylas.com/D1904
Summary:
"results.length" not "result.length".
Eventually I want MessageBodyProcessor to be the public interface to another process which asynchronously runs message body parsing? At the very least, caching the results means that miscelaneous refreshes to the message list don't incur significant string processing cost.
Test Plan: No new tests here
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1898
Summary:
Things still to come:
- General tab
- Signatures tab (potentially remove and land)
Adding emacs things to gitignore
Adding progress. iterating on html/css is incredibly painful
Added layout for accounts page.
Adding layout for appearance page
layout for shortcuts preferences page
adding layount for notifications menu
Adding signatures layout
WIP
WIP - tab switching, accounts tab
WIP ALL THE THINGS
Keymap template support (Gmail / outlook, etc.)
Test Plan: No tests atm
Reviewers: evan
Differential Revision: https://phab.nylas.com/D1890
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: Archive folder does not exist in Gmail. Instead, use the all mail folder
Test Plan: manual
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D1891
Summary: refactored existing code and rewrite come tests to make the logic simpler
Test Plan: new tests to test final outcome rather than intermediate formats, which i figured was more useful
Reviewers: bengotow
Reviewed By: bengotow
Maniphest Tasks: T3219, T2308
Differential Revision: https://phab.nylas.com/D1876
Summary: Although this code works as desired, I think the code itself could use some work. Also, I didn't know how I should test this. Any ideas? @bengotow
Test Plan: I'm all ears
Reviewers: bengotow
Reviewed By: bengotow
Subscribers: bengotow
Maniphest Tasks: T2430
Differential Revision: https://phab.nylas.com/D1877
Summary: fix(service): Remove redundant tail newline when hiding previous in compose view. Fixes T2467.
Test Plan: Added a test to verify that all tail newlines are removed except one. Added another to verify that non-tail newlines aren't removed. Tweaked an existing test to make it pass.
Reviewers: bengotow
Reviewed By: bengotow
Maniphest Tasks: T2467
Differential Revision: https://phab.nylas.com/D1864
Summary: Allow 'Subject=' and 'SUBJECT=' as valid keys for 'mailto:' links.
Test Plan: Didn't break any tests, so I added a few.
Reviewers: bengotow
Reviewed By: bengotow
Maniphest Tasks: T2415
Differential Revision: https://phab.nylas.com/D1865
- Perf:
+ Mail actions like starring and changing folders are significantly faster
+ Messages and drafts load faster in large mailboxes thanks to better indexing and query management
+ Ingesting changes from the Nylas API no longer floods the database with queries
- Features:
+ Emails with forms and other interactive elements are now supported
+ Drafts now have a blue focus ring, which makes it easier to see keyboard focus
+ Contact search now matches email domains
+ Command-option-F now highlights the search bar
- Bug fixes:
+ Downloading large attachments will no longer crash the app
+ Window focus / blur state is now correctly reflected in the toolbar
+ Emails with some specific image tags now render with the correct height
+ Undoing star/unstar changes to a group of threads now restores previous state correctly
+ The 'send' animation in the message list is now glitch-free
+ Thread participant parsing handles more edge cases
+ Loading "dots" no longer cover the thread list in some scenarios
+ Rapidly creating and destroying drafts no longer causes React errors
Previously, we were adding 160px of padding to the entire To field. Now the buttons in the top right are floating inside the container and only impact the first line of participants.
I also stripped out a lot of zIndex rules on the participant fields, subject, body that I think were only necessary because "once you've started adding zindexes you need them everywhere".
Also changed the hover state of the buttons to be consistent.
We constrain images to a max-width of 600px. We have logic to change width and height attributes of inline attachments when both specified (and larger than 600px). This `height:auto` flag causes the image below to render at 600x600 because it's a 1x1 image:
<img src="http://image.lyftmail.com/lib/fe6915707166047a7d14/m/1/spacer.gif" height="1" width="600" style="display: block; width: 600px; min-width: 600px;" border="0">
I think the height:auto case only happens when A) the image is more than 600px wide B) the image has a hard-coded height and not a hard-coded width. In this case our max-width rule will change the width and the height will be fixed. I think we should disregard this case unless we find scenarios where it happens.