Commit graph

821 commits

Author SHA1 Message Date
Ben Gotow b224347e10 docs(notifs): On linux, display a note about Zenity in prefs 2015-12-03 11:36:54 -08:00
Ben Gotow 015e8a5aba fix(autoload-images): Catch images with no extension, add tests 2015-12-03 11:25:26 -08:00
Evan Morikawa c3ecca2692 feat(tests): add integration tests
comment

Adding test harness

Using key strokes in main window test

Tests work now

Clean up argument variables

Rename list manager and get rid of old spec-helper methods

Extract out time overrides from spec-helper

Spectron test for contenteditable

fix spec exit codes and boot mode

fix(spec): cleanup N1.sh and make specs fail with exit code 1

Revert tests and get it working in window

Move to spec_integration and add window load tester

Specs pass. Console logs still in

Remove console logs

Extract N1 Launcher ready method

Make integrated unit test runner

feat(tests): adding integration tests

Summary:
The /spectron folder got moved to /spec_integration

There are now unit tests (the old ones) run via the renamed
`script/grunt run-unit-tests`

There are now integration tests run via the command `script/grunt
run-integration-tests`.

There are two types of integration tests:
1. Tests that operate on the whole app via Selenium/Chromedriver. These
tests have access to Spectron APIs but do NOT have access to any JS object
running inside the application. See the `app-boot-spec.es6` for an example
of these tests. This is tricky because we want to test the Main window,
but Spectron may latch onto any other of our loading windows. Code in
`integration-helper` give us an API that finds and loads the main window
so we can test it

2. Tests that run in the unit test suite that need Spectron to perform
integration-like behavior. These are the contentedtiable specs. The
Spectron server is accessed from the app and can be used to trigger
actions on the running app, from the app. These tests use the
windowed-test runner so Spectron can identify whether the tests have
completed, passed, or failed. Unfortunately Spectron can't access the logs
, nor the exit code of the test script thereby forcing us to parse the
HTML DOM. (Note this is still a WIP)

I also revamped the `N1.sh` file when getting the launch arguments to work
properly. It's much cleaner. We didn't need most of the data.

Test Plan: new tests

Reviewers: juan, bengotow

Differential Revision: https://phab.nylas.com/D2289

Fix composer specs

Tests can properly detect when Spectron is in the environment

Report plain text output in specs

fixing contenteditable specs

Testing slow keymaps on contenteditable specs

Move to DOm mutation

Spell as `subtree` not `subTree`
2015-12-02 13:41:14 -08:00
Ben Gotow fe95af37f8 fix(labels): Allow user to label as spam or trash from the dropdown
Also fixes the sort ordering of standard labels in the category picker. Fixes #555
2015-12-02 11:43:37 -08:00
Yoeri Stessens 44e3f99cc9 Alter the text to a more general approach and run tests
The text is now more in line with other mail clients to minimalize possible confusion between users of multiple mail clients and/or platforms.
2015-12-02 08:23:03 +01:00
Ben Gotow ceb9e2cdb1 feat(keybindings): Show all keybindings in prefs 2015-12-01 18:31:19 -08:00
Evan Morikawa 0ab5886423 refactor(contenteditable): use DOM mutation observers
Summary: This uses DOM mutation observers instead of `onInput`

Test Plan: manual and new integration tests

Reviewers: bengotow, juan

Differential Revision: https://phab.nylas.com/D2291

feat(contenteditable): add bold, underline, etc keymaps

Moving button extensions out of toolbar

Extracted floating toolbar buttons

Convert ContenteditableExtension to new spec

Update packages to use new callback signature

Fix specs
2015-12-01 15:31:03 -08:00
Ben Gotow 6d2f39cd6c fix(tray): On Win32 / Linux click should open main window if closed 2015-12-01 14:46:08 -08:00
Yoeri Stessens da56a9b5c8 Change backspace behavior
There is a setting so that the backspace can delete messages instead of archiving.
I think that backspace must delete the message, but like many other clients, you have the choice.
2015-12-01 17:07:46 +01:00
Juan Tejada 24978b2a4b feat(shortcuts): Add listeners for unread/important keyboard shortcuts
Summary:
- Adds KeyCommandRegions to hook up missing listeners for marking as unread and
  important keyboard shortcuts
