Commit graph

364 commits

Author SHA1 Message Date
Robert McQueen a81b794046 Include unnamed files as attachements and rename to 'Unnamed Attachement'
Summary: Fixes T2024 and renames unnamed files to Unnamed Attachment before appending the attachement component to message list

Test Plan: Added a test to ensure file without filename is renamed to Unnamed Attachment

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2024

Differential Revision: https://phab.nylas.com/D1685
2015-06-25 09:51:46 -07:00
Ben Gotow 03e0e9d960 fix(composer): Show a scrollbar in the popout composer
Summary:
Fixes T1990

Change the ScrollRegion component so that you can optionally provide a getScrollbar prop that resolves to a ScrollRegion.Scrollbar component. This allows you to easily put the Scrollbar outside of the ScrollRegion if necessary.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1990

Differential Revision: https://phab.nylas.com/D1665
2015-06-23 15:21:25 -07:00
Evan Morikawa 6363bed89b fix(build): fix tello issue and less linter issue 2015-06-22 17:12:26 -07:00
Evan Morikawa 7739f08e84 feat(message): New Message List UI
Summary:
Initial message list collapsing

messages can be expanded explicitly

styling message items

composer UI and collapsing

expanding and collapsing headers

style new reply area

adding in message controls

Add message actions dropdown

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1664
2015-06-22 15:49:52 -07:00
Ben Gotow 2a847d36bd fix(attachments): Wrong padding on image attachments 2015-06-19 19:29:59 -07:00
Ben Gotow f7e16f0eca fix(*) Minor friday fixes - see description
- Delete should archive selection in split pane mode
- Thread list "quick actions" should be inverted when row is dark blue
- New star "action hover" state
- Multiselect list state is based on WorkspaceStore.layoutMode so add it to state
2015-06-19 16:07:24 -07:00
Ben Gotow 19d97e5393 fix(*): Throttle so that DatabaseView won't pile on queries during scroll, better small attachment styles
Summary:
fix(attachment): Bad filenames breaking icons

fix developer bar colors

fix critical bug with files

Render small attachments inline-block, without hover effect, and with nice dotted transparency background

Test Plan: No new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1661
2015-06-19 11:31:27 -07:00
Ben Gotow 0e96dd3372 fix(mailto): Use paste logic to parse fields in mailto links, support poorly encoded URLs
Summary:
Fixes T1927

- Allow email addresses to contain `_`
- Centralize logic for parsing string into Contact objects into ContactStore
- Always decode and then encode mailto links to ensure spaces, special characters are properly encoded and that the URL is valid
- Add specs for mailto:// behavior

Test Plan: Run wonderful new tests covering mailto://

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1927

Differential Revision: https://phab.nylas.com/D1657
2015-06-18 11:58:07 -07:00
Evan Morikawa bf11cf31cd fix(search): remove red search x 2015-06-18 09:43:18 -07:00
Ben Gotow 4848d3c4d8 fix(thread-list-narrow): Missing flex caused items to not be full-width 2015-06-17 22:38:55 -07:00
Evan Morikawa 1fa8e2d5fa fix(lint): fix minor style errors 2015-06-17 20:43:14 -07:00
Evan Morikawa c78ff03e60 feat(salesforce): new UI for Salesforce
Summary:
style opportunity picker and placeholder on tokenizing text fields

UI for synced opportunities

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1655
2015-06-17 20:40:08 -07:00
Ben Gotow 8d6dcfe549 perf(thread-list): Tailored SQLite indexes, ListTabular / ScrollRegion optimizations galore
Summary:
Allow Database models to create indexes, but don't autocreate bad ones

fix minor bug in error-reporter

Fix index on message list to make thread list lookups use proper index

Developer bar ignores state changes unless it's open

DatabaseView now asks for metadata for a set of items rather than calling a function for every item. Promise.props was cute but we really needed to make a single database query for all message metadata.

New "in" matcher so you can say `thread_id IN (1,2,3)`

Add .scroll-region-content-inner which is larger than the viewport by 1 page size, and uses transform(0,0,0) trick

ScrollRegion exposes `onScrollEnd` so listTabular, et al don't need to re-implement it with more timers. Also removing requestAnimationFrame which was causing us to request scrollTop when it was not ready, and caching the values of...

...clientHeight/scrollHeight while scrolling is in-flight

Updating rendered content 10 rows at a time (RangeChunkSize) was a bad idea. Instead, add every row in a render: pass as it comes in (less work all the time vs more work intermittently). Also remove bad requestAnimationFrame, and prevent calls to...

