Commit graph

67 commits

Author SHA1 Message Date
Ben Gotow af67597f0b feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:

- The preferences package has a new tab which allows you to edit
  mail filters. Filters are saved in a new core store, and a new
  stock component (ScenarioEditor) renders the editor. The editor
  takes a set of templates that define a value space, and outputs
  a valid set of values.

- A new MailFilterProcessor takes messages and creates tasks to
  apply the actions from the MailFiltersStore.

- The worker-sync package now uses the MailFilterProcessor to
  apply filters /before/ it calls didPassivelyReceiveNewModels,
  so filtrs are applied before any notifications are created.

- A new task, ReprocessMailFiltersTask allows you to run filters
  on all of your existing mail. It leverages the existing TaskQueue
  architecture to: a) resume where it left off if you quit midway,
  b) be queryable (for status) from all windows and c) cancelable.
  The TaskQueue is a bit strange because it runs performLocal and
  performRemote very differently, and I had to use `performRemote`.
  (todo refactor soon.)

This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.

Test Plan: Run tests, only for actual filter processing atm.

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2379
2015-12-23 02:19:32 -05:00
Drew Regitsky 4a2d0a64f6 fix(quickschedule): Several UI fixes
Summary:
Fixes a number of smaller UI issues. Fixes T6173, T6207
Full list of changes:
 - Ensure time slots / days display in order
 - Allow time blocks of any size to be set on half hour intervals
 - Don't reset calendar when changing event length
 - Expand calendar on window resize
 - Change window title from "Electron"
 - Add delete button to cancel individual calendar events
 - Move event details box to the left side
 - Prevent addition of duplicate time slots

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T6173, T6207

Differential Revision: https://phab.nylas.com/D2333
2015-12-09 16:41:30 -08:00
Ben Gotow cc7b457bdd polish(quick-schedule): Use calendar icon in the composer 2015-12-09 10:55:08 -08:00
Ben Gotow 4be4508252 fix(translate): Use an icon for the translate button 2015-12-08 17:56:42 -08:00
Ben Gotow 7f88e3e409 fix(templates): Example now depends on underscore 2015-12-07 17:33:51 -08:00
Ben Gotow d115869667 fix(templates): Unregister preferences tab when disabled 2015-12-07 17:23:59 -08:00
Ben Gotow b00e5439e5 feat(paste): Paste accepts more HTML, paste and match style now available
Summary:
Related to #320, #494, #515, #553

Ignore newlines and returns in HTML, they can be inside tags

Allow all attributes so that paste from excel looks nice

Never let someone paste a `contenteditable` attribute

Update specs

Test Plan: Run new specs

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2309
2015-12-07 15:34:03 -08:00
Ben Gotow 7f87ffbe17 fix(license): GPLv3 => GPL-3.0 2015-12-07 10:50:47 -08:00
Juan Tejada ef7266d362 update(examples): Update examples to use new ExtensionRegistry api
- Remove deprecated use of DraftStoreExtension and DraftStore.register
2015-12-05 01:07:38 -08:00
Drew Regitsky 20c522ed39 feat(templates-plugin): Add prefs page with template editor, fix bugs.
[Composer Templates / Quick Reply plugin example]

