Commit graph

472 commits

Author SHA1 Message Date
Evan Morikawa e4a57aaf12 feat(github): add GitHub plugin
Summary:
Adding a simple GitHub plugin that shows a button on the thread view.

If we detect the "open in github" links, then we'll show the button on the
thread.

Test Plan: manual

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1959
2015-09-01 11:57:06 -07:00
Evan Morikawa 7ffaf6c17f fix(sidebar): fix case when category comes back as null 2015-09-01 06:18:11 -07:00
Evan Morikawa 13629f57dc fix(preferences): add window title to preferences
Fixes T3458 Preferences panel shows up as "Electron" in Window menu
2015-08-31 17:25:33 -07:00
Evan Morikawa 550a7e0a8c refactor(packages): move internal sidebar to own repo
Fixes T3425 Remove Nylas internal admin sidebar from default edgehill
2015-08-31 17:13:52 -07:00
Evan Morikawa 16c4376812 feat(composer): improve tab useage in composer
A `*` as well as a `-` will start a list.

If you tab anywhere in plain text, it will insert a tab character.

If your shift-tab anywhere in plain text, and the character just before
the cursor is a "tab" character, it will delete that last tab character.

Fix a bug whereby shift-tab and tab will indent/outdent from anywhere
inside of a list.

Fixes T3409
2015-08-31 16:55:01 -07:00
Evan Morikawa 93209c9f71 fix(sidebar): remove "Plugins" and consolidate sections
Fixes T3461
2015-08-31 15:38:08 -07:00
Evan Morikawa d56d8daaf2 fix(drafts): fix illegal ID set
Fixes T3468
2015-08-31 15:21:41 -07:00
Evan Morikawa 6ac2a6b1be fix(attachments): set attachment min-width
Fixes T3459
2015-08-31 15:03:17 -07:00
dillon c059b51fe3 fix(account-sidebar): make folder and label names wrap elegantly. fixes T3402.
Summary:
WIP: changing the rest of items to make them look correct

fix last draft item in sidebar

add more padding

Test Plan: tested manually. all tests remain green.

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3402

Differential Revision: https://phab.nylas.com/D1943
2015-08-31 10:47:25 -07:00
Evan Morikawa a0307d4d88 fix(uploads): no more from picker & uploads use correct accountId
Test Plan: edgehill --test

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1955
2015-08-28 20:35:43 -04:00
Evan Morikawa e639afae1e fix(undo): properly scope composer keymappings for undo/redo
Summary: Properly scopes undo & redo key bindings to the composer

Test Plan: manual

Reviewers: dillon, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3446

Differential Revision: https://phab.nylas.com/D1951
2015-08-28 18:59:00 -04:00
Evan Morikawa 3908ba402d feat(sync): Resume sync worker action from sidebar 2015-08-28 16:24:39 -04:00
Ben Gotow 08da848c34 fix(message-list): Use clientIds within the message-list for scrolling, etc. since IDs may change 2015-08-28 12:25:48 -07:00
Evan Morikawa a0e64bf580 refactor(packages): Remove Edgeforce 2015-08-28 15:16:32 -04:00
Ben Gotow 7190ca69f7 refactor(db): change ID system to have clientIDs and serverIDs
Summary: Major ID refactor

Test Plan: edgehill --test

Reviewers: bengotow, dillon

Differential Revision: https://phab.nylas.com/D1946
2015-08-28 11:24:29 -07:00
Ben Gotow 1a576d92dc feat(work): Create the "Work" window, move TaskQueue, Nylas sync workers
Summary:
Move sync workers and Edgehill token checks to work window

Move the task queue and database setup to the work window

Move ContactStore background refresh to work window

Store the task queue in the database

WIP

The TaskQueue now puts tasks in the database instead of in a file, which also means it can be observed

Move all delta sync and initial sync to a package, make NylasSyncStore which exposes read-only sync state

DraftStore no longer reads task status. Once you set the "sending" bit on a draft, it never gets unset. But that's fine actually.

If your package lists windowTypes, you *only* get loaded in those windowTypes. If you specify no windowTypes, you get loaded in the root window.

This means that onboarding, worker-ui, worker-sync, etc. no longer get loaded into the main window

ActivitySidebar has a special little store that observes the task queue since it's no longer in the window

Move "toggle component regions" / "toggle react remote" to the Developer menu

Move sync worker specs, update draft store specs to not rely on TaskQueue at all

Test Plan: Run existing tests, all pass