...updateRangeState from triggering additional calls to updateRangeState by removing `componentDidUpdate => updateRangeState `

Turning off hover (pointer-events:none) is now standard in ScrollRegion

Loading text in the scroll tooltip, instead of random date shown

Handle query parse errors by catching error and throwing a better more explanatory error

Replace "quick action" retina images with background images to make React render easier

Replace hasTagId with a faster implementation which doesn't call functions and doesn't build a temporary array

Print query durations when printing to console instead of only in metadata

Remove headers from support from ListTabular, we'll never use it

Making columns part of state was a good idea but changing the array causes the entire ListTabular to re-render.  To avoid this, be smarter about updating columns. This logic could potentially go in `componentDidReceiveProps` too.

Fix specs and add 6 more for new database store functionality

Test Plan: Run 6 new specs. More in the works?

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1651
2015-06-17 20:12:48 -07:00
Ben Gotow fd9e8166ae fix(selection): Thread mulit-selection should appear with focused style in split mode
Fixes T1983

Summary: Give classes handler nomenclature

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1653
2015-06-17 19:59:18 -07:00
Evan Morikawa 0b7b76c70e feat(composer): new composer and button styles
Summary:
initial styling of image attachments

more styles for composer overflow

style composer toolbar

toolbar styling

Fixes to inline composer

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1647
2015-06-17 16:03:50 -07:00
Evan Morikawa fe1e18740c feat(onboarding): refactor onboarding flow
Summary:
Add spinner and refactor container view to be router

add `NylasStore` as a global importable. specs for APIEnv

login page fixes

add old fixes to container view

finish extracting pages

fix onboarding flow

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1652
2015-06-17 15:58:58 -07:00
Ben Gotow 4638c5bc5b fix(error-handling): RFC822 endpoint not passing correct params 2015-06-17 14:39:50 -07:00
Ben Gotow c3287b7d57 fix(empty-states): Use quotes sparingly, show generic empty text in three-column mode and during search
Summary: We now show the inspirational quotes only when in list mode and viewing a tag. When you're viewing search results, or when you're in three-pane mode, you now see a more generic empty state.

Test Plan: No tests yet, may want to see if this refactor sticks when we start adding more empty states

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1642
2015-06-17 13:14:45 -07:00
Ben Gotow 672354260e fix(nylas-api): Globally handle 401s and notify user they need to sign in
Summary: Fixes T1843

Test Plan: No tests for this file yet

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1843

Differential Revision: https://phab.nylas.com/D1641
2015-06-17 12:29:49 -07:00
Ben Gotow e1af893510 fix(focus): Wait for cc/bcc to exist before trying to focus them
Summary:
It was hard to notice this regression because the `?` in `@refs[field]?.focus?()` meant `focus('textFieldCc')` failed silently.

Now we catch that the field we're asked to focus doesn't exist, and try again after the next render.

Fixes T1982

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1982

Differential Revision: https://phab.nylas.com/D1643
2015-06-17 12:29:32 -07:00
Ben Gotow fc796dc7aa fix(send-warnings): One character is valid body (T1929) and attachment is valid body (T1881)
Summary: This fixes T1881 and fixes T1929 and adds two additional test cases

Test Plan: Run 2 new tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1929, T1881

Differential Revision: https://phab.nylas.com/D1645
2015-06-17 12:29:21 -07:00
Evan Morikawa d5fc102f8a feat(attachment): improved downloading and draggable images
Summary:
Fixes T1975
Fixes T1900
Fixes T1899
Fixes T1979

Attachments downloading update progress

downloads will restart if the file on disk isn't complete

can drag images onto drive

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1900, T1899, T1975, T1979

Differential Revision: https://phab.nylas.com/D1638
2015-06-15 18:48:17 -07:00
Evan Morikawa 304c34f918 fix(specs): silence noisy specs and fix warnings
Summary:
Silence buffered process spec

Clean up error reporter and spec bootup

fix errors in draft store spec

package manager spec and theme spec fixes

Fix memory leak in draft store

Test Plan: mmmmmm tests. Run all those green passing tests :)

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1628
2015-06-15 18:29:59 -07:00
Ben Gotow f6b5b7ea30 fix(T1251) When a returnsModel request returns a 404, unpersist the object
Summary:
Give DatabaseStore trigger payload a 'type' so that you can handle the deletion of objects (clear focus if the object is focused, know to remove it from database view)

Fix specs and add one for new DatabaseView => unpersist handler

