Commit graph

171 commits

Author SHA1 Message Date
Ben Gotow be103b22bf tweak(win32): Hide the app menu on Windows, show in a right-side button instead 2015-09-11 14:49:26 -07:00
Ben Gotow 42d397fa76 tweak(win32): Make the window toolbar white on windows 2015-09-10 12:41:12 -07:00
Ben Gotow e1725e1c96 fix(loading-cover): Prevent strange overflow caused by position:absolute
Fixes T3539
2015-09-09 14:41:04 -07:00
Ben Gotow ac3ca9d8f8 fix(thread-list): Depressed+active state needs to be different for immediate click feedback 2015-09-09 14:05:03 -07:00
Ben Gotow 18795d075b fix(window-controls): Proper @1x assets to avoid tiny white aliasing
Fixes T3501
2015-09-08 14:32:49 -07:00
Ben Gotow 910f272076 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
Evan Morikawa ee41722891 fix(composer): much better specs for composer & quoted text
Summary: Fixed a bug bug with the quoted text clearing the bodies on replies

Test Plan: all the tests

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1981
2015-09-03 19:41:56 -07:00
Ben Gotow 71f1a3e315 fix(Atom): Wait to send window:loaded until new loading process has finished (broken because of animation blocks) 2015-09-02 16:49:13 -07:00
Ben Gotow be697e42c7 fix(message-list): Roll back min width hiding reply buttons, etc. Just allow individual body iframes to scroll horizontally when necessary 2015-09-01 10:51:24 -07:00
Ben Gotow b04f496a02 fix(loading): Initial bounce was missing from loading animation 2015-09-01 10:27:44 -07:00
dillon b6bc5e1a01 fix(scroll-region): add min-width to scrollable message area. fixes T3442.
Summary: I wasn't sure how much the min-width should be. I cross-checked with Gmail and found that they set a pretty generous min-width. I felt 700px seemed comfortable.

Test Plan: Manually tested. All other tests remain green.

Reviewers: bengotow

Maniphest Tasks: T3442

Differential Revision: https://phab.nylas.com/D1954
2015-08-31 10:46:37 -07:00
Ben Gotow 11dab9095a fix(loading): Add nice text to our new loader 2015-08-28 14:24:17 -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 78a02ad52c fix(button-dropdown): Broken styles on reply/reply-all button dropdown 2015-08-24 17:31:03 -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
dillon 698e8a2367 fix(message-sidebar): remove faulty component. fixes T2391.
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
2015-08-21 10:45:07 -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 b890aaca6f fix(email-frame): We can no longer specify a max-width on images, because it's relative to an unknown parent container and changes the dynamic of sizing of images inside of tables
We may need another fix, but we sure as hell can't have this one.
2015-08-17 14:50:40 -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
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 a5f05f52fd fix(composer): Remove unnecessary zIndex rules, fix wrapping around Cc/Bcc/Subject icons
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.
2015-08-10 14:47:47 -07:00
Ben Gotow e2a1658ab3 fix(email-styles): Remove img height:auto; causing images to stretch based on their intrinsic size
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.
2015-08-10 14:12:38 -07:00
Ben Gotow c4dd6813d6 fix(contact-chips): Remove left/right margin from input to align properly
Fixes T2878
2015-08-06 12:27:49 -07:00
Evan Morikawa ada9f722f5 feat(message-list): better sending state
Summary:
We now have a `MessageItemContainer` class that handles the logic of
deciding what kind of message to show. We introduce a new `PendingMessage`
(which is just a sublcass of `MessageItem`) that has the spinner and
stuff.

Also tests

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1833
2015-08-03 17:19:07 -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 1dc7c03ebd fix(contact-chips): Contact chips are editable and have much better style
Summary:
The TokenizingTextField has several new optional props, including onEdit, which enables
editing of the tokens and tokenIsInvalid, which allows you to make tokens red, while still
accepting them as tokens.

When you go to send a message with invalid recipients it won't let you until you remove/
edit them.

Hotloading

Edit chips, keymappings not through command registry, 7 new tests for editing chips

Test Plan: Run 7 new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1825
2015-08-03 13:06:28 -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
Ben Gotow 73ae6ea6f3 fix(T2387): Use better file icons from SDW
Summary:
fix misc spec failure by making event store fetch immediately on setup

add specs for displayExtension, displayName

