Commit graph

675 commits

Author SHA1 Message Date
Evan Morikawa 06a1eb42b2 fix(iframe): catch relative and malformed uris
Summary:
Fixes T3252

When links were clicked with malformed, relative, or malicious href links
we'd perform default behavior instead of catching them.

If you have href="www.foo.bar" the browser by default thinks it's a
relative link. In our case it would prepend the full default base URI
which is file://path/to/edgehill. This would at best fail to do anything
and at worst execute an arbitrary file.

We now blacklist `file:` and check for the existence of a valid RFC 3986
schema on the URI.

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T3252

Differential Revision: https://phab.nylas.com/D1888
2015-08-19 10:20:41 -07:00
Ben Gotow 50068116d4 fix(build-flow): Fix broken promise chaining in publish phase 2015-08-18 18:28:10 -07:00
Ben Gotow bb5f288f55 fix(build-flow): Slow down the script - jenkins is slow. 2015-08-18 18:19:17 -07:00
Ben Gotow dbe5d474e0 fix(build-flow): New integration test at the end of mac builds 2015-08-18 18:04:47 -07:00
Ben Gotow fd08bf87b0 fix(keymaps): JSON => CSON during cibuild final phase 2015-08-18 14:50:53 -07:00
Ben Gotow a309d72fa0 fix(lint): Fix linter issues with preferences 2015-08-18 11:13:47 -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 dff1fd1487 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 db407abbde 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
Ben Gotow 3e43f45401 perf(drafts): Cache results of running Autolinker, avoid props.children for EmailFrame, fix special case for new draft
Summary:
"results.length" not "result.length".

Eventually I want MessageBodyProcessor to be the public interface to another process which asynchronously runs message body parsing? At the very least, caching the results means that miscelaneous refreshes to the message list don't incur significant string processing cost.

Test Plan: No new tests here

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1898
2015-08-17 16:23:12 -07:00
Ben Gotow 19f543e20c fix(sentry-archive): Import Actions into ThreadListQuickActions 2015-08-17 14:51:03 -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 d7337f2b10 fix(packages): Wait for package-store to be used before using APM to load the packages 2015-08-17 12:03:35 -07:00
Ben Gotow e7fce1f120 fix(preferences): Display multiple keybindings when available 2015-08-14 16:41:52 -07:00
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