Commit graph

173 commits

Author SHA1 Message Date
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 ece7f2e649 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 dc7f225669 tweak(win32): Make the window toolbar white on windows 2015-09-10 12:41:12 -07:00
Ben Gotow 8b236fde67 fix(loading-cover): Prevent strange overflow caused by position:absolute
Fixes T3539
2015-09-09 14:41:04 -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 084eb84f81 fix(window-controls): Proper @1x assets to avoid tiny white aliasing
Fixes T3501
2015-09-08 14:32:49 -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
Evan Morikawa cea27cc8ce 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 4f8e85dad4 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 67c0ebf4b6 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 c8c980b611 fix(loading): Initial bounce was missing from loading animation 2015-09-01 10:27:44 -07:00
dillon 9c5281d11d 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 5ff029d2f9 fix(loading): Add nice text to our new loader 2015-08-28 14:24:17 -07:00
Evan Morikawa b056ddd514 refactor(packages): Remove Edgeforce 2015-08-28 15:16:32 -04: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 a099e677e0 fix(button-dropdown): Broken styles on reply/reply-all button dropdown 2015-08-24 17:31:03 -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
dillon 893d36ff91 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 9811b2646c 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 a5828aff1f 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 79b6c1d94a 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 685fd2fc69 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 183c552520 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 298b493837 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 b5ef2fa883 fix(contact-chips): Remove left/right margin from input to align properly
Fixes T2878
2015-08-06 12:27:49 -07:00
Evan Morikawa 5d95feaf9b 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 e68a139f4d 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 b7e314ac62 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 2814a0bc70 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 12a2836ec9 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 a1366df7e5 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 6609fe272c 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 b6dc7f0c9b 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 9eb36f5813 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 1c5f9b74e9 fix(multiselect-bar): Do not render components inside action bar when it's hidden 2015-07-23 14:12:14 -07:00
Evan Morikawa 98ad2e6ebc fix(styles): fix button padding and styles 2015-07-23 12:22:27 -07:00
Evan Morikawa 348d60ea0c 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 b412c580fc 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 a559e3f89f 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 dc79fead2b 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 ffcb609194 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 3aa7801d89 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 42a3359fa8 fix(toolbar-style): Add gradient to top toolbar, blurred styling 2015-07-16 17:51:18 -07:00
Ben Gotow b0f93dc52c 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 7578d72cbf fix(T2118): Center popout titles on windows/linux
Fixes T2118
2015-07-14 16:08:23 -07:00
Ben Gotow 769a5e5765 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 9ff6e75c30 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 bda80df05c 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