Add a page to preferences with a basic editor for quick reply templates,
allowing add, delete, and edit (HTML and rendered text), with instructions
for how to add variable regions. Add methods to TemplatesStore to enable
these. Fix issues in plugin with quoted text handling, name conflicts,
`this` scoping.
2015-12-02 21:28:49 -08:00
Drew Regitsky 786304872a fix(examples): small fixes in READMEs 2015-12-01 15:59:00 -08:00
Drew Regitsky 589972c555 fix(examples): Small fixes to QuickSchedule plugin 2015-12-01 15:35:31 -08:00
Michael Grinich 10d607080c Update README.md 2015-11-30 18:37:24 -08:00
Michael Grinich c156e11b98 Update README.md 2015-11-30 18:36:52 -08:00
Michael Grinich 33266a2e1f add example images 2015-11-30 18:35:44 -08:00
Michael Grinich a06e09f27f Update README.md 2015-11-30 18:33:17 -08:00
Michael Grinich b518099257 Update README.md 2015-11-30 18:33:03 -08:00
Juan Tejada cfdc401c54 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
Evan Morikawa f9dd31b94c 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 eeb976167e fix(license): Mark a few additional packages as GPLv3 2015-11-25 14:41:10 -08:00
Ben Gotow 942f29c7e5 futureproof(packages): Give all example packages engine version range 2015-11-24 17:51:12 -08:00
Drew Regitsky b520dcbb25 fix(examples): small fixes in translate and personal-level plugins 2015-11-24 17:29:56 -08:00
Drew Regitsky c9faea9ec6 fix typo 2015-11-24 16:54:18 -08:00
Drew Regitsky bf18b11504 fix(examples): change download instructions in QuickSchedule plugin readme 2015-11-24 16:50:06 -08:00
Drew Regitsky 651a82287b fix(examples): remove buggy main.css from quick-schedule plugin 2015-11-24 16:15:51 -08:00
Drew Regitsky e6e506805b fix(examples): remove autogenerated source from quickschedule plugin 2015-11-24 15:35:55 -08:00
Drew Regitsky 5d685a3e0a fix(examples): change nylas version in QuickSchedule plugin example 2015-11-24 11:23:46 -08:00
Michael Grinich aa1f87bdde Update README.md 2015-11-24 10:34:47 -08:00
Michael Grinich c3603873e0 add screenshot 2015-11-24 10:31:49 -08:00
Michael Grinich fe0a4c70ea Update README.md 2015-11-24 10:28:07 -08:00
Drew Regitsky 82a85ddaf4 fix(examples): change quickschedule plugin backend URL to updated version 2015-11-24 00:30:29 -08:00
Drew Regitsky 9f75640825 refactor(examples): Rename Send-Availability to QuickSchedule 2015-11-24 00:09:59 -08:00
Drew Regitsky ef00799392 fix(examples): better styles in Send-Availability example plugin 2015-11-24 00:04:49 -08:00
Ben Gotow 528c8850ce 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
Drew Regitsky d1e9b93b64 fix(examples): Small fixes for Send Availability plugin 2015-11-20 15:21:58 -08:00
Drew Regitsky 92820fc3d2 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
Evan Morikawa 488dff0f90 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 bab3c18bd4 fix(docs): fix docs so they compile properly. 2015-11-17 15:48:59 -08:00
Juan Tejada 7b18f43eab Convert Composer Template example to ES6
Summary:
- Include ES6 files in spec-suite
- Fix template store specs
- Refactors TemplateStore a little bit to adjust to specs
- Convert coffe .cjsx files to ES6 .jsx files
- Fix TemplateDraftStoreExtension functions
- Update ComposerTemplates example README

Test Plan: - Plugin unit tests

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2250
2015-11-14 22:12:06 -08:00
Evan Morikawa 455b418d6f 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
Evan Morikawa 6c0370d7a8 feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
Ben Gotow e09d3e3e75 feat(trash): Trash for Gmail, and architectural changes for common tasks
Summary:
This diff centralizes logic for creating common tasks for things like moving to trash, archive, etc. TaskFactory exposes a set of convenience methods and hides the whole "and also remove the current label" business from the user.

This diff also formally separates the concept of "moving to trash" and "archiving" so that "remove" isn't used in an unclear way.

I also refactored where selection is managed. Previously you'd fire some action like archiveSelection and it'd clear the selection, but if you selected some items and used another method to archive a few, they were still selected. The selection is now bound to the ModelView as intended, so if items are removed from the modelView, they are removed from it's attached selection. This means that it shouldn't /technically/ be possible to have selected items which are not in view.

I haven't refactored the tests yet. They are likely broken...

Fix next/prev logic

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2157
2015-10-21 10:38:00 -07:00
Ben Gotow bb3b5bb875 fix(send-availability): Make the package load into popout composers 2015-10-07 11:45:46 -07:00
Malone Hedges b4abb79397 Fix little typo 2015-10-06 00:10:08 -07:00
dillon 6cf6f9087e fix(phishing-detection): undefined messages no longer throws exception
Summary: fixes T4078

Test Plan: manual

Reviewers: bengotow

Maniphest Tasks: T4078

Differential Revision: https://phab.nylas.com/D2111
2015-10-05 14:36:48 -07:00
Michael Grinich f04682031c actually no more gh-pages 2015-10-05 05:08:53 -07:00
Ben Gotow c7dec996d3 fix(readmes): Add "Install this plugin" bits to the plugin READMEs 2015-10-04 00:42:54 -07:00
Ben Gotow 272d9514ca fix(sync): Request all labels / folders to avoid paging and missing inbox 2015-10-03 23:53:59 -07:00
Ben Gotow ecf557ce31 fix(icons): New artwork for a few initial packages, labels 2015-10-03 23:34:43 -07:00
Ben Gotow 94bdcc6900 feat(templates): Final examples package is in - templates! 2015-10-03 14:05:47 -07:00