Commit graph

160 commits

Author SHA1 Message Date
Ben Gotow 3e9e6b9faf fix(list): Additional focused CSS changes 2015-10-23 14:55:07 -07:00
Ben Gotow 4cebe51e17 fix(threads): Show the archive button in the bulk action bar 2015-10-23 14:50:39 -07:00
Evan Morikawa 539e9b3799 fix(archive): can archive and trash from focused message 2015-10-23 14:49:29 -07:00
Ben Gotow fc840384da fix(list): Incorrect snippet color on unread selected threads in narrow mode 2015-10-23 12:54:02 -07:00
Ben Gotow 1ad6c563a4 fix(thread-list): Better hover state for quick actions 2015-10-23 12:47:32 -07:00
Ben Gotow 3770014808 fix(drafts): Fix missing import, resolves Sentry 4041 2015-10-22 16:13:37 -07:00
Evan Morikawa b76fd0e578 feat(windows): improve UI for Windows
Remove rounded corners and gradients
2015-10-21 20:32:33 -07:00
Ben Gotow a1995fc505 fix(empty-state): Subpixel animation via translate3d 2015-10-21 14:52:50 -07:00
Ben Gotow eba7c62787 fix(category): Consolidate logic around "archive" vs" all" 2015-10-21 11:58:06 -07:00
Ben Gotow 3452129738 fix(art): Correct "Trash" icon, naming consistency 2015-10-21 11:58:05 -07:00
Evan Morikawa 6c0370d7a8 feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
Ben Gotow e09d3e3e75 feat(trash): Trash for Gmail, and architectural changes for common tasks
Summary:
This diff centralizes logic for creating common tasks for things like moving to trash, archive, etc. TaskFactory exposes a set of convenience methods and hides the whole "and also remove the current label" business from the user.

This diff also formally separates the concept of "moving to trash" and "archiving" so that "remove" isn't used in an unclear way.

I also refactored where selection is managed. Previously you'd fire some action like archiveSelection and it'd clear the selection, but if you selected some items and used another method to archive a few, they were still selected. The selection is now bound to the ModelView as intended, so if items are removed from the modelView, they are removed from it's attached selection. This means that it shouldn't /technically/ be possible to have selected items which are not in view.

I haven't refactored the tests yet. They are likely broken...

Fix next/prev logic

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2157
2015-10-21 10:38:00 -07:00
Ben Gotow 0084306a69 fix(thread-list): stop thread-icons from shrinking, justify participants explicitly 2015-10-14 18:05:29 -07:00
Ben Gotow 5155db25d5 fix(thread-list): Enable drag and drop in narrow view 2015-10-12 11:04:27 -07:00
Evan Morikawa f88b0f3708 feat(archive): shows trash for non-archive accounts
Summary:
Fixes T3570
Fixes T3737

Rename ArchiveThreadHelper to RemoveThreadHelper

Rename of `getRemovalTask`

Remove unarchive from `RemoveThreadHelper`. Pass in mailviewfilter

Rename actions

Rename archive action

renmaing

support trash and archive folders in RemoveThreadHelper

Move everything over to trash

add tests

Hide trash and archive

Test Plan: new tests

Reviewers: dillon, bengotow

Reviewed By: dillon, bengotow

Maniphest Tasks: T3570, T3737