Reviewers: dillon, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1936
2015-08-27 16:39:40 -07:00
Ben Gotow 41a3529f16 fix(perf): Apply accountId to more queries, always run query plans in dev mode to flag SCANs 2015-08-26 14:10:28 -07:00
Ben Gotow 1b67728033 fix(draft-list): Only parse the first 400 characters of HTML to create plaintext snippet
It's possible that 400 characters isn't enough to get any plaintext (if the body begins with a style tag, for example.) Until we get a better solution in place, we need to do this to avoid parsing the king james bible in my draft.
2015-08-25 16:08:16 -07:00
Ben Gotow e65c078cf3 fix(composer): Show From: when replyToMessageId is null 2015-08-25 12:23:48 -07:00
Ben Gotow 2c6e3c4db5 fix(sentry-2518): Better debugging information for when token is not found 2015-08-25 11:49:51 -07:00
Ben Gotow 9dd04223d9 fix(less): Put pointer back on composer toolbar 2015-08-25 11:35:37 -07:00
Evan Morikawa 462e7e1dae fix(composer): display tooltip controls 2015-08-25 14:01:24 -04:00
Ben Gotow 7aedb9d22a downgrade(electron): Also fix less issue on Linux 2015-08-24 18:55:40 -07:00
Ben Gotow 7c09e77305 temp(composer): Do not allow user to switch accounts if files have been attached to draft 2015-08-24 17:39:41 -07:00
Ben Gotow 0c57108ff2 fix(object-serialization): Constrain use of __constructorName, fix infinite recursion, remove hackiness 2015-08-21 16:08:24 -07:00
Ben Gotow 81d2edcaf9 feat(accounts): Kill namespaces, long live accounts
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
2015-08-21 15:29:58 -07:00
Evan Morikawa 23c8466fe0 fix(message): update MessageBodyProcess to key on message version 2015-08-20 16:44:13 -07:00
Evan Morikawa e2af724fa2 fix(thread): fix bug whereby thread list blows up if no "from" 2015-08-20 16:21:47 -07:00
dillon 9285e47b96 fix(message-list): collapsed message participants no longer looks broken. fixes T3377.
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
2015-08-19 17:39:16 -07:00
dillon 0c14146c78 fix(message-timestamp): call @_formattedDate with correct params. fixes T3388.
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
2015-08-19 15:50:10 -07:00
Evan Morikawa 51288b261a fix(specs): fix contenteditable specs 2015-08-19 13:35:12 -07:00
Evan Morikawa e018d6a8ec feat(composer): add bullets, numbered lists, and tab controls
Summary: Adding bullets, numbered lists, and tabbing indenting and outdenting

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1917
2015-08-19 13:26:11 -07:00
Ben Gotow fd08bf87b0 fix(keymaps): JSON => CSON during cibuild final phase 2015-08-18 14:50:53 -07:00
Ben Gotow a309d72fa0 fix(lint): Fix linter issues with preferences 2015-08-18 11:13:47 -07:00
Ben Gotow f883732522 bump(version): 0.2.5
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
2015-08-18 10:57:37 -07:00
Ben Gotow dff1fd1487 fix(*): A few patches for minor sentry errors
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
2015-08-18 10:31:18 -07:00
dillon db407abbde add more test coverage and refactor checking if a contact is the current user. fixes T3360.
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
2015-08-18 10:18:30 -07:00
Ben Gotow 3e43f45401 perf(drafts): Cache results of running Autolinker, avoid props.children for EmailFrame, fix special case for new draft
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
2015-08-17 16:23:12 -07:00
Ben Gotow 19f543e20c fix(sentry-archive): Import Actions into ThreadListQuickActions 2015-08-17 14:51:03 -07:00
Ben Gotow d7337f2b10 fix(packages): Wait for package-store to be used before using APM to load the packages 2015-08-17 12:03:35 -07:00
Ben Gotow e7fce1f120 fix(preferences): Display multiple keybindings when available 2015-08-14 16:41:52 -07:00
Ben Gotow 94372f22c8 fix(preferences): Windows / Linux styling and adjustments 2015-08-14 16:24:53 -07:00
Ben Gotow ed2a5c90d9 feat(preferences): WIP Preferences panel
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
2015-08-14 15:40:11 -07:00
dillon d8a77826aa WIP: adding a test for review
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
2015-08-14 14:17:15 -07:00
dillon 56012ca1ef fix(thread-list): toggling select for an unread thread doesn't affect bolding anymore -- fixes T3219
Summary: Some CSS logic tweaks and simplifications.

Test Plan: Tested manually. No automated test unfortunately.

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T3219

Differential Revision: https://phab.nylas.com/D1882
2015-08-14 13:47:25 -07:00
EthanBlackburn 8b108c78de Quick actions fix
Summary: Fixes T2345.

Test Plan: Tested manually

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2345

Differential Revision: https://phab.nylas.com/D1886
2015-08-13 14:56:22 -07:00
Ben Gotow afda3c6030 fix(curl): If a curl URL a "&" in it, we need to wrap the url in quotes 2015-08-13 11:20:19 -07:00
dillon 24b94a25df fix(message-list): show relative time if email is less than 22 hours ago. fixes T2308.
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
2015-08-12 14:52:03 -07:00
dillon 2c011c703f fix(message-list): allow starring messages by pressing 's'. Fixes T2430.
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
2015-08-12 14:36:44 -07:00
dillon 262eb71c0b add a fix, TODO: refactor
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
2015-08-11 11:35:33 -07:00