Commit graph

711 commits

Author SHA1 Message Date
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 8c7af92819 Using All Mail folder as archive in Gmail
Summary: Archive folder does not exist in Gmail. Instead, use the all mail folder

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1891
2015-08-14 09:40:07 -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 ac5eac02c0 fix(sync-worker): Fix specs, add one testing backoff 2015-08-13 11:20:36 -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
Ben Gotow 3a1c74acf0 fix(sync-worker): Replace basic "every 20 seconds" retry logic with linear backoff to five minutes
This helps guard against us DDOSing ourselves when the server is intermittently returning bad responses.
2015-08-11 12:28:53 -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
dillon 1ce7b62be1 fix mailto query string to allow 'Subject' as a valid key
Summary: Allow 'Subject=' and 'SUBJECT=' as valid keys for 'mailto:' links.

Test Plan: Didn't break any tests, so I added a few.

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2415

Differential Revision: https://phab.nylas.com/D1865
2015-08-11 11:22:35 -07:00
Ben Gotow 804b00cf74 fix(thread-list): Unread gem hover state should override "star"
Fixes T3216
2015-08-11 10:01:40 -07:00
Ben Gotow fb98bbe2e2 fix(db): Bump the database schema version 2015-08-10 19:06:49 -07:00
Ben Gotow 4df04eaba9 bump(version): 0.2.4
- Perf:
    + Mail actions like starring and changing folders are significantly faster
    + Messages and drafts load faster in large mailboxes thanks to better indexing and query management
    + Ingesting changes from the Nylas API no longer floods the database with queries

- Features:
    + Emails with forms and other interactive elements are now supported
    + Drafts now have a blue focus ring, which makes it easier to see keyboard focus
    + Contact search now matches email domains
    + Command-option-F now highlights the search bar

- Bug fixes:
    + Downloading large attachments will no longer crash the app
    + Window focus / blur state is now correctly reflected in the toolbar
    + Emails with some specific image tags now render with the correct height
    + Undoing star/unstar changes to a group of threads now restores previous state correctly
    + The 'send' animation in the message list is now glitch-free
    + Thread participant parsing handles more edge cases
    + Loading "dots" no longer cover the thread list in some scenarios
    + Rapidly creating and destroying drafts no longer causes React errors
2015-08-10 18:09:03 -07:00
Ben Gotow 48574ddffa fix(multiselect-list): Only show loading dots when list source is empty
Fixes T1118
2015-08-10 15:09:53 -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 06d1ab6aad fix(attachments): Do not parse file downloads as UTF8
Fixes T3188 and adds specs for API request construction in FileDownloadStore.Download
2015-08-10 13:36:16 -07:00
dillon f5172bd1b2 fix(composer): default warning is now 'Send Anyway' instead of 'Cancel'
Summary: Fixes T2433

Test Plan: Updated composer specs

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2433

Differential Revision: https://phab.nylas.com/D1861
2015-08-10 12:19:40 -07:00
Ben Gotow 3b0bc63846 fix(search): Command-alt-f to highlight search
Fixes T3011
2015-08-10 12:02:44 -07:00
dillon 0dc3f6f883 fix(message-list): side-bar button shouldn't be selectable
Summary: fixes T2852

Test Plan: tested manually

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2852

Differential Revision: https://phab.nylas.com/D1859
2015-08-10 11:40:19 -07:00
Ben Gotow 6607b46395 fix(specs): Fixes for failing specs 2015-08-06 14:35:52 -07:00
Ben Gotow 4df6d4f705 fix(file): file.displayExtension should return lowercased extension
T2874
2015-08-06 13:59:30 -07:00
Ben Gotow 697a140ab8 fix(contact-parsing): Remove quotes around parsed names
Typing or pasting `"John A" <aaa@market76.com>` should give you John A without the surrounding quotes.
2015-08-06 13:39:49 -07:00
Ben Gotow b2d80d12b5 fix(participant-fragments): Fragment based on name as well as email
Fixes T2880, with a new test
2015-08-06 13:12:24 -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
Ben Gotow b5ac2b5c4c fix(nylas-api): The _delta property was not correctly associated with deltas 2015-08-06 12:22:24 -07:00
Ben Gotow 58a9d60ce1 fix(specs/keys): Fix broken specs, clean up CJSX 2015-08-06 12:22:06 -07:00
Ben Gotow 23977da416 feat(database): Save and retrieve arbitrary json blobs to database
This fixes T2233, which was caused by the main window trying to write config.cson very often as initial sync happened, and the parent process trying to observe those changes on disk to watch for the user's API key being removed. Further refactoring would be good but this will fix it.
2015-08-06 12:21:24 -07:00
Ben Gotow e94f5808c4 fix(mail-tasks): Bad bug involving wrong call to increment/decrement locks 2015-08-06 12:19:13 -07:00
Ben Gotow bcef8e6cc2 fix(contact-search): Also match domains
Fixes T2468
2015-08-06 10:45:17 -07:00
Ben Gotow 0c7266c141 fix(focus): Use BrowserWindow focus/blur, not window focus/blur
Summary: Previously, you could actually click a message iFrame to blur the toolbar, which made no sense. See http://stackoverflow.com/questions/24619114/identifying-window-focus-blur-events-with-iframes