Test Plan: Run new tests

Reviewers: evan

Maniphest Tasks: T2387

Differential Revision: https://phab.nylas.com/D1821
2015-07-31 12:34:24 -07:00
Ben Gotow fa2519923f fix(T2337): Break words to ensure messages wrap, fall back to horizontal scrolling of messages
Fixes T2337
2015-07-30 17:49:06 -07:00
EthanBlackburn 88a45dfd13 RSVP tile for events on messages
Summary: RSVP tile now appears for messages with attached events.

Test Plan: Tested manually. Will add unit tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1797
2015-07-28 18:21:30 -07:00
Ben Gotow d2833cfefa feat(hotloading): CJSX hotloading when running in dev mode
Summary:
# Conflicts:
#	static/components/tokenizing-text-field.less

Wat no

Test Plan: Tested with ci build

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1216

Differential Revision: https://phab.nylas.com/D1804
2015-07-24 14:10:48 -07:00
Evan Morikawa 5b7ca072cd fix(popover): don't let popover overflow
Summary:
The popover class now will adjust itself until it fits within the window
frame. You don't see the intermediate state in the double render.

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1795
2015-07-23 19:42:16 -07:00
Ben Gotow 7dfeabf7c9 fix(multiselect-bar): Do not render components inside action bar when it's hidden 2015-07-23 14:12:14 -07:00
Evan Morikawa 0b3dcd3e35 fix(styles): fix button padding and styles 2015-07-23 12:22:27 -07:00
Evan Morikawa f22d154486 feat(picker): new folder and label picker
Summary:
The new, styled folder and label picker!

Some highlights:
- Folder picker has custom icons and a divider
- Label picker has checkboxes with off, checked, and intermediate state
- Extracted LabelColorizer out of mail-label
- Search will bold the results it found
- Fixes to Tooltip to prevent it displaying at invalid moments
- Keyboard UX improvements to Menu

Test Plan: coming soon

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1790
2015-07-23 11:47:46 -07:00
Ben Gotow 5acbdb0955 fix(workspace): Support for hidden locations / columns
Summary:
- New control will likely be shortlived - SDW mocking up replacement for when settings UI lands
- New action for toggling location hidden
- New rule for mail labels: can't remove "Sent"

Test Plan: Run tests - none new atm

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1782
2015-07-23 11:18:42 -07:00
Ben Gotow 814ed76510 feat(drag-threads): Move threads to folders/labels from thread list
Summary:
Drag threads to the folders / labels in the sidebar
WIP

Drag and drop is styled!

Test Plan: Tests WIP

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1785
2015-07-23 11:10:51 -07:00
Evan Morikawa f29e0163aa fix(images): compress images
This reduced our image size by 92%. It saves us 4MB.

Several of our images had several hundred KB of plain text Adobe metadata
crap. Some had full blow Fireworks editing histories embedded in them.

I re-saved out these images and verified on both a diffing program and by
comparing the app that no pixels changed in the compression.
2015-07-22 22:41:19 -07:00
Ben Gotow a9d6795347 fix(SDW): Styling of various controls and buttons. See description
- Message reply dropdown uses new images. Fixes T2355
- New hover actions which are darker. Fixes T2358
- New reply icon in the message footer. Fixes T2359
- Toolbar buttons are the correct height. Fixes T2360
- Thread list selection state changes mail label style
- Removed dead assets
2015-07-21 13:53:06 -07:00
Ben Gotow a272761951 fix(labels): Labels in the thread list and in the message subject line
Summary: Mail labels

Test Plan: No tests atm, just visual code

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1774
2015-07-21 11:50:08 -07:00
Ben Gotow 3983269004 fix(toolbar-style): Add gradient to top toolbar, blurred styling 2015-07-16 17:51:18 -07:00
Ben Gotow 67c48b5136 fix(drag-n-drop): Remove react-dnd, display dropzone, allow tokens to be dragged out of app as plaintext
React-dnd is a nice library but it assumes it's going to be the only thing managing your drag and drop in the entire app. It also hides the underlying dataTransfer object so it's difficult to implement native drag and drop behaviors other than for Files and Urls, which they special-case.

Implementing it manually really isn't hard, and we can do things like attach a text/plain version of contact data to the contact drag.