- Updates specs

Test Plan: - All tests pass

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2300
2015-11-30 18:29:45 -08:00
Ben Gotow d48fa50654 feat(rsvp): "Quick RSVP" to events recongized by the API 2015-11-30 17:12:45 -08:00
Juan Tejada 9f309d399b update(extensions): Rename DraftStoreExtension and MessageStoreExtension
Summary:
- Rename DraftStoreExtension to ComposerExtension
- Rename MessageStoreExtension to MessageViewExtension
- Rename ContenteditablePlugin to ContenteditableExtension
  - Update Contenteditable to use new naming convention
  - Adds support for extension handlers as props
- Add ExtensionRegistry to register extensions:
  - ContenteditableExtensions will not be registered through the
    ExtensionRegistry. They are meant for internal use, or if anyone wants
    to use our Contenteditable component directly in their plugins.
  - Adds specs
- Refactors internal_packages and src to use new names and new ExtensionRegistry api
- Adds deprecation util function and deprecation notices for old api methods:
  - DraftStore.{registerExtension, unregisterExtension}
  - MessageStore.{registerExtension, unregisterExtension}
  - DraftStoreExtension.{onMouseUp, onTabDown}
  - MessageStoreExtension
- Adds and updates docs

Test Plan: - Unit tests

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2293
2015-11-30 16:08:05 -08:00
Ben Gotow b1c925883d fix(signatures): Monospace font, nested scrolling fix 2015-11-30 14:26:11 -08:00
Evan Morikawa c2beaee006 feat(signatures): add raw signature support 2015-11-30 14:02:58 -08:00
Ben Gotow be491d6cae fix(signatures): Display signatures tab, blur after prefs changes 2015-11-30 13:39:42 -08:00
Evan Morikawa 83b0a4db5f feat(signatures): add signature support
Summary:
Add signatures back in.

Extract contenteditable css to its own file instead of being bundled with
the composer.

Test Plan: manual

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2295
2015-11-30 11:48:24 -08:00
Ben Gotow 6a4613b4a1 feat(prefs): Allow tabs with an accounts submenu
Summary:
This diff:
- Improves the styling of the tabs in the preferences sidebar.
- Adds an optional param to section cofnig that puts an "account" submenu beneath the tab item.
- Renames preferences "sections" => "tabs", and renames the PreferencesSectionStore to PreferencesUIStore. I think we should include "UI" in more of our stores, and I think "tabs" is a good idea because it's unambigious—there's no way you could confuse it for a "section" of the NylasEnv.config tree or think it deals with actually saving prefs.

Test Plan: Inspect visually