Test Plan: Run new test case

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1639
2015-06-15 18:23:58 -07:00
Ben Gotow e090dd428a feat(subject-search): Use basic LIKE query and date ordering to find likely emails
Summary: Begins to fix T1866, but for now only doing a LIKE instead of FTS4, because there are many, many other things to think about there.

Test Plan: No new tests. I still want to rewrite the whole search bar.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1866

Differential Revision: https://phab.nylas.com/D1634
2015-06-15 18:22:41 -07:00
Ben Gotow 6f16659a30 fix(T1758): Handle initial focus properly if draft is not yet ready 2015-06-15 14:48:54 -07:00
Ben Gotow 42819e4d71 upgrade(electron): 0.28.1. Improvements to webview, clipboard on linux 2015-06-15 11:22:42 -07:00
Evan Morikawa 7b9f89bc5d fix(keymap): add ctrl-enter to send email 2015-06-12 17:47:59 -07:00
Evan Morikawa 3e30e18236 fix(thread-list): narrow mode isn't hidden 2015-06-12 13:31:30 -07:00
Evan Morikawa fed1076d04 Fixes T1928: don't lose focus on cc and bcc fields
Summary: Fixes T1928

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1928

Differential Revision: https://phab.nylas.com/D1622
2015-06-11 18:48:55 -07:00
Ben Gotow f887e4e55a fix(style): Minor styling adjustments (floating toolbar, token carats) 2015-06-11 18:46:30 -07:00
Evan Morikawa 6f4f0c0ad0 Fixes T1868: tokenizing inputs resize properly
Summary:
Fixes T1868
The hidden sizing window was not getting whitespace properly and the width
was different because of different paddings

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1868

Differential Revision: https://phab.nylas.com/D1623
2015-06-11 18:39:55 -07:00
Ben Gotow f7f1ab3605 feat(thread-actions): Hover actions on thread list, improved drawing performance
Summary: Adds hover actions to threads in the thread list, uses overflow:hidden to improve thread list render times

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1621
2015-06-11 18:38:57 -07:00
Ben Gotow aa10ddfd1c fix(thread-list): Narrow mode, and new selection rules for three-pane
Summary:
Fix bug in apm_wrapper

Refactor model selection so that it's easier to understand the logic for split vs list mode

Test Plan: Run new specs (WIP)

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1619
2015-06-11 18:00:40 -07:00
Evan Morikawa d7f12873b3 feat(update): autoupdater adds an updateLevel param
Summary:
There's now an `updateLevel` that can be set in the config file.

It has the valid values of "major", "minor", "patch", and "commit". By
default it upgrades on the "patch" level.

If you want to be on the bleeding edge, manually change the config file to
add `updateLevel: 'commit'`

Test Plan: A new `auto-update-manager-spec` :)

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1567
2015-06-11 12:23:31 -07:00
Evan Morikawa 6fcd5f2ced feat(attachments): new attachments & uploads UI with img support
Summary:
Initial styles on attachments ui

More file uploading UI

fix race condition in draft saving

attachments and uploads interweaved

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1610
2015-06-11 12:04:52 -07:00
Ben Gotow 7a62f5ce7d fix(icon-type): Star / unread status should work even when we can't compute "forwarded / replied" icons 2015-06-09 10:35:21 -07:00
Ben Gotow 6221bf1311 fix(fakt): Rename fakt, never try to use the locally installed version (with potentially incorrect baseline) 2015-06-08 17:48:59 -07:00
Ben Gotow 336b9f2c76 fix(composer): Border appearing in inline composer 2015-06-08 17:27:09 -07:00
Ben Gotow 256813208f feat(starring): Star and unstar threads in the thread list
Summary:
When two or more buttons are grouped together, cut the padding off one interior edge so they're spaced more appropriately

Remove source list graphics for active states we aren't using

Starred in the sidebar

Small fix to the feature that keeps the selected item visible as you scroll

Test Plan: No new tests yet

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1607
2015-06-08 17:02:50 -07:00
Ben Gotow 43924e2918 feat(paste): Add files by pasting them into the composer
Summary: You can now add file attachments by pasting them.

Test Plan: Run 3 new specs! We only had specs for sanitization so I added some for the paste event handler as well.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1604
2015-06-08 12:41:31 -07:00
Ben Gotow 92e366653e punt(files): Temporarily disable the files package 2015-06-08 11:22:37 -07:00
Ben Gotow b6730864be fix(test): function execution order seems different on CI server? 2015-06-05 19:25:42 -07:00
Ben Gotow 87dc291327 fix(css): Invalid padding value separated by commas 2015-06-05 18:33:17 -07:00
Ben Gotow 5904381338 fix(mac-build): CSS Linter warnings treated as errors 2015-06-05 18:22:11 -07:00
Ben Gotow 1bd8767a77 fix(iframes): Contextual menus for email contents
Summary: Fixes T1191