Differential Revision: https://phab.nylas.com/D2089
2015-09-30 19:51:48 -07:00
Ben Gotow c1d9ca518f fix(thread-list): Focused / selected threads appear gray when window is blurred 2015-09-28 02:43:46 -07:00
Ben Gotow 9661774f80 fix(compression-priority): Make message list the flex column by giving it the largest max-width 2015-09-28 01:44:36 -07:00
Ben Gotow 3a5a6ce7b9 fix(thread-list): Use hasAttachments flag, fix bug where attachments icon did not appear in search results 2015-09-23 15:48:03 -07:00
Ben Gotow 83427c4541 fix(thread-list): Pad the right edge of the thread list for the scrollbar 2015-09-23 15:47:21 -07:00
Ben Gotow 7bebd48680 fix(thread-list-participants): Add a new failing test case + fix to the thread list participants
I had to make this less functional so that the token generation function could modify data in the output as it was created. Bust :(
2015-09-22 19:02:33 -07:00
Ben Gotow 4bdc650aaa feat(account-sidebar): Ability to add custom items to the sidebar 2015-09-22 14:43:17 -07:00
Drew Regitsky abdefb7d84 change styles to center injected thread icons on rows 2015-09-21 18:17:05 -07:00
Ben Gotow 74894e91ff feat(thread-list): Create custom icon components via role: ThreadListIcon 2015-09-21 16:21:57 -07:00
Ben Gotow 0bb527c81a fix(thread-list-actions): Fix bad return [] 2015-09-21 14:15:57 -07:00
Evan Morikawa 1761a81549 fix(quick-actions): change styles and only archie/trash
Summary: Fixes T2875

Test Plan: manual

Reviewers: bengotow, dillon

Reviewed By: dillon

Maniphest Tasks: T2875

Differential Revision: https://phab.nylas.com/D2041
2015-09-18 17:43:49 -04:00
dillon 793acfa132 fix(toolbar): swap mark-as-unread and archive buttons
Summary:
fixes T3628

problem
- mark-as-read button was in most prominent location
- archive button is most used button, but unfortunately in less prominent location
- user is annoyed at inconvenient real estate allocation

Test Plan: tested manually for regressions. all previous tests still green.

Reviewers: bengotow

Maniphest Tasks: T3628

Differential Revision: https://phab.nylas.com/D2033
2015-09-16 17:48:56 -07:00
dillon fc770a85cd feat(toggle-unread): threads can now toggle their unread status. fixes T3483.
Summary:
still WIP, but functionality is there.

TODO:
[x] write tests
[x] swap out the current markasread icon for the correct markasread icon that @sdw is making
[x] figure out how to address this point by @bengotow: https://phab.nylas.com/D2024?id=19139#inline-12168

Test Plan: tested manually. still need to write tests though.

Reviewers: evan, bengotow

Reviewed By: bengotow

Subscribers: sdw

Maniphest Tasks: T3483

Differential Revision: https://phab.nylas.com/D2024
2015-09-15 16:49:16 -07:00
dillon f4e3a941e7 feat(account-sidebar): move account switcher from the side to the top of the account sidebar. fixes T3546.
Summary: ready for final code review! @evan @bengotow

Test Plan: added some tests for the account switcher

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Maniphest Tasks: T3546

Differential Revision: https://phab.nylas.com/D2016
2015-09-14 15:05:33 -07:00
Ben Gotow cf73768003 fix(thread-list-store): Preserve selection through moveThreads
Summary: Small change that resets focus and keyboard selection after moving threads

Test Plan: Run existing tests, plan to overhaul this whole class so no additioanl tests atm

Reviewers: dillon, evan

Reviewed By: evan

Maniphest Tasks: T3382

Differential Revision: https://phab.nylas.com/D1996
2015-09-09 16:09:51 -07:00
Ben Gotow 229c5578f7 fix(thread-list): Depressed+active state needs to be different for immediate click feedback 2015-09-09 14:05:03 -07:00
Ben Gotow 918b299eb4 tweak(empty-state): Hellen only has one L 2015-09-09 14:05:03 -07:00
Ben Gotow 5b410b7f73 fix(draft-list-store): Upgrade draft list store to NylasStore, fix issue where @_view is null 2015-09-08 18:39:00 -07:00
EthanBlackburn 1ba1df8103 Archive button no longer appears in sent folder
Summary: Archive button doesnt appear in sent folder

Test Plan: tested manually

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3428

Differential Revision: https://phab.nylas.com/D1987
2015-09-08 14:16:51 -07:00
Evan Morikawa 395bd80da2 fix(draft-list): draft list removes draft when the message sends
Summary:
This started when I noticed that drafts weren't dissapearing from the
draft list after send. This was a pretty big bug because if you ever
clicked on one again and tried to re-send it would throw a 400 error
saying the draft id doesn't exist.

This uncovered a few fundamental issues with the DB.

First of all, the reason the draft list wasn't updating was because the DB
trigger that happened when we got in a new message, was being ignored
since the diff contained no drafts (it's now a message).

The bigger issue was that if you had a draft with only a clientId, gave it
a serverId, and tried to call "save", the REPLACE INTO method would not
update the old object, but rather create a second duplicate. This is
because the `id` field was being used as the PRIMARY KEY, and in this
case, that `id` field changed! The fix was to change the PRIMARY KEY to be
the `cilent_id` instead of the `id` and use that as the REPLACE INTO
index.

We still need the `id` field; however, because all of our reads depend on
that field usually being the serverId

Fixes T3507

Test Plan: See new and updated tests

Reviewers: dillon, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3507

Differential Revision: https://phab.nylas.com/D1992
2015-09-08 13:11:34 -07:00
Ben Gotow 3f3ec441ae feat(important): Improtant flags you can enable optionally for Gmail accounts
Summary: Fixes T3477

Test Plan: Tests are forthcoming

Reviewers: dillon, evan

Reviewed By: evan

Maniphest Tasks: T3477

Differential Revision: https://phab.nylas.com/D1990
2015-09-08 10:53:07 -07:00
Ben Gotow 815a50dd32 fix(search): Fix for broken search display 2015-09-04 15:31:03 -07:00
dillon 0e4eeef7f1 fix(thread-list): set min-width to threadlist. fixes T3435.
Summary: fix whitespace

Test Plan: added more test coverage

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T3435

Differential Revision: https://phab.nylas.com/D1982
2015-09-04 12:27:05 -07:00
Ben Gotow dfcb15c79e feat(starred): Replace FocusedContentStore with FocusedMailViewStore, allows for starred
Summary:
This diff fixes T3389 and makes it possible to define mail views which are not based on a category and focus them in the app.

I think that we need to create a new index on the starred attribute to make sure the query runs fast.

More tests WIP

Test Plan: Run tests, more coming soon!

Reviewers: dillon, evan

Reviewed By: evan

Maniphest Tasks: T3389

Differential Revision: https://phab.nylas.com/D1979
2015-09-04 12:23:15 -07:00
dillon ff7e72a361 fix(thread): thread.sortLabels() now ignores 'Sent Mail' and other unnecessary labels. fixes T3454.
Summary: NOTE: this ticket and this diff do not address turning the 'Important' label into a more user-friendly chevron. I created T3477 for that.

Test Plan: added more tests. however, seems like somebody merged some tests which are failing.

Reviewers: bengotow, evan

Reviewed By: evan

Maniphest Tasks: T3454

Differential Revision: https://phab.nylas.com/D1963
2015-09-01 14:47:22 -07:00
dillon 1b929ec91d fix(draft-list-sidebar-item): draft count renders correctly. fixes T3480.
Summary: I think I might've broken this when I fixed T3402, but I didn't realize it because I had zero drafts at the time, so this component didn't render for me.

Test Plan: tested manually

Reviewers: bengotow

Maniphest Tasks: T3402, T3480

Differential Revision: https://phab.nylas.com/D1965
2015-09-01 12:32:39 -07:00
dillon b39789ad10 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
Ben Gotow f8c5f7b967 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 9d995ded67 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 dd3d255252 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 633079bf3f 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 607ca3bf10 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 eb7fc24b96 fix(thread): fix bug whereby thread list blows up if no "from" 2015-08-20 16:21:47 -07:00
dillon be54063659 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
Ben Gotow 941e16bb11 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 07996da960 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