💌 A beautiful, fast and fully open source mail client for Mac, Windows and Linux.
Go to file
Ben Gotow f4b04614a7 feat(signatures): Initial signature support
Summary:
- Draft Store extensions can now implement `prepareNewDraft` to have an opportunity to change a draft before it's displayed for the first time.

- When composers are torn down, they delete their draft if it is still pristine. This makes the behavior of closing unedited popout drafts the same as leaving unedited inline drafts.

- The DraftStoreProxy keeps the initial body of the draft *if* it started in a pristine state. This means "is the body empty" is just a simple == check, and it takes into account anything added to the body by extensions.

- Calling Actions.destroyDraft doesn't blow up anymore if the draft session can't be found. This was a bug and meant that you couldn't destroy drafts which hadn't been previously edited, and also meant that bad things(tm) happened when you called destroyDraft twice, which seemed like overkill.

- DestroyDraft task now exits gracefully when the draft cannot be found.

You can test this feature by adding the following to your config.cson:

```
  signatures:
     NAMESPACEID: "<br/><br/><div id=\"Signature\"><div id=\"divtagdefaultwrapper\" style=\"font-size:12pt; color:#000000; background-color:#FFFFFF; font-family:Calibri,Arial,Helvetica,sans-serif\"><p></p><table border=\"0\" cellpadding=\"0\" cellspacing=\"0\" width=\"450\" style=\"font-family:'Times New Roman'; table-layout:fixed\"><tbody><tr><td class=\"logo-td\" align=\"left\" valign=\"top\" width=\"76\"><p style=\"margin-bottom:10px; margin-right:10px; font-family:Helvetica,Arial,sans-serif; font-size:14px; line-height:16px\"><a href=\"http://www.nylas.com/\" class=\"clink logo-container\" style=\"text-decoration:none\"><img alt=\"Nylas\" border=\"0\" class=\"sig-logo\" height=\"80\" width=\"66\" style=\"-webkit-user-select: none;\" src=\"https://s3-us-west-2.amazonaws.com/nylas-static-assets/nylas-email-signature.png\"></a></p><p class=\"social-list\" style=\"font-size:0px; line-height:0; font-family:Helvetica,Arial,sans-serif\"></p></td><td align=\"left\" valign=\"top\" nowrap=\"nowrap\" class=\"spacer-td\" width=\"16\" style=\"border-left-width:2px; border-left-style:solid; border-left-color:rgb(30,162,162)\"><img width=\"10\" style=\"-webkit-user-select: none;\" src=\"https://s3.amazonaws.com/htmlsig-assets/spacer.gif\"></td><td align=\"left\" valign=\"top\" nowrap=\"nowrap\" class=\"content-td\" width=\"368\"><div class=\"content-pad\"><p style=\"font-family:Helvetica,Arial,sans-serif; font-size:14px; line-height:16px; color:rgb(33,33,33); margin-bottom:10px\"><span class=\"txt signature_name-target sig-hide\" style=\"font-weight:bold; display:inline\">Gleb Polyakov</span>&nbsp;<span class=\"email-sep break\" style=\"display:inline\"><br></span><a class=\"link email signature_email-target sig-hide\" href=\"mailto:gleb@nylas.com\" style=\"color:rgb(30,162,162); text-decoration:none; display:inline\">gleb@nylas.com</a><span class=\"signature_email-sep sep\" style=\"display:inline\">&nbsp;/&nbsp;</span><span class=\"txt signature_mobilephone-target sig-hide\" style=\"display:inline\">404-786-4100</span></p><p style=\"font-family:Helvetica,Arial,sans-serif; font-size:14px; line-height:16px; margin-bottom:10px\"><span class=\"txt signature_companyname-target sig-hide\" style=\"font-weight:bold; color:rgb(33,33,33); display:inline\">Nylas</span>&nbsp;<span class=\"company-sep break\" style=\"display:inline\"><br></span><span class=\"address-sep break\"></span><span class=\"address2-sep break\"></span><span class=\"website-sep break\"></span><a class=\"link signature_website-target sig-hide\" href=\"http://www.nylas.com/\" style=\"color:rgb(30,162,162); text-decoration:none; display:inline\">http://www.nylas.com</a></p></div></td></tr><tr><td colspan=\"3\"></td></tr><tr><td colspan=\"3\"></td></tr><tr><td colspan=\"3\"><p class=\"txt signature_disclaimer-target\" style=\"font-family:Helvetica,Arial,sans-serif; color:rgb(33,33,33); font-size:9px; line-height:12px; margin-top:10px\"></p></td></tr></tbody></table><p></p></div></div>"
```