Test Plan: No new tests to see here.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1191

Differential Revision: https://phab.nylas.com/D1603
2015-06-05 16:47:30 -07:00
Ben Gotow fb3f7fc410 feat(scrollbars): Custom scrollbars via ScrollRegion
Summary:
ScrollRegion with support for tooltips shown as you scroll, custom tooltips for thread list and message list.

fix(specs): all other scrollbars hidden to prevent incompatibility

fix scrollbar sizing when used in conjunction with resizableregion

Test Plan: Need to write tests and docs for ScrollRegion - no tests yet

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1597
2015-06-05 11:50:55 -07:00
Ben Gotow bc916a2530 feat(theming): Definitely not hacker mode. I don't know what you're talking about.
Summary: Add docs for new RetinaImg modes

Test Plan: Not much to test, except that it looks good!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1595
2015-06-05 11:40:44 -07:00
Ben Gotow ded4da1505 fix(draft-speed): Optimize draft creation and reduce scroll / focus delays
Summary:
This diff attempts to improve the responsiveness of the app when you hit "Reply". This is achieved by being smarter about creating the draft and loading it into the draft store, and also by allowing the compose* actions to take objects instead of just IDs (resulting in a fetch of the object).

Allow Actions.composeReply,etc. to optionally be called with thread and message objects instead of IDs. This prevents a database lookup and the data is "right there."

Create DraftStoreProxy for new drafts optimistically—this allows us to hand it the draft model we just created and it doesn't have to go query for it

When we create a new Draft, immediately bind it to a LocalId. This means that when the MessageStore receives the trigger() event from the Database, it doesn't have to wait while a localId is created

When MessageStore sees a new Message come in which is on the current thread, a draft, and not in the localIds map, assume it's a new draft and shortcut fetchFromCaceh to manually add it to the items array and display. This means the user sees the...

...draft instantly.

Remove delays from focusing draft, scrolling to draft after content is ready. I actually removed these thinking it would break something, and it didn't break anything.... Maybe new Chromium handles better?

Fix specs

Test Plan: Run specs - more in progress right now

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1598
2015-06-05 11:38:30 -07:00
Ben Gotow 503631e685 fix(*): Resolve a variety of small and simple bugs
Summary:
Fix T1822 - saving templates not working, not showing template

Fix T1800 - give composers a minimum size

Fix the bottom bar of the composer so the gray bar goes all the way across in popout mode.

Fix T1825 - switch to a more attractive "June 4, 2015 at 3:10 PM" styling for expanded dates

Remove, rather than hide, react components for text fields in composer. Fixes T1147

Fix specs

Switch to 999+ instead of infinity. Fixes T1768

Fix broken TemplateStore specs

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1147, T1768, T1822, T1800, T1825

Differential Revision: https://phab.nylas.com/D1601
2015-06-05 11:02:44 -07:00
Ben Gotow 89e9cdef8d feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows
Summary:
Features:
- ThreadListParticipants ignores drafts when computing participants, renders "Draft" label, pending design

- Put the WorkspaceStore in every window—means they all get toolbars and custom gumdrop icons on Mac OS X

Bug Fixes:

- Never display notifications for email the user just sent

- Fix obscure issue with DatabaseView trying to update metadata on items it froze. This resolves issue with names remaining bold after marking as read, drafts not appearing in message list immediately.

- When you pop out a draft, save it first and *wait* for the commit() promise to succeed.

- If you scroll very fast, you node.contentWindow can be null in eventedIframe

Other:

Make it OK to re-register the same component

Make it possible to unregister a hot window

Break the Sheet Toolbar out into it's own file to make things manageable

Replace `package.windowPropsReceived` with a store-style model where anyone can listen for changes to `windowProps`

When I put the WorkspaceStore in every window, I ran into a problem because the package was no longer rendering an instance of the Composer, it was declaring a root sheet with a composer in it. This meant that it was actually a React component that needed to listen to window props, not the package itself.

