Commit graph

8 commits

Author SHA1 Message Date
Ben Gotow 899ce2a27a fix(window-serialization): Restore window size, remove cruft from atom.coffee
Summary: Simplify the default window size, restore window size when the main window is loaded, fix serialization of packages in beforeunload.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2061
2015-09-24 10:40:38 -07: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 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
Ben Gotow e17c7812a8 fix(drafts): Fix rapid draft creation and deletion issues 2015-08-05 17:40:33 -07:00
Ben Gotow 9b2f830348 fix(*): Minor performance tweaks and fixes to category picker
Summary:
fix(undo-redo): UndoRedoComponent does not take props

fix(category-picker):

- Use Actions.queueTask like the rest of the app so UndoRedoStore can see it. Can change this in the future but it's currently the only place in the app we directly queue tasks.

- Stop subscribing to the FocusedContentStore / FocusedCategoryStore (which are not used in setState?) since we receive threads as props

- Rename categoryDatum to item because it's not a category. (Was super confused that categories were becoming JSON in `_extendCategoryWithDisplayData`) Give item a category property so that tasks can specify items and not IDs (allows for better descriptions like "Moved one thread to Archive"

Add simple shouldComponentUpdate to retina-img

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1832
2015-08-03 17:05:31 -07:00
Ben Gotow 8884435da0 fix(undo-redo): Minor tweaks to undo/redo based on testing - see description
Summary:
Give UpdateThreadsTask a description method for strings like "Marked as read"

Give ChangeLabelsTask a better description method that returns shorter strings and is specific when possible

Give ChangeFolderTask a more specific description and don't assume folderOrId will always be a folder

Make it so that passive "mark as read" from the message store isn't undoable

Give the base class a description method that names the object

Change UndoRedo component CSS a bit:

- Use "inline-flexbox" with a max-width so that we can define shrinking rules on the label and Undo button (label gets ellipsis, button does not shrink at all)

- Avoid left:39%, since it assumed that the undo-redo element would be 22% of the width of the thread list, which wasn't always true. Instead, make the `undo-redo-manager` container "text-align:center", so the `undo-redo` div is always centered within it.

- Add `cursor:default` so that the user sees the pointer, not the text insertion cursor when hovering over "Undo"

- Add overflow / text-overflow so that if the message is ever too long, the user sees `...` ellipsis properly.

Test Plan: Run a few new tests

Reviewers: evan, ethanb

Reviewed By: ethanb

Differential Revision: https://phab.nylas.com/D1830
2015-08-03 14:46:19 -07:00
Ben Gotow 99da4a112a fix(undo-redo): Clear timeout when component unmounts to avoid React errors 2015-08-03 10:21:04 -07:00
EthanBlackburn 17bcb88ae3 UndoRedoButton now shows
Summary: A notification now appears at the bottom of the window when the user performs an action that can be undone

Test Plan: Tested manually

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Differential Revision: https://phab.nylas.com/D1820
2015-07-31 13:12:47 -07:00