Test Plan: No tests

Differential Revision: https://phab.nylas.com/D1848
2015-08-06 10:40:18 -07:00
Ben Gotow 574c32438a fix(reply-area): Remove animated height from message list reply-area - looks strange since the removal of a draft is not otherwise animated 2015-08-05 17:41:15 -07:00
Ben Gotow e17c7812a8 fix(drafts): Fix rapid draft creation and deletion issues 2015-08-05 17:40:33 -07:00
Ben Gotow 5e39454ad9 fix(labels/folders): Temporarily disable changing nested messages
- It's slow, and causes performLocal to take much longer
- It's making changes we receive from the streaming API a few moments later
- We don't actually display nested folder data anywhere important
2015-08-05 17:39:48 -07:00
Ben Gotow be4af0671b feat(composer): Show blue focus ring around the composer 2015-08-05 17:38:44 -07:00
Ben Gotow 1e6e857f28 perf(*): Add indexes, optimize "shouldAcceptModel", optimize Tasks
Summary:
Consolidate the smarts from ChangeFolderTask into a generic ChangeMailTask

ChangeMailTask:
   - only makes requests for threads / messages that actually changed
   - handles incrementing / decrementing locks
   - writes changes to the database in a single pass, and only writes modified models
   - encapsulates the undo state that was built into ChangeFolderTask

This change means that ChangeLabelsTask enjoys the same "smarts" as ChangeFolderTask. Label changes resulting in no-ops do not create web requests, you can undo label changes and they go back to the correct previous state.

Replace "UpdateThreadsTask" and "UpdateNylasObjectsTask" with subclasses based on the same code used for folder/labels

This means that the naming and parameter sets are consistent for all thread/message changing tasks. It also means that starring/marking as use the same (tested) business logic and starring 999 already-starred threads doesn't create 999 requests.
Go away DraftCountStore - nobody wants you in secondary windows

Add "Debug query plans" option which prints out the steps the database is taking. Look for "SCAN" to now you're having a bad time.

Make "version" field queryable, when we receive deltas/API response, find all versions of existing models in a single query without loading or parsing the objects

Contact: Add index for lookup by email

Label: add index for lookup by name

Message: Add index for message body join table

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1840
2015-08-05 15:53:08 -07:00
Evan Morikawa 4e4e510833 fix(spec): Fix memory leak in NamespaceStoreSpec 2015-08-05 09:44:34 -07:00
Evan Morikawa aeced745f3 fix(spec): Make specs work with new animated pending message 2015-08-05 09:34:56 -07:00
Evan Morikawa a125e79799 fix(message-list): get rid of flicker and add transitions
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1841
2015-08-04 19:35:56 -07:00
Evan Morikawa 1d617f7f62 fix(folder): require Task object 2015-08-04 14:41:27 -07:00
Ben Gotow 1ba02de407 fix(reply-all): Fix edge case where same person in CC/To causes error when replying-all 2015-08-04 13:57:12 -07:00
Ben Gotow 7cc04a6eed fix(iframe): allowDefault for events within message iFrames, just not link clicks 2015-08-04 13:37:05 -07:00
Ben Gotow 7a5d90cc56 bump(version): 0.2.3
- Threads sort the same way they do in Gmail, by "last message received"
- We now use native SQLite bindings, and SQLite 3.8.11.1, which is 22% faster
- We now display an affordance for undoing changes to threads
- Scroll handling in the message list is much better
- Contact chips have been overhauled in the composer, and are now editable
- Contact autocompletions are better, and based on frequency of use
- Messages wrap better in many scenarios
- More than 20 bug fixes!

We now have more than 1,000 specs for Nylas Mail.
2015-08-03 19:46:38 -07:00
Evan Morikawa dae2cec8fb fix(folder): specs and fixes to ChangeFolderTask
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1834
2015-08-03 19:09:41 -07:00
Ben Gotow 7f84917675 fix(lint): Address linter errors 2015-08-03 19:09:08 -07:00
Ben Gotow dd7140ee1f fix(threads): Use last_message_timestamp fallback until migration has completed 2015-08-03 18:52:07 -07:00
Ben Gotow 0b9b72dce5 fix(draft-scroll): Ignore composer scroll requests while moving to new draft 2015-08-03 18:39:11 -07:00