`atom` is already an event emitter, so I added a `onWindowPropsReceived` hook so that components can listen to window props as if they were listening to a store. I think this might be more flexible than only broadcasting the props change event to packages.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1592
2015-06-03 16:02:19 -07:00
Ben Gotow 9236a2289b fix(build): Temporarily disable 'Task' tests Jenkins can't run, and avoid empty ui-variables files 2015-06-03 12:04:43 -07:00
Ben Gotow 2cac5e1edf fix(fakt): Switch to otf fonts with correct baseline, remove hacky styles 2015-06-03 11:07:59 -07:00
Ben Gotow 7ea8b0ea06 add(specs): Empty folders and node_modules in spec fixture to fix specs 2015-06-03 10:23:54 -07:00
Ben Gotow f0f4df6714 add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
Ben Gotow 2b324c4533 feature(package-management): Package management interface, APM integration
Summary:
Update a few more packages to deactivate properly

Miscelaneous fixes

Initial commit of new settings package

WIP

WIP - can load and unload and install / uninstall

Click to create new boilerplate package, package updating

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1582
2015-06-02 19:04:21 -07:00
Ben Gotow 8e8eaf0f7d fix(focus): When composing a forward, focus on the To field.
Summary:
fix specs

This functionality used to work but `component` isn't defined and focus: was failing. Added specs to make sure this doesn't happen again.

Test Plan: Run new specs

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1583
2015-06-01 15:12:18 -07:00
Evan Morikawa 00fe3692e8 Fixes T1751: Make sure composer can't send twice
Summary:
Fixes T1751
Since there's time between clicking "send" and the draft appearing on the
TaskQueue (which is what we use to determine sending state declaratively)
it's possible for it to send twice.

I opted to use `setState` at the Composer View level since I don't think
we should debouce the Action or the Store. It's totally fine for a script
to queue a bunch of messages to send via the queue. We really just want to
stop it at the user intaction level.

Test Plan: There's a test for this now in the composer-spec

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1751

Differential Revision: https://phab.nylas.com/D1576
2015-06-01 11:24:32 -04:00
Ben Gotow 80bf2ed43a fix(T1744): Display attachments when message has no body, additional specs
Summary:
This fixes T1744 and adds specs for the logic in _attachmentComponents.
 - Attachments should display even when the body is an empty string or null
 - Attachments should not include files without names (mime parts of the message)

Test Plan: Run 2 new tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1744

Differential Revision: https://phab.nylas.com/D1566
2015-05-28 18:15:47 -07:00
Evan Morikawa e32a7fe065 Removed invalid Action.notificationDismissed firing
Summary:
If a notification is dismissed manually, the setInterval dismissal is still fired.
         This patch adds a check and removes the notification dismissal action from firing

Test Plan: none

Reviewers: ktalwar, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1218
2015-05-27 12:31:07 -04:00
Evan Morikawa 8a54cd95f0 Fixes T1731: code in iframes renders with white-space: normal
Summary:
Fixes T1731
Chrome by default on a user-agent stylesheet sets white-space to `pre`.
For `pre` elements. This is useful in most cases since whitespace is taken
literally.

Unfortunately when people send out emails with code in them, the `pre`
blocks can get mangled because there may be unnecessary whitespace in
them.

I personally think the default behavior is much better, however, I think
we should have `pre` blocks render with `white-space: normal` because
anyone who's sending an email with code it in will probably use <span> and
<br> and inline styles to ensure it looks correct on most readers. Since
many places (like Outlook) strip whitespace out of HTML, I think we should
mimic that behavior too.

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1731

Differential Revision: https://phab.nylas.com/D1561
2015-05-26 18:47:26 -04:00
Ben Gotow 789228e8f2 fix(notifications): Give notifications tag like HTML5 Notifications so you can de-dupe 2015-05-25 10:27:36 -07:00
Ben Gotow 4cf5e3e825 fix(spellchecking): Turn off spellcheck on email fields 2015-05-22 17:04:37 -07:00
Ben Gotow 310f8ba062 fix(mailto): Handle mailto on application launch, populate NamespaceStore synchronously
Summary:
atom-window `sendMessage` was not the same as `browserWindow.webContents.send`. WTF.

Save current namespace to config.cson so that it is never null when window opens

Don't re-create thread view on namespace change unless the namespace has changed

Tests for NamespaceStore state

Push worker immediately in workerForNamcespace to avoid creating two connections per namespace

Allow \n to be put into sreaming buffer, but only one

Clear streaming buffer when we're reconnecting to avoid processing same deltas twice (because of 400msec throttle)

Make `onProcessBuffer` more elegant—No functional changes