Fixes T2054
2015-07-15 20:06:11 -07:00
Ben Gotow 9431da5321 fix(T2118): Center popout titles on windows/linux
Fixes T2118
2015-07-14 16:08:23 -07:00
Ben Gotow a384b7621c fix(back): Remove "Back to " prefix, centralize into back button itself, align using vertial-align instead of margin-top
Summary: Fixes T2135

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T2135

Differential Revision: https://phab.nylas.com/D1731
2015-07-13 16:33:57 -07:00
Ben Gotow 03b248cab2 fix(quoted-text-button): New, more obvious design for quoted text toggle
Test Plan: Run existing tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T2282

Differential Revision: https://phab.nylas.com/D1735
2015-07-13 16:28:20 -07:00
Evan Morikawa 93ea9c6165 fix(*): can select participant with space if it's an email
Summary:
Fixes T2272

If the label is too long, the unread icons will now ellipsis truncate the
text correctly instead of being pushed off of the side.

I made the max-width of the sidebar 17px wider to allow for Karim's french
"Inbox" translation.

Fixes T2266

Added some more protection to places where filenames could be blank when
downloading.

This was partially fixed by Rob's D1685

Fixes T2258

You can now finish selecting a participant by pressing `space`, but only
when the participant looks like an email address.

When you do this we directly add the email address to the chip instead of
looking up a contact. This allows you to send just to the email instead of
adding a potentially erroneous name into the input field

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2272, T2266, T2258

Differential Revision: https://phab.nylas.com/D1729
2015-07-13 10:25:30 -04:00
Evan Morikawa e8912e0e2e feat(quoted-text): New quoted text engine
Summary:
Add email reply parser

Quoted text detection for HTML

More blockquote specs

Added 'On … wrote:'

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1719
2015-07-08 09:51:33 -07:00
Ben Gotow 45bb16561f feat(offline-mode, undo-redo): Tasks handle network errors better and retry, undo/redo based on tasks
Summary:
This diff does a couple things:

- Undo redo with a new undo/redo store that maintains it's own queue of undo/redo tasks. This queue is separate from the TaskQueue because not all tasks should be considered for undo history! Right now just the AddRemoveTagsTask is undoable.

- NylasAPI.makeRequest now returns a promise which resolves with the result or rejects with an error. For things that still need them, there's still `success` and `error` callbacks. I also added `started:(req) ->` which allows you to get the underlying request.

- Aborting a NylasAPI request now makes it call it's error callback / promise reject.

- You can now run code after perform local has completed using this syntax:

```
    task = new AddRemoveTagsTask(focused, ['archive'], ['inbox'])
    task.waitForPerformLocal().then ->
      Actions.setFocus(collection: 'thread', item: nextFocus)
      Actions.setCursorPosition(collection: 'thread', item: nextKeyboard)
    Actions.queueTask(task)
```

- In specs, you can now use `advanceClock` to get through a Promise.then/catch/finally. Turns out it was using something low level and not using setTimeout(0).

- The TaskQueue uses promises better and defers a lot of the complexity around queueState for performLocal/performRemote to a task subclass called APITask. APITask implements "perform" and breaks it into "performLocal" and "performRemote".

- All tasks either resolve or reject. They're always removed from the queue, unless they resolve with Task.Status.Retry, which means they internally did a .catch (err) => Promise.resolve(Task.Status.Retry) and they want to be run again later.

- API tasks retry until they succeed or receive a NylasAPI.PermanentErrorCode (400,404,500), in which case they revert and finish.

- The AddRemoveTags Task can now take more than one thread! This is super cool because you can undo/redo a bulk action and also because we'll probably have a bulk tag modification API endpoint soon.

Getting undo / redo working revealed that the thread versioning system we built isn't working because the server was incrementing things by more than 1 at a time. Now we count the number of unresolved "optimistic" changes we've made to a given model, and only accept the server's version of it once the number of optimistic changes is back at zero.

Known Issues:

- AddRemoveTagsTasks aren't dependent on each other, so if you (undo/redo x lots) and then come back online, all the tasks try to add / remove all the tags at the same time. To fix this we can either allow the tasks to be merged together into a minimal set or make them block on each other.

- When Offline, you still get errors in the console for GET requests. Need to catch these and display an offline status bar.

- The metadata tasks haven't been updated yet to the new API. Wanted to get it reviewed first!

Test Plan: All the tests still pass!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1694
2015-07-07 13:38:53 -04:00