Reviewers: evan, juan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2296
2015-11-30 11:43:49 -08:00
Juan Tejada 84adfb3bdf fix(prefs): Focus main window when open prefs and prevent dupe sheets
- Fixes #498
- Fixes #484
2015-11-28 09:08:45 -08:00
Ben Gotow e8878e5ce8 fix(autolinker): Add title attr to all links in emails to display href
Fixes GitHub Issues #479 and #335
2015-11-25 18:29:59 -08:00
Ben Gotow e0e6a288f1 fix(sidebar): selected is not actually a required prop
Fixes #476
2015-11-25 16:30:01 -08:00
Ben Gotow 7605e984c4 fix(license): Mark a few additional packages as GPLv3 2015-11-25 14:41:10 -08:00
Ben Gotow b2c09d005b Merge pull request #453 from dcposch/fix-license
Internal package.json license: GPLv3
2015-11-25 14:37:54 -08:00
Ben Gotow 3fabc31e4d fix(composer): Don't pass a callback to dialog API, update changelog 2015-11-25 14:13:21 -08:00
Ben Gotow bd2dfef7ce fix(attachments): Only preview images up to 5MB, not 10MB 2015-11-24 16:27:07 -08:00
Juan 2bd83f38ff Merge pull request #449 from mbilker/travis-linux-testing
Travis Linux Testing
2015-11-24 12:48:31 -08:00
Juan Tejada 56b62f8b58 fix(lint): Fix linter issues on account-sidebar-section.cjsx 2015-11-24 12:44:06 -08:00
Juan Tejada 468ef439b4 fix(sidebar): Add minor tweaks to sidebar behavior:
- Add default prop to DisclosureTriangle to eliminate warning
- Prevent from firing a new DestroyCategoryTask if category already is
deleted
- Update onBlur event to not close input if I click on the add button
2015-11-24 11:09:00 -08:00
DC 2bd710d668 Internal package.json license: GPLv3
Changed from 'Propietary' to 'GPLv3' to match LICENSE.md
2015-11-24 09:09:33 -08:00
Ben Gotow e0976fde2c bump(electron): 0.34.3 => 0.35.1
Electron 0.35.1 includes the tray fixes we contributed last week but also includes API restructuring and improvements. Most importantly, modules from electron are now imported via `require('electron')`
2015-11-23 22:09:17 -08:00
Ben Gotow fabc047a79 fix(prefs): Minor tweaks, see description
- Make the keymaps panel less wide
- <select>'s now populate their current value properly
- Items should blur after being interacted with so that `esc` still moves you back to parent sheet
2015-11-23 20:34:04 -08:00
mbilker edf5275a22 fix(spec): use correct modifier key based on process.platform 2015-11-23 23:31:37 -05:00
Ben Gotow ad04faab02 fix(account-sidebar): Fix specs to match new unread counts 2015-11-23 20:26:18 -08:00
Ben Gotow 4b75265cdd fix(dark-mode): Adjust email CSS immediately upon switching themes
Fixes #145
2015-11-23 20:20:06 -08:00
Ben Gotow 3fdfbefcb3 fix(sidebar): Swap out + image, tweak CSS for unread 2015-11-23 20:08:10 -08:00
Juan Tejada a9aaab9f38 feat(sidebar): Add sidebar controls to add and remove categories
Summary:
- Refactors account-sidebar internal package:
  - Separates into smaller react components
  - Makes DisclosureTriangle its own independent component
  - Adds data to AccountSidebarStore to allow removal or addition of items for a
    specific section of the sidebar
- Adds button and input and css styles to create categories
- Adds context menu to destroy a category
- Adds new method to CategoryStore to get the icon name for the categories of
  the current account
- Removes some unused code

Test Plan: Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2283
2015-11-23 19:43:56 -08:00
Ben Gotow 522ad2da79 fix(theme): Improve styling of popout composer in dark mode 2015-11-23 18:28:30 -08:00
Ben Gotow 6b6a61f455 fix(copy): Call split / list modes "Single Panel / Two Panel"
Fixes T5907
2015-11-23 17:34:56 -08:00
Ben Gotow b2f8b34a32 feat(counts): Unread counts for all folders and labels across all accounts
Summary:
This diff replaces the UnreadCountStore with a better approach that is able to track unread counts for all folders/labels without continuous (and cripplingly slow) SELECT COUNT(*) queries.

When models are written to the database, we currently don't send out notifications with the "previous" state of those objects in the database. This makes it hard to determine how to update counters. (In the future, we may need to do this for live queries). Unfortunately, getting the "previous" state is going to be very hard, because multiple windows write to the database and the "previous" state we have might be outdated. We'd almost have to run a "SELECT" right before every "REPLACE INTO".

I created an API that allows you to register observers around persistModel and unpersistModel. With this API, you can run queries before and after the database changes are made and pluck just the "before" state you're interested in.

The `ThreadCountsStore` uses this API to determine the impact of persisting a set of threads on the unread counts of different labels. Before the threads are saved, it says "how much do these thread IDs contribute to unread counts currently?". After the write is complete it looks at the models and computes the difference between the old count impact and the new count impact, and updates the counters.

I decided not to attach the unread count to the Label objects themselves because 1) they update frequently and 2) most things observing the DatabaseStore for categories do not care about counts, so they would be updating unnecessarily.