Test Plan: Run tests!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1551
2015-05-21 18:08:29 -07:00
Evan Morikawa 57fc6d61e5 update linter to look at all less files
Test Plan: script/grunt lint

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1549
2015-05-21 14:50:40 -07:00
Ben Gotow 92cf2d520c fix(asar): Support ASAR, and running of specs in prod builds
Summary:
fix(task-queue): Repair the findTask function

Add "ship logs" and "open logs" to the developer menu

Patches for Chromium 42

Test Plan: Run tests!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1547
2015-05-21 14:41:30 -07:00
Evan Morikawa 14c4c215e6 Fixes T1344: composer links fixed 2015-05-20 10:22:03 -07:00
Ben Gotow 8a03009a2b fix(archive): Remove optimizations that were breaking archive... 2015-05-19 19:23:34 -07:00
Ben Gotow 4b84c558cd fix(developer-bar-store): Merge conflict not resolved 2015-05-19 17:22:00 -07:00
Ben Gotow 8599bc0397 feat(logging): Developer bar, verbose logging to logstash, Electron 0.26.0
Summary:
- We now make verbose log files continuously as you use the app
- We ship the logs to LogStash via S3 when an exception occurs
- We log the DatabaseStore, ActionBridge and Analytics packages

- We are now on the latest version of Electron 0.26.0
- We are now on Chrome 42 and io.js 1.4.3
- We should be setup to use ASAR soon.

Update atom.sh to reflect that we're now electron

oniguruma was unnecessary

correctly find log files that haven't been shipped yet

Fix a small issue with nodeIsVisible after upgrade to Chrome 42

Delete old logs, better logging from database store, don't ship empty logs

Test Plan: Run existing tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1531
2015-05-19 17:02:46 -07:00
Evan Morikawa f274bbbf30 fix(composer): polish composer edge cases
Summary:
Fixes T1327
Fixes T1294
Fixes T1307
Fixes T1207

- More robus Undo Manager
- Scrolls to the most recent undo location
- Fixes a variety of bugs when the composer's cursor ends up in an unsupported
location
- Fixes auto-scroll detection at end of content

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1207, T1294, T1307, T1327

Differential Revision: https://phab.nylas.com/D1529
2015-05-19 16:12:39 -07:00
Evan Morikawa 4619871e8d refactor(utils): switch to regular underscore
Summary:
Fixes: T1334

remove final InboxApp references

move out all underscore-plus methods

Mass find and replace of underscore-plus

sed -i '' -- 's/underscore-plus/underscore/g' **/*.coffee
sed -i '' -- 's/underscore-plus/underscore/g' **/*.cjsx

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1534
2015-05-19 16:06:59 -07:00
Ben Gotow 3af6c45387 fix(initial-sync): Make initial sync more robust, show progress, retry on failure
Summary:
Rename ActivityBar => DeveloperBar

Expose sync workers and make them observable

New activity sidebar that replaces momentary notifications

Updated specs

Test Plan: Run new specs!

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1131

Differential Revision: https://phab.nylas.com/D1521
2015-05-19 15:59:37 -07:00
Ben Gotow 1e4aefcebb fix(iframes): Closes T1289—re-attach iFrame event listeners after doc.open
Summary: Re-order the header and toolbar so that the search dropdown appears correctly

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1524
2015-05-19 15:49:28 -07:00
Evan Morikawa ab713b5fac refactor(draft): clean up draft store session proxy logic
Summary:
This is an effort to make the logic around the process of sending a draft
cleaner and easier to understand.

Fixes T1253

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1253

Differential Revision: https://phab.nylas.com/D1518
2015-05-19 12:07:08 -07:00
Ben Gotow 1d03939888 [naming] Nylas Mail => Nylas, Nilas => Nylas 2015-05-18 19:21:54 -07:00
Evan Morikawa 0fa6ccd9e2 fix(draft): drafts order newest to oldest
Summary: Fixes T1192: Allow ordering in database view. Fixes draft list ordering

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1192

Differential Revision: https://review.inboxapp.com/D1514
2015-05-15 13:16:34 -07:00
Ben Gotow f7b4bb4f12 InboxAPI => NylasAPI 2015-05-15 11:12:03 -07:00
Ben Gotow 29c3e2993b Move atom.inbox => {NylasAPI} = require 'nylas-exports'
Conflicts:
	spec-nylas/tasks/file-upload-task-spec.coffee
2015-05-15 11:09:24 -07:00
Ben Gotow 91edef9f7a fix(naming): Move atom/inbox/nilas refs to Nylas
Conflicts:
	internal_packages/inbox-activity-bar/lib/activity-bar-long-poll-item.cjsx
