Commit graph

2245 commits

Author SHA1 Message Date
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
0c2cf4044e fix(spectron): Run against built version of the app to avoid timeouts 2015-11-23 18:54:42 -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
mbilker
87bc41f600 fix(travis): Add support for Node 4.2 LTS, C++11
commit 95ab064d24fdaf38a846987b88494a62f9acd87a
Author: mbilker <me@mbilker.us>
Date:   Sat Nov 21 23:31:32 2015 -0500

    fix(travis): use GCC 4.8 on 0.10 and 0.12 due to newer NAN library in dependent packages

commit 92cb159fd99c05729f6c7867c848be7383847a92
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 12 20:42:30 2015 -0500

    fix(travis): switch from node 4.1 to 4.2 and add node 5

commit 973aacfdb7df72f6e3da549087492d8cb4388282
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 23:44:42 2015 -0500

    fix(travis): display gcc version that corresponds to the CC variable

commit 6b4f907719b03924308ee33ad869d498277f15ae
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 23:34:11 2015 -0500

    fix(travis): reenable osx node 0.12 build

commit c3cb97f2db9113140e374aefb8fc71a8d150593d
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 23:33:40 2015 -0500

    add(travis): display gcc version

commit 71f3eb619d2bc7c6bc26bce11792622902ab982e
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 23:28:45 2015 -0500

    fix(travis): set compiler in env declaration

commit 0b694230211bedd8a603810cb7959652e33f3bf1
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 23:25:46 2015 -0500

    fix(travis): print currently used compiler in CC and CXX

commit 9ca898b543b7a97bf77c11837085eb43f18872d1
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 23:22:07 2015 -0500

    fix(travis): install c++11 supported compilers

commit e728ee7de9015e0ac945cadc744e2bca61c0731b
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 23:07:35 2015 -0500

    fix(travis): print clang version, disable frequently failing build configs

commit 8d6cf314b0d23a2e6bee1d6e543ef81dad5f4ffd
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 22:30:48 2015 -0500

    fix(travis): delete npm prefix for node 4.1

commit b7cf33eac8ca07a7013c9248b3e90990b01cec39
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 22:26:20 2015 -0500

    fix(travis): nvm complains on os x about npm prefix

commit 670168e4103cdd2d6eaddd32796dc581d0107a7c
Author: mbilker <me@mbilker.us>
Date:   Thu Nov 5 22:19:25 2015 -0500

    add(travis): test node 4.1 under linux and os x
2015-11-23 17:17:22 -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
8952e7d149 Merge pull request #443 from mbilker/fix-message-body-processor
Do not return when original body is null
2015-11-23 14:13:09 -08:00
Evan Morikawa
b9d6e89879 fix(spec): cleanup N1.sh and make specs fail with exit code 1 2015-11-23 16:00:55 -05: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
Evan Morikawa
05b50fd7bf fix(build): bail if script/bootstrap fails and enhance test output
Have the test output
2015-11-23 14:34:18 -05:00
mbilker
cc77da8b08 fix(store): return early if body is not a string 2015-11-23 14:22:53 -05: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
3d76a944e2 Merge pull request #441 from mbilker/remove-vm-compatibility-layer
cleanup(build): Remove vm-compatibility-layer
2015-11-22 21:37:50 -08:00
mbilker
38d066e163 fix(store): do not return when original body is null 2015-11-21 22:08:40 -05:00
mbilker
5644f84e4a fix(packages): remove vm-compatibility-layer
vm-compatibility-layer was designed to support obsolete APIs in node
v0.11.x of node v0.10.x. It is only used in the build Gruntfile and
nowhere else in the project.
2015-11-21 00:17:27 -05:00
Ben Gotow
a1b3ad8767 feat(dark-mode): Double invert filter for nice dark HTML bodies 2015-11-20 18:53:34 -08:00
Ben Gotow
39a142ddcb fix(message-bodies): Ensure each message body is processed
Relevant for #436
2015-11-20 18:03:47 -08:00
Drew Regitsky
690dca50cb fix(examples): Small fixes for Send Availability plugin 2015-11-20 15:21:58 -08:00
Drew Regitsky
abb6378bd5 fix(examples): revamp/fix Send-Availability, change URL to live Heroku link
Summary:
Several fixes and updates the the Send Availability example package. Switches from
using `electron-safe-ipc` to using `protocol.RegisterStringProtocol` to communicate
with the child window. Changes the URLs in the package from localhost to our live
demo backend.

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2271
2015-11-19 18:16:38 -08:00
Ben Gotow
aaf6132134 fix(events): Avoid webkitMovement deprecations, fixes #428 2015-11-19 16:17:03 -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
32e77e3dec fix(spectron): Update window count spec 2015-11-19 14:42:34 -08:00
Juan Tejada
84739b3acc fix(spectron): Update spectron setup:
- Passes new arguments to spectron.Application
- Updates setup of test suite to wait for application to boot before
specs are run
2015-11-19 12:29:03 -08:00
Evan Morikawa
9ffd940d21 fix(contenteditable): allow valid null events to callbacks 2015-11-19 13:38:19 -05:00
Evan Morikawa
2699888e47 fix(main): globa.resourcePath now resourcePath 2015-11-18 17:41:00 -08:00
Juan Tejada
53bd5ab2d0 ci(spectron): Add support to execute spectron/chrome-driver tests
Summary:
- Sets up spectron test suite inside its own directory and with its own
  dependencies (must run on a build of the app)
- Sets up dummy test
- Adds `run-spectron-specs` grunt task, and adds it to cibuild task
- Cleans up spec tasks code

Test Plan: - Run specs

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2256
2015-11-18 16:36:58 -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
bbd2d67112 fix(contenteditable): Fix undefined callback on plugins 2015-11-18 15:29:42 -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
Juan Tejada
447dc7283e fix(compile-cache): Add .jsx extension to babel compiler module 2015-11-18 13:22:50 -08:00
Juan Tejada
f0c435e2ab fix(compile-cache): Add .jsx extension to be transbiled using babel 2015-11-18 12:35:37 -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
a5256bd56a 🍒(atom): Pull new, cleaner compile cache + index.js 2015-11-17 19:43:08 -08:00
Juan Tejada
52e2c1251e refactor(script/docs): Add comments 2015-11-17 18:09:46 -08:00
Juan Tejada
35991c5786 Add docs script to automatically move output of grunt docs to gh-pages 2015-11-17 18:03:24 -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
5de64331b9 fix(package): revert to upgraded package.json 2015-11-17 16:25:58 -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
72b8bc1853 changelog(0.3.23): Features, fixes in 0.3.23 2015-11-17 10:37:58 -08:00
Ben Gotow
94e0cb97d3 fix(bootstrap): Set apm environment vars to avoid Atom conflicts 2015-11-16 16:42:35 -08:00
Ben Gotow
95c7e763c0 fix(proxyquire): No longer need forked version 2015-11-16 15:43:47 -08:00
Ben Gotow
5e42f57514 fix(proxyquire): Reference http url instead of https 2015-11-16 15:22:27 -08:00
Ben Gotow
ad2d2973cb cleanup(*): We do not support devDependencies as a concept 2015-11-16 11:46:36 -08:00
Ben Gotow
96762647a9 ASAR v0.8, because apparently 0.5 can skip files 2015-11-16 10:02:31 -08:00