Summary: after refactoring some things last week and spending time futsing with coffeescript, I’m pretty convinced it’s worth moving important parts of the app to ES6 to be able to use ESLint as part of our dev workflow
Test Plan: Run existing tests, tested manually. Did not convert the tests in this diff, breaking one part at a time!
Reviewers: evan, juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D2768
Summary:
- New behavior is that the in split mode, you will perform actions on
the selection via the MessageListToolbar (the toolbar positioned above
the message list)
- Refactored and moved around a bunch of code to achieve this:
- Mostly renaming stuff and moving stuff around and removing some
duplication
- Update naming of toolbar role to a single role, and update relevant code
- Converted and refactored a bunch of code into ES6, specifically to reuse the code for the ThreadActionsToolbar at the 2 locations
- Deprecated MultiselectActionBar in favor of MultiselectToolbar
- Deprecated old roles
- Punted the animation for the stackable cards in the selection display for now.
- #370
Test Plan: - Manual and unit tests
Reviewers: evan, drew, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2756
Summary:
WIP
Remove the mode prop from everywhere, use NylasEnv.isComposerWindow() instead
Test Plan: Run updated tests
Reviewers: drew, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2766
Summary:
- Applies code changes that we discussed with @bengotow when debugging
#1327
- Minor refactoring and reorganization + update specs
Test Plan: - Unit tests
Reviewers: evan, bengotow
Reviewed By: bengotow
Subscribers: bengotow
Differential Revision: https://phab.nylas.com/D2612
Summary:
This is a critical patch that fixes two problems with the task queue:
1. Tasks in Status: Retry are retried the next time processQueue is run,
which could be pretty much immediately. Certain scenarios lead to tasks
running in a hard loop forever.
2. Returning Task.Status.Retry set the retry flags on the task but did not
schedule the queue to be processed again. So if only a single item in the
queue was present, it might never be retried again until the user performed
another action.
Test Plan: Where did the specs for TaskQueue go? There aren't many... need to write more.
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2762
Valid accounts that are syncing properly can reviece a delta for
Account.syncState==stopped currently, due to some quirks in the backend.
Ignore "stopped" until it unabiguously represents an error state.
There were several issues with the last issue template, here are some of them
- Instructions to user that should've been comments were not, they were shown as part of the issue
- Bullets were used instead of heading, the down side is that they weren't gonna be bullets only. Users were supposed to add paragraphs below them, thus breaking the styling.
- There were no separators in place
This commit addresses these issues
Summary:
The old approach we were using to track unread counts by category was really complicated because it involved computing changes to counts in javascript and then syncing them back to the database, from each process that was making queries. Rather than try to fix that, this diff moves us to a new approach where the counts are maintained by executing a query before and after threads are modified to unapply / reapply them from the counters. Doing this in the database in the same transactions as the thread modifications themselves ensures the counts are internally consistent with the Threads table.
This SQL approach is also able to compute initial counts way faster - initializing totals and unreads in a 1GB edgehill.db in about 1 second on my machine.
Test Plan: All old tests removed, new tests coming
Reviewers: evan, juan
Reviewed By: juan
Differential Revision: https://phab.nylas.com/D2757
Summary:
Fix specs
Fix responding to mailto, files at launch
It's super important that `window:loaded` is /not/ sent from index.js because `loadSettings.bootstrapScript` is async and nothing is actually loaded yet. This was causing the app to dispatch the mailto:// links into the main window before a DraftStore existed.
I think this was necessary at one point because we had NylasWindows not using a bootstrapScript? Should not be here anymore...
Test Plan: Run a few new tests
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2737
Summary:
Previously we always created <blockquote class="gmail_quote"> to wrap quoted text. This is not correct.
Gmail uses blockquotes only when it wants visual indentation, and <div>s to wrap other quoted text, like forwarded
messages which are not displayed indented.
This diff updates N1 to match Gmail exactly. Note that for replies, Gmail actually nests a blockquote.gmail_quote
inside a div.gmail_quote.
I also updated signature handling because it turns out the regexp that was removing existing signatures would blow
away any and all divs until it reached a <blockquote> tag.
Test Plan: See updated specs. Manually tested by creating a thread in Google Inbox and then performing fwd and reply in both N1 and Inbox. Results match.
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2750
Summary:
This diff replaces "finalizeSessionBeforeSending" with a
plugin hook that is bidirectional and allows us to put the draft in
the "ready to send" state every time we save it, and restore it to
the "ready to edit" state every time a draft session is created to
edit it.
This diff also significantly restructures the draft tasks:
1. SyncbackDraftUploadsTask:
- ensures that `uploads` are converted to `files` and that any
existing files on the draft are part of the correct account.
1. SyncbackDraftTask:
- saves the draft, nothing else.
3. SendDraftTask
- sends the draft, nothing else.
- deletes the entire uploads directory for the draft
Test Plan: WIP
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2753
In Cypher, I store the Keybase tokens in `config.cson` currently.
With the recent integration of `atom-keytar`, I can store those
authentication tokens into the system keychain where they are better
protected than `config.cson` just like the account tokens.
- See #1695
- Update key commands region to clear focus when window blurs
- Dispatch broswer-window-focus/blur as a window event into the renderer
window
- Update tray icon to listen to window instead of ipc event
Summary: Shortens and simplifies UI variables so that unused variables are no longer present.
Test Plan: Tested locally.
Reviewers: evan, bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D2738