The AccountSidebar now listens to the ThreadCountsStore as well as the CategoryStore, and there's a new preference in the General tab for turning off the counts.

Test Plan: Tests are a work in progress, want to get feedback first!

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2232
2015-11-23 17:12:22 -08:00
Ben Gotow 599d8f834f fix(prefs): Move to a sheet rather than a window, use configSchema
Summary:
This diff moves the preferences interface to a sheet in the main window, with the following benefits:
- We can put any sort of React control in it (no ReactRemote)
- It's not strange for the interface to scroll
- Since it can scroll, it's safe to auto-generate preferences for plugins based on their package config schema.

The general tab is now mostly based on the config schema, with the exception of the "Workspace" and "Layout" bits.

The other tabs are still manual, and should be polished more.

Test Plan: No new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2278
2015-11-23 12:20:51 -08:00
Juan Tejada ea97d94226 fix(tray): Prevent duplicate trays on preference changes 2015-11-23 09:53:05 -08:00
Juan Tejada b3a9f31051 fix(tray): Prevent system tray from being initialized more than once
- Makes sure the tray is deactivated before activating
2015-11-23 09:31:10 -08:00
Ben Gotow a1b3ad8767 feat(dark-mode): Double invert filter for nice dark HTML bodies 2015-11-20 18:53:34 -08:00
Juan Tejada 39a52f4535 feat(sidebar): Add behavior to persist collapsed state of sidebar items
Summary:  - Updates account sidebar to persist collapsed state to the the config

Test Plan:  - manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2276
2015-11-19 15:48:44 -08:00
Juan Tejada 5be36f8572 fix(specs): Update composer-view-spec to use renamed functions 2015-11-18 15:51:48 -08:00
Juan Tejada c2ce51ae0c fix(composer): Fix several composer issues and refactor Contenteditable
Summary:
  - Fixes T5819 issues
  - Adds ContenteditbalePlugin mechanism to allow extension of Contenteditable
    functionality, and completely removes lifecycleCallbacks from Contenteditable
  - Refactors list functionality outside of Contenteditable and into a plugin
  - Updates ComposerView to apply DraftStoreExtensions through a ContentEditablePlugin
  - Moves spell checking logic outside of Contenteditable into the spellcheck package

Fixes T5824 (atom.assert)
Fixes T5951 (shift-tabbing) bullets

Test Plan: - Unit tests and manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T5951, T5824, T5819

Differential Revision: https://phab.nylas.com/D2261
2015-11-18 15:22:31 -08:00
Ben Gotow b3845e675e fix(search): Execute search for subject, autoselect first item
Fixes T5899, but we may want to iterate on it more later.
2015-11-18 12:35:19 -08:00
Evan Morikawa 43c4859592 fix(draft): fix showing of incorrect body when pending send
Summary: Fixes T3712

Test Plan: new tests

Reviewers: juan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3712

Differential Revision: https://phab.nylas.com/D2273
2015-11-18 12:32:07 -08:00
Ben Gotow 285a60493e fix(specs): Ternary operator in jasmine-helper was valid coffee... 2015-11-17 17:48:32 -08:00
Ben Gotow a5013c0bbd fix(specs): Update specs following 0.29.2 > 0.34.3 move 2015-11-17 17:40:06 -08:00
Evan Morikawa 51602f69a5 refactor(env): new NylasEnv global
Converted all references of global atom to NylasEnv

Temporary rename atom.io

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.io/temporaryAtomIoReplacement/g'

atom.config to NylasEnv.config

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.config/NylasEnv.config/g'

atom.packages -> NylasEnv.packages

atom.commands -> NylasEnv.commands atom.getLoadSettings

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.commands/NylasEnv.commands/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getLoadSettings/NylasEnv.getLoadSettings/g'

More common atom methods

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.styles/NylasEnv.styles/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.emitError/NylasEnv.emitError/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.inSpecMode/NylasEnv.inSpecMode/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.inDevMode/NylasEnv.inDevMode/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getWindowType/NylasEnv.getWindowType/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.displayWindow/NylasEnv.displayWindow/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.quit/NylasEnv.quit/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.close/NylasEnv.close/g'