2015-05-15 11:07:28 -07:00
Ben Gotow b0aabf377e fix(paste): Don't paste html with surrounding line breaks
Summary: This resolves T1187 — pasting plain text and html now work pretty well

Test Plan: Run new test case

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1187

Differential Revision: https://review.inboxapp.com/D1511
2015-05-15 10:56:40 -07:00
Ben Gotow e42e683f06 fix(T1242): Warn when sending an empty body, or a body that is all quoted text and not a forward.
Summary: Resolves T1242

Test Plan: Run new tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1242

Differential Revision: https://review.inboxapp.com/D1509
2015-05-15 10:53:22 -07:00
Evan Morikawa f1cec289af fix(*): fix draft preparing
Summary:
Fixes T1162: Search no longer lowercases

Fixes T1212: Selection anchor nodes are restored properly

Fixes T1254: Make sessionForLocalId return a promise

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Maniphest Tasks: T1263, T1212, T1162, T1254

Differential Revision: https://review.inboxapp.com/D1512
2015-05-15 10:45:18 -07:00
Evan Morikawa 8941eb791e feat(salesforce): add Lead and Contact syncing
Summary:
associating salesforce contacts and leads with Nylas contacts

adding fetcher form salesforce

shows conencted leads and contacts

auto associates acount

fixing salesforce forms

Salesforce composers are styled

fix opportunity association with account on object creation

fix specs

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1507
2015-05-14 14:58:42 -07:00
Ben Gotow e8f7f76080 feat(window-manager): Refactor window code, actually destroy main window when logging out
Summary:
Resolves T1200 and probably others.

This diff moves all the window management / hot loading into a new class called the WindowManager
and also changes the way the app transitions between onboarding and main window. When you log out,
the main window clears config and clearing the config causes the window manager to close the main
window and open the login window. When it detects a token again, it opens the main window.

This means you can't:
- Open the main window from the login window
- Open mailto: links and accidentally see the main window or a composer, since the draft store isn't
  running anywhere.
- Don't need to worry about properly resetting thigns when namespaces change, since the window
  is now actually re-created from scratch with the new auth token.

Be a little more defensive about namespace checks in draft-store

Move window code to window-manager

Rename AtomApplication to just `Application`

Specs fix

Test Plan: Run tests, would be good to have more for this.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1200

Differential Revision: https://review.inboxapp.com/D1501
2015-05-14 14:54:29 -07:00
Ben Gotow 3ba6c7c59a fix(thread-list): Archive performance improvements, white rows fix
Summary:
Debounce changes out of the DatabaseStore to prevent lots of calls to persistModel from flooding the app

Tasks must always call super so they get IDs

The task queue shouldn't save every time it adds/removes a task - there could be hundreds

ActivityBar package is actually surprisingly slow, re-rendering needlessly

setState in MultiselectList sometimes renders immediately. Don't do this, because sometimes we're rendering twice back to back

Remove dead references

Never allow duplicate tags in the tags array

Don't archive threads that already have the archive tag (it doesn't do anything bad, but why bother creating tasks?)

Update DB specs

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1506
2015-05-14 14:12:53 -07:00
Ben Gotow ba00372645 feat(tags): Tags dropdown and new features for Menu and Popover
Summary:
Focused Content Store should notify observers when focused items change, not just when they're reassigned

Popovers should have a `direction` and optional event onOpened

Menu divider documentation was wrong, menus should support checked items by default

Pressing escape in a popover's input should dismiss the popover

Other changes

Remove specs that make no sense anymore

Small tweak to report build breaking. Shouldn't happen often ;)

Test Plan: Run tests, which will now phone home if they break

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1493
2015-05-13 12:01:41 -07:00
Ben Gotow 60d9fd4816 feat(docs): doc site generation, doc organization into sections, docs for actions and more
Summary: Lots o docs

Test Plan: Run tests, review docs

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1496
2015-05-13 11:44:28 -07:00
Evan Morikawa 36be4cd497 fix(search): can search with a colon character
Summary:
Fixes T1127

For now, colons are taken literally. This means you can't type scoped
searches. This will likely change when search gets re-designed

Test Plan:
SearchBar.cjsx got a test for this. The class needs more tests
edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Maniphest Tasks: T1127

Differential Revision: https://review.inboxapp.com/D1490
2015-05-11 18:07:58 -07:00
Evan Morikawa c65425ab91 fix(composer): pasting into composer sanitizes and preserves whitespace
Summary:
Fixes T1132
Added tests, and an html sanitizer.