specs for draft store extension hooks, some draft store refactoring

Test Plan: Run a few new specs that make sure extensions are run

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1741
2015-07-14 12:20:06 -07:00
apm feat(logging): Developer bar, verbose logging to logstash, Electron 0.26.0 2015-05-19 17:02:46 -07:00
arclib fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
build updater(*): Send current platform in update check, publish to S3 in /darwin/ folder 2015-06-30 11:03:24 -07:00
docs-atom fix(asar): Support ASAR, and running of specs in prod builds 2015-05-21 14:41:30 -07:00
docs-templates Move guides from Edgehill repo to Redwood and only generate docs from classes 2015-06-02 16:24:56 -07:00
dot-nylas feat(update): autoupdater adds an updateLevel param 2015-06-11 12:23:31 -07:00
exports feat(quoted-text): New quoted text engine 2015-07-08 09:51:33 -07:00
internal_packages feat(signatures): Initial signature support 2015-07-14 12:20:06 -07:00
keymaps Add (s) hotkey for starring in both thread-list and message-list views 2015-06-26 14:06:31 -07:00
menus fix(getting-started): New menu item, sample package for devs 2015-07-06 14:23:51 -04:00
resources fix(asar): Support ASAR, and running of specs in prod builds 2015-05-21 14:41:30 -07:00
script fix(linux-build): Move the license file out of app so it works with ASAR 2015-05-21 18:22:11 -07:00
spec feat(offline-mode, undo-redo): Tasks handle network errors better and retry, undo/redo based on tasks 2015-07-07 13:38:53 -04:00
spec-nylas feat(signatures): Initial signature support 2015-07-14 12:20:06 -07:00
src feat(signatures): Initial signature support 2015-07-14 12:20:06 -07:00
static fix(back): Remove "Back to " prefix, centralize into back button itself, align using vertial-align instead of margin-top 2015-07-13 16:33:57 -07:00
vendor fix(windows): Minor changes to support windows 2015-06-26 10:50:19 -07:00
.arcconfig [arcconfig] Change to https://phab.nylas.com/ 2015-05-18 11:19:25 -07:00
.gitattributes fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
.gitignore add(specs): Empty folders and node_modules in spec fixture to fix specs 2015-06-03 10:23:54 -07:00
.gitmodules fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
.node-version fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
.npmrc fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
.pairs fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
.python-version fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
atom.sh refactor(code): replace all instances of atom-shell and AtomShell and atomShell 2015-05-20 10:20:10 -07:00
coffeelint.json feat(docs): New docs tasks and React 0.13.2 2015-04-24 11:33:10 -07:00
CONTRIBUTING.md fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
Dockerfile fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
LICENSE.md fix(drafts): Various improvements and fixes to drafts, draft state management 2015-02-03 16:24:31 -08:00
package.json bump(electron): 0.29.2 and a few minor bug fixes 2015-07-13 16:28:06 -07:00
README.md fix(readme): Rip out Atom readme, replace with our own minimal one 2015-04-30 16:24:09 -07:00

Nylas Mail is a hackable platform for your personal data, built on Electron and the Nylas Platform APIs.

Building Nylas Mail

Extending Nylas Mail

It's easy to extend Nylas Mail using your favorite web technologies. Check out the Nylas Package API to get started, and the API reference for information about specific classes.