More atom method changes

find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.keymaps/NylasEnv.keymaps/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.hide/NylasEnv.hide/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getCurrentWindow/NylasEnv.getCurrentWindow/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.menu/NylasEnv.menu/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getConfigDirPath/NylasEnv.getConfigDirPath/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.isMainWindow/NylasEnv.isMainWindow/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.finishUnload/NylasEnv.finishUnload/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.isWorkWindow/NylasEnv.isWorkWindow/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.showSaveDialog/NylasEnv.showSaveDialog/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.append/NylasEnv.append/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.confirm/NylasEnv.confirm/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.clipboard/NylasEnv.clipboard/g'
find -E . -regex ".*\.(coffee|cjsx|js|md|cmd|es6)" -print0 | xargs -0 sed
-i "" 's/atom.getVersion/NylasEnv.getVersion/g'

More atom renaming

Rename atom methods

More atom methods

Fix grunt config variable

Change atom.cmd to N1.cmd

Rename atom.coffee and atom.js to nylas-env.coffee nylas-env.js

Fix atom global reference in specs manually

Fix atom requires

Change engine from atom to nylas

got rid of global/nylas-env

rename to nylas-win-bootup

Fix onWindowPropsChanged to onWindowPropsReceived

fix nylas-workspace

atom-text-editor to nylas-theme-wrap

atom-text-editor -> nylas-theme-wrap

Replacing atom keyword

AtomWindow -> NylasWindow

Replace Atom -> N1

Rename atom items

nylas.asar -> atom.asar

Remove more atom references

Remove 6to5 references

Remove license exception for atom
2015-11-17 16:41:20 -08:00
Evan Morikawa 46ee3d8cc8 fix(docs): fix docs so they compile properly. 2015-11-17 15:48:59 -08:00
Ben Gotow 3a16484d7d fix(tray): Retina tray icon with template image for dark menu bar mode 2015-11-17 15:36:52 -08:00
Ben Gotow 74252d58d9 bump(️): Electron 0.29.2 > 0.34.3, Sqlite 3.0.11 > 3.1.1 2015-11-17 15:36:32 -08:00
Ben Gotow c34747c03c fix(tray): Slightly resize win/linux tray icons 2015-11-14 13:10:39 -08:00
Juan Tejada 6786e0ae04 fix(lint): Remove lint errors 2015-11-13 19:41:53 -08:00
Ben Gotow 27ae261d1b fix(tray): "Open Inbox" if main window is minimized / hidden 2015-11-13 18:11:44 -08:00
Ben Gotow 53bca8e2f5 fix(category-picker): vertical alignment of labels/folders icon 2015-11-13 17:42:10 -08:00
Ben Gotow 697b3855bf fix(dropdowns): 3% darken on hover, not full blue 2015-11-13 16:58:55 -08:00
Ben Gotow 5b24e22cbd fix(search): Prevent search from hitting X button 2015-11-13 16:10:49 -08:00
Ben Gotow fb6ea89491 fix(sidebar): Don't capitalize every word in label names. #401
Fixes #401
2015-11-13 09:45:19 -08:00
Juan Tejada 4a4c60bafc fix(system-tray): prevent duplicate menu item on darwin 2015-11-11 13:44:37 -08:00
Ben Gotow d28e84d95a undo(prefs): atom.keymaps does not implement unsubscribe 2015-11-11 10:20:48 -08:00
Ben Gotow 683ef61c1f fix(prefs): atom.keymaps does not implement unsubscribe
https://github.com/atom/atom-keymap/issues/101
2015-11-09 21:44:59 -08:00
Ben Gotow 0ab065aab3 fix(specs): Remove loading cover in spec window 2015-11-09 20:53:17 -08:00
Ben Gotow 7d7ba4fbba fix(ui-dark): Small color adjustments, resolves #299, #148 2015-11-09 18:52:24 -08:00
Ben Gotow 04be333f3f fix(account-switcher): Dark content mode, closes #382 2015-11-09 18:15:27 -08:00
Ben Gotow bbea8beee5 fix(feedback): Move feedback window creation to app process
Prevents cross-window callbacks that are preventing the app from quitting
2015-11-09 12:15:24 -08:00
Ben Gotow a4df144dbf fix(autoload-images): Check to see if whitelist exists 2015-11-09 12:15:24 -08:00
Evan Morikawa 119da453e1 feat(selection): add selection of read, unread, starred, etc
Summary:
Can select all, deselect-all, read, unread, starred, unstarred.