Test Plan:
See contenteditable-component-spec.cjsx
edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Maniphest Tasks: T1132

Differential Revision: https://review.inboxapp.com/D1492
2015-05-11 18:07:06 -07:00
Ben Gotow 730ba06c47 fix(unread-notifications): Fix failing tests, add one for "Unknown" sender 2015-05-10 12:21:18 -07:00
Evan Morikawa b78aaf432a fix(thread): support case when email is from nobody 2015-05-08 19:55:32 -07:00
Ben Gotow 0bd303865e fix(friday): Bugs and initial pass at the Today view without content (see summary)
Summary:
Load unread counts from database again, not tags

fix(multiselect-list): Clear selection on esc

fix(onboarding): Make target=_blank links work in onboarding pages

fix(workspace): Items in header and footer regions are in a single column

fix(layout): Critical issue for things not 100% height

fix(activity-bar): Show in dev mode so you know you're in dev mode

fix(quoted-text): Support for #divRplyFwdMsg quoted text marker

Test Plan: Run specs

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1484
2015-05-08 16:36:48 -07:00
Ben Gotow 6dacda4a69 fix(message-list): Resolve exception in delayed findDOMNode 2015-05-07 15:37:55 -07:00
Evan Morikawa 2c60d75050 feat(salesforce): load current user
Summary:
Loads the current user to pre-populate the Salesforce field in the
creators
add tabindex to tokenizing text fields

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1468
2015-05-07 15:28:44 -07:00
Ben Gotow 753936b294 fix(*): Message list container styles, logout exceptions, composer logic cleanup
Summary:
This diff makes a couple changes:

- New drafts are no longer created in the composer component. Draft creation is back in the draft store where it belongs!
  - This means that the Draft List doesn't *always* contain two extra drafts, which are the unopened hot windows.
- Windows never show until they're loaded, which means windows open slowly vs. opening empty. I think the former is preferable but it's easy to change.
- Login window is now sized *before* it's shown instead of afterwards
- The mailto: behavior is now handled by the DraftStore, which gets rid of the whole draftInitialJSON thing that never made any sense.

fix(login) Make login window show at the correct size

logout from edgehill completely

Fix draft delete issue

Don't show windows, hot or cold, until they've loaded

Move logic for responding to mailto links into the draft store

Always fire `windowPropsChanged` after packages load or the window is shown

Show more error codes in red in activity bar

Make sure DraftStoreProxy doesn't interrupt the rendering of the composer with a new draft

Fix account-sidebar scroll issue, maybe?

Test Plan: Run tests!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1479
2015-05-07 14:42:39 -07:00
Evan Morikawa 919fc1d70f fix(salesforce): convert to use new ComponentRegistry 2015-05-01 15:58:25 -04:00
Evan Morikawa 016ea60f3e feat(composer): instant composer
Summary: Fixes to make popout composers load instantly

Test Plan: edgheill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1460
2015-05-01 12:58:51 -04:00
Evan Morikawa 2b253a5c4a fix(lint): fix linter errors with latest land 2015-04-30 18:27:39 -07:00
Ben Gotow 9ffe0d74dd feat(unsafe-components): Wrap injected components, catch exceptions, clean up ComponentRegistry
Summary:
This diff gives the ComponentRegistry a cleaner, smaller API. Instead of querying by name, location or role,
it's now just location and role, and you can register components for one or more location and one or more
roles without assigning the entries in the registry separate names.

When you register with the ComponentRegistry, the syntax is also cleaner and uses the component's displayName
instead of requiring you to provide a name. You also provide the actual component when unregistering, ensuring
that you can't unregister someone else's component.

InjectedComponent and InjectedComponentSet now wrap their children in UnsafeComponent, which prevents
render/component lifecycle problems from propogating.

Existing components have been updated:

1. maxWidth / minWidth are now containerStyles.maxWidth/minWidth
2. displayName is now required to use the CR.
3. containerRequired = false can be provided to exempt a component from being wrapped in an UnsafeComponent.
   This is useful because it's slightly faster and keeps DOM flat.

This diff also makes the "Show Component Regions" more awesome. It displays column regions, since they now
use the InjectedComponentSet, and also shows for InjectedComponent as well as InjectedComponentSet.

Change ComponentRegistry syntax, lots more work on safely wrapping items. See description.

Fix for inline flexbox scenarios (message actions)

Allow ~/.inbox/packages to be symlinked to a github repo

Test Plan: Run tests!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1457
2015-04-30 16:10:15 -07:00