Yes, it's not REALLY select "all", but it uses the items in the current
`retainedRange`. This is actually similar to what gmail does (only selects
on the first page of a 100).

Test Plan: new test

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2241
2015-11-09 10:03:55 -05:00
Juan Tejada fe8767fc0b fix(keymaps): create user keymaps file in .nylas/ if non existent 2015-11-06 19:01:31 -08:00
Ben Gotow f152cca4d6 feat(reading): Disable autoloading of images, opt-in one by one
Summary: This diff implements Gmails "load images, always load images from bengotow@gmail.com" option. Someone asked for it late last night and I figured it'd be fun to add. We also needed to refactor the MessageItem to allow for a GPG plugin - MessageItems now subscribe to the body of the message from the messageBodyProcessor, so in the event that processing rules change, someone can invalidate the processor cache by calling `resetCache()`, and then it recomputes bodies and triggers a refresh of each message body.

Test Plan: Updated existing tests, no new tests for this plugin just yet.

Reviewers: evan, juan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2235
2015-11-06 15:53:21 -08:00
Evan Morikawa 55d3e92f50 feat(keymap): add cmd+1, cmd+2, etc to quick-select accounts
Fix "unique key" for react props

Fix composer styling bug in popout composer
2015-11-06 14:38:50 -08:00
Juan Tejada 66252fc7bc fix(system-tray): properly deactivates package 2015-11-06 13:52:08 -08:00
Evan Morikawa 6588da7f33 fix(signatures): temporarily disable signatures in preferences 2015-11-06 12:40:34 -08:00
Evan Morikawa 0fae7ce13c fix(specs): fix specs 2015-11-06 12:08:32 -08:00
Evan Morikawa 37e3fe0f45 feat(keymap): add new <KeymapHandlers />
Summary:
Refactor keymaps to wrap components with a <KeymapHandlers /> component.
This more Reactful way of declaring keyback handlers prevents us from
needing to subscribe to `atom.commands`

Test Plan: new tests

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2226
2015-11-06 11:47:06 -08:00
Juan Tejada a6c44b8529 feat(system-tray): add system-tray package
Summary:
- Updates support for ES6 code inside packages
- Displays system tray icon with unread count on darwin, or with bubble on other platforms
- Uses canvas api to dynamically generate icon image given unread count:
  - Adds CavasUtils.canvasFromImgAndText to do this
- Adds config option to display system tray icon on darwin

Test Plan: Need to write the tests for this.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2231
2015-11-06 11:12:38 -08:00
Ben Gotow dc538930a7 fix(search): Allow typing in the middle of the search text 2015-11-04 17:11:40 -08:00
Ben Gotow c1bf8ae026 fix(deltas): Use the official API to create cursors 2015-10-30 22:20:41 -07:00
Evan Morikawa eea25a307d fix(composer): support Chinese & others - handle composition events
Summary:
ignores composition event commands until they're done. We then simply
update the new state after that happens.

Some additional refactoring:

- The <Contenteditable /> prop is 'value' instead of 'html' to make it
  look more like a standard React controlled input
- Removed `filters` prop and `footerElements` prop from Contenteditable.
  These could easily be moved into the composer (where they belong).
- Moved contenteditable and a few of its helper classes into their own
  folder.
- Moved `UndoManager` up out of the `flux` folder into `src`. Currently
  undo/redo is only in the composer when all contenteditables should have
  the basic funcionality. Will refactor this later.
- Fix tests

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2211
2015-10-30 20:03:33 -04:00
Ben Gotow 6bee127134 feat(shortcuts): Pageup/dn in message list, shift+pageup/dn in thread list 2015-10-29 20:34:43 -07:00
Ben Gotow 538af665cf fix(sp): It's => its 2015-10-29 19:35:31 -07:00
Evan Morikawa cc61aa7811 feat(signatures): add signature support in preferences
Summary:
Adding signature support in preferences

Extracting out DraftStore extensions from the Contenteditable component

Moved Contenteditable to the nylas component kit

Build react remote window selection synchronization.

Test Plan: todo

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2204
2015-10-29 17:20:41 -04:00
Ben Gotow 62d45698d1 fix(thread-list): Line up sender, subject and snippet
Fixes GitHub issue #278
2015-10-29 11:30:06 -07:00
Ben Gotow 29cc5853b3 feat(notifs): Native notifications for Mac OS X, Win coming
Summary: Replaces `new Notification`-based HTML5 notifications with system native notifications on Mac OS X. This allows us to implement the "Reply" button in the notifications. This will also serve as the hook for native Windows notifications, which are unsupported in Chromium.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2199
2015-10-29 11:23:51 -07:00
Ben Gotow 8f13b71403 fix(notifs): Make sure notifs always have thread references
Summary:
This started as a fix to https://sentry.nylas.com/sentry/edgehill/group/2970/, which was caused by `threads[msg.threadId]?.categoryNamed('inbox') isnt null`, because `undefined isnt null`.

Then I realized that we batch "incoming" messages and threads arbitrarily, and the reason this happened is because the thread and message were split into different delta updates. Previously, notifications would just have been skipped.

Now we call `_onNewMessagesMissingThreads` when threads cannot be found for new messages, and then try to find the threads again in 10 seconds. If we can find them, we simulate a delta call and run them back through the processor. It would have been simpler to call `_onNewMailReceived` again directly, but I want to be 100% sure we never create infinite loops.

Test Plan: Run new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2188
2015-10-28 16:55:35 -07:00
Evan Morikawa 985a8b55fe fix(ui): better unread count box
Smaller box that sits next to item.
Drafts is now no longer a strong color
Fixes T3535
2015-10-28 18:50:04 -04:00
Ben Gotow 6bbe9308cf fix(notifications): Buttons always triggered default action 2015-10-28 10:47:44 -07:00
Ben Gotow edaf751c3b feat(changelog): Link to changelog before and after updates
Summary: Link to the changelog, and add a new notification which appears after updates are installed

Test Plan: No tests to see here..

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2201
2015-10-27 16:48:05 -07:00
Ben Gotow 08e2e7581a fix(onboarding): Check code format before hitting API 2015-10-27 16:43:07 -07:00
Ben Gotow 0ff48ca9a6 rm(composer): Dead code related to Scribe / Bower 2015-10-27 11:38:39 -07:00
Ben Gotow 43c43a6bf5 fix(search): New X, focus styling for search
Fixes T3485
2015-10-27 11:28:11 -07:00
Ben Gotow 69e4ba32ac fix(files): Not-yet-downloaded files can be opened via double click
Fixes T4840
2015-10-27 11:05:33 -07:00
Ben Gotow 703b9decfa fix(onboarding): Request /status/ to avoid 302 2015-10-27 10:50:18 -07:00
Ben Gotow 2ddfb1595a fix(prefs): Fix overflow of account names. #175 2015-10-26 10:47:47 -07:00
Ben Gotow 09ed1ea415 fix(prefs): Guard against null account in preferences window 2015-10-26 10:47:47 -07:00
Ben Gotow 5c5c1e98c1 fix(drafts): Draft selection / deletion fixes 2015-10-23 16:04:27 -07:00
Ben Gotow 528224a184 fix(sidebar): Better disclosure triangle position on multiline labels / folders 2015-10-23 16:04:27 -07:00
Evan Morikawa 7711ec533e fix(onboarding): fix add account button width 2015-10-23 15:21:58 -07:00
Ben Gotow 992b90d969 fix(message-list): Clicking Archive or Trash should pop back to the thread list 2015-10-23 15:21:37 -07:00