diff --git a/CHANGELOG.md b/CHANGELOG.md index b41c6399f3..2a0494fb15 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,48 +1,42 @@ # Nylas Mail Changelog +### 1.0.29 (2/21/2017) + +- Fixes: + + + You can now click inline images in messages to open them + + More IMAP errors have been identified as retryable, which means users will + see less errors when syncing an account + + Improve performance of thread search indexing queries + + Correctly catch Invalid Login errors when sending + +- Development: + + + Developer bar in Worker window now shows single delta connection + + More code converted to Javascript + ### 1.0.28 (2/16/2017) -- nylas-mail: - - + [battery] Add BatteryStatusManager - + fix(exports) Add backoff schedulers - + feat(offline) Re add offline status notification - + reafctor(scheduler): Move SearchIndexer -> SearchIndexScheduler - + feat(backoff-scheduler): Add a backoff scheduler service - -- K2: - - + [local-sync] :art: sync loop error handler - + [sentry] Don't use breadcrumbs in dev mode - + [cloud-api] remove latest_cursor endpoint - + [cloud-api] Log error info on 5xx errors - + [local-sync] Refresh Google OAuth2 tokens when Invalid Credentials occurs in sync loop - + Add TODOs about retries in sending - + [local-sync] Add exponential backoff when retrying syncback tasks - + [SFDC] Update SalesforceSearchIndexer for new search indexing - + [cloud-api,cloud-workers,local-sync] Bump hapi version - + [cloud-api] Reduce request timing precision - + Bump pm2 version to 2.4.0 - + [cloud-api] KEEP Timeout streaming API connections every 15 minutes - + Revert [cloud-api] Timeout streaming API connections every 15 minutes - + [cloud-\*] Properly listen to stream disconnect events to close redis connections - + [cloud-core, cloud-api] add logging to delta connection - + [cloud-api] Timeout streaming API connections every 15 minutes - + [isomorphic-core] add accountId index definition to Transaction table - + [cloud-api] recover from bad error from /n1/user - + [local-sync] :art: comment - + [local-sync] syncback(Part 5): Always keep retrying tasks if error is retryable - + [local-sync] :fire: Message syncback tasks - + [cloud-api] Change an extension from .js to .es6 - + [local-sync] syncback(Part 4): Don't always mark INPROGRESS tasks as failed at beginning of sync - + [local-sync] syncback(Part 3): Fixup - + [local-sync] syncback(Part 2): Reinstate send tasks back into the sync loop - + [cloud-api] Add metadata tests - + [local-sync, cloud-api] Add logic to handle thread metadata - + [local-sync] syncback(Part 1): Refactor syncback-task-helpers - + [iso-core] Detect more offline errors when sending - + [local-sync] Add a better reason when waking sync for syncback - + [local-sync] More retryable IMAP errors +- Fixes: + + + Fix offline notification bug that caused api outage + + We now properly handle gmail auth token errors in the middle of the sync loop. This means less red boxes for users! + + Less battery usage when initial sync has completed! + + No more errors when saving sent messages to sent folders (`auth or accountId` errors) + + No more `Lingering tasks in progress marked as failed errors` + + Syncback tasks will continue retrying even after closing app + + Syncback tasks retry more aggressively + + Detect more offline errors when sending, sending is more reliable + + Imap connection pooling (yet to land) + + More retryable IMAP errors, means less red boxes for users + + Offline notification now shows itself when we’re actually offline, shows countdown for next reconnect attempt + +- Development: + + + More tests + + Don't use breadcrumbs in dev mode + + Add a better reason when waking sync for syncback in the logs + + BackoffScheduler, BatteryManager added for reusability ### 1.0.27 (2/14/17) diff --git a/README.md b/README.md index 0192fe7f77..c2e180734e 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,5 @@ # Nylas Mail - the open-source, extensible mail client -![N1 Screenshot](https://nylas.com/static/img/home/screenshot-hero-mac@2x.png) +![N1 Screenshot](https://nylas.com/static/img/nylas-mail/hero_graphic_mac@2x.png) **Nylas Mail is an open-source mail client built on the modern web with [Electron](https://github.com/atom/electron), [React](https://facebook.github.io/react/), and [Flux](https://facebook.github.io/flux/).** It is designed to be extensible, so it's easy to create new experiences and workflows around email. Want to learn more? Check out the [full documentation](https://nylas.github.io/nylas-mail/). diff --git a/build/resources/linux/nylas.desktop.in b/build/resources/linux/nylas-mail.desktop.in similarity index 86% rename from build/resources/linux/nylas.desktop.in rename to build/resources/linux/nylas-mail.desktop.in index 950a2ef4fb..fe6d68f2e8 100644 --- a/build/resources/linux/nylas.desktop.in +++ b/build/resources/linux/nylas-mail.desktop.in @@ -2,8 +2,8 @@ Name=<%= productName %> Comment=<%= description %> GenericName=<%= productName %> -Exec=<%= linuxShareDir %>/nylas %U -Icon=nylas +Exec=/usr/bin/nylas-mail %U +Icon=nylas-mail Type=Application StartupNotify=true StartupWMClass=<%= productName %> diff --git a/build/resources/linux/nylas.sh b/build/resources/linux/nylas.sh deleted file mode 100755 index 6761458a99..0000000000 --- a/build/resources/linux/nylas.sh +++ /dev/null @@ -1,115 +0,0 @@ -#!/bin/bash - -if [ "$(uname)" == 'Darwin' ]; then - OS='Mac' -elif [ "$(expr substr $(uname -s) 1 5)" == 'Linux' ]; then - OS='Linux' -elif [ "$(expr substr $(uname -s) 1 10)" == 'MINGW32_NT' ]; then - OS='Cygwin' -else - echo "Your platform ($(uname -a)) is not supported." - exit 1 -fi - -while getopts ":wtfvh-:" opt; do - case "$opt" in - -) - case "${OPTARG}" in - wait) - WAIT=1 - ;; - help|version) - REDIRECT_STDERR=1 - EXPECT_OUTPUT=1 - ;; - foreground|test) - EXPECT_OUTPUT=1 - ;; - esac - ;; - w) - WAIT=1 - ;; - h|v) - REDIRECT_STDERR=1 - EXPECT_OUTPUT=1 - ;; - f|t) - EXPECT_OUTPUT=1 - ;; - esac -done - -if [ $REDIRECT_STDERR ]; then - exec 2> /dev/null -fi - -if [ $EXPECT_OUTPUT ]; then - export ELECTRON_ENABLE_LOGGING=1 -fi - -if [ $OS == 'Mac' ]; then - NYLAS_APP_NAME="Nylas Mail.app" - - if [ -z "${NYLAS_PATH}" ]; then - # If NYLAS_PATH isnt set, check /Applications and then ~/Applications for Nylas Mail.app - if [ -x "/Applications/$NYLAS_APP_NAME" ]; then - NYLAS_PATH="/Applications" - elif [ -x "$HOME/Applications/$NYLAS_APP_NAME" ]; then - NYLAS_PATH="$HOME/Applications" - else - # We havent found an Nylas Mail.app, use spotlight to search for N1 - NYLAS_PATH="$(mdfind "kMDItemCFBundleIdentifier == 'com.nylas.nylas-mail'" | grep -v ShipIt | head -1 | xargs -0 dirname)" - - # Exit if N1 can't be found - if [ ! -x "$NYLAS_PATH/$NYLAS_APP_NAME" ]; then - echo "Cannot locate 'Nylas Mail.app', it is usually located in /Applications. Set the NYLAS_PATH environment variable to the directory containing 'Nylas Mail.app'." - exit 1 - fi - fi - fi - - if [ $EXPECT_OUTPUT ]; then - "$NYLAS_PATH/$NYLAS_APP_NAME/Contents/MacOS/Nylas" --executed-from="$(pwd)" --pid=$$ "$@" - exit $? - else - open -a "$NYLAS_PATH/$NYLAS_APP_NAME" -n --args --executed-from="$(pwd)" --pid=$$ --path-environment="$PATH" "$@" - fi -elif [ $OS == 'Linux' ]; then - SCRIPT=$(readlink -f "$0") - USR_DIRECTORY=$(readlink -f $(dirname $SCRIPT)/..) - - NYLAS_PATH="$USR_DIRECTORY/share/nylas/nylas-mail" - NYLAS_HOME="${NYLAS_HOME:-$HOME/.nylas-mail}" - mkdir -p "$NYLAS_HOME" - - : ${TMPDIR:=/tmp} - - [ -x "$NYLAS_PATH" ] || NYLAS_PATH="$TMPDIR/nylas-build/Nylas/nylas" - - if [ $EXPECT_OUTPUT ]; then - "$NYLAS_PATH" --executed-from="$(pwd)" --pid=$$ "$@" - exit $? - else - ( - nohup "$NYLAS_PATH" --executed-from="$(pwd)" --pid=$$ "$@" > "$NYLAS_HOME/nohup.out" 2>&1 - if [ $? -ne 0 ]; then - cat "$NYLAS_HOME/nohup.out" - exit $? - fi - ) & - fi -fi - -# Exits this process when N1 exits -on_die() { - exit 0 -} -trap 'on_die' SIGQUIT SIGTERM - -# If the wait flag is set, don't exit this process until N1 tells it to. -if [ $WAIT ]; then - while true; do - sleep 1 - done -fi diff --git a/build/resources/linux/redhat/nylas.spec.in b/build/resources/linux/redhat/nylas.spec.in index b9981f549c..900e649f59 100644 --- a/build/resources/linux/redhat/nylas.spec.in +++ b/build/resources/linux/redhat/nylas.spec.in @@ -3,7 +3,7 @@ Version: <%= version %> Release: 0.1%{?dist} Summary: <%= description %> License: GPLv3 -URL: https://nylas.com/N1 +URL: https://github.com/nylas/nylas-mail AutoReqProv: no # Avoid libchromiumcontent.so missing dependency requires: libgnome-keyring @@ -12,29 +12,29 @@ requires: libgnome-keyring <%= description %> %install -mkdir -p %{buildroot}/usr/local/share/nylas -cp -r <%= contentsDir %>/* %{buildroot}/usr/local/share/nylas +mkdir -p %{buildroot}/usr/share/nylas-mail +cp -r <%= contentsDir %>/* %{buildroot}/usr/share/nylas-mail -mkdir -p %{buildroot}/usr/local/bin/ +mkdir -p %{buildroot}/usr/bin/ -cp <%= linuxAssetsDir %>/nylas.sh %{buildroot}/usr/local/bin/nylas -chmod 755 %{buildroot}/usr/local/bin/nylas +ln -s ../share/nylas-mail/nylas %{buildroot}/usr/bin/nylas-mail +chmod 755 %{buildroot}/usr/bin/nylas-mail -mkdir -p %{buildroot}/usr/local/share/applications/ -mv nylas.desktop %{buildroot}/usr/local/share/applications/ +mkdir -p %{buildroot}/usr/share/applications/ +mv nylas-mail.desktop %{buildroot}/usr/share/applications/ for s in 16 32 64 128 256 512; do - mkdir -p %{buildroot}/usr/local/share/icons/hicolor/${s}x${s}/apps - cp -p <%= linuxAssetsDir %>/icons/${s}.png %{buildroot}/usr/local/share/icons/hicolor/${s}x${s}/apps/nylas.png + mkdir -p %{buildroot}/usr/share/icons/hicolor/${s}x${s}/apps + cp -p <%= linuxAssetsDir %>/icons/${s}.png %{buildroot}/usr/share/icons/hicolor/${s}x${s}/apps/nylas-mail.png done %files -/usr/local/bin/nylas -/usr/local/share/nylas -/usr/local/share/applications/nylas.desktop -/usr/local/share/icons/hicolor/16x16/apps/nylas.png -/usr/local/share/icons/hicolor/32x32/apps/nylas.png -/usr/local/share/icons/hicolor/64x64/apps/nylas.png -/usr/local/share/icons/hicolor/128x128/apps/nylas.png -/usr/local/share/icons/hicolor/256x256/apps/nylas.png -/usr/local/share/icons/hicolor/512x512/apps/nylas.png +/usr/bin/nylas-mail +/usr/share/nylas-mail +/usr/share/applications/nylas-mail.desktop +/usr/share/icons/hicolor/16x16/apps/nylas-mail.png +/usr/share/icons/hicolor/32x32/apps/nylas-mail.png +/usr/share/icons/hicolor/64x64/apps/nylas-mail.png +/usr/share/icons/hicolor/128x128/apps/nylas-mail.png +/usr/share/icons/hicolor/256x256/apps/nylas-mail.png +/usr/share/icons/hicolor/512x512/apps/nylas-mail.png diff --git a/build/tasks/installer-linux-task.js b/build/tasks/installer-linux-task.js index c4915363c7..84c419a1c9 100644 --- a/build/tasks/installer-linux-task.js +++ b/build/tasks/installer-linux-task.js @@ -59,7 +59,7 @@ module.exports = (grunt) => { writeFromTemplate(specInFilePath, templateData) // This populates nylas.desktop - const desktopInFilePath = path.join(linuxAssetsDir, 'nylas.desktop.in') + const desktopInFilePath = path.join(linuxAssetsDir, 'nylas-mail.desktop.in') writeFromTemplate(desktopInFilePath, templateData) const cmd = path.join('script', 'mkrpm') @@ -92,14 +92,14 @@ module.exports = (grunt) => { name: grunt.config('appJSON').name, description: grunt.config('appJSON').description, productName: grunt.config('appJSON').productName, - linuxShareDir: '/usr/share/nylas', + linuxShareDir: '/usr/share/nylas-mail', arch: arch, section: 'devel', maintainer: 'Nylas Team ', installedSize: installedSize, } writeFromTemplate(path.join(linuxAssetsDir, 'debian', 'control.in'), data) - writeFromTemplate(path.join(linuxAssetsDir, 'nylas.desktop.in'), data) + writeFromTemplate(path.join(linuxAssetsDir, 'nylas-mail.desktop.in'), data) const icon = path.join('build', 'resources', 'nylas.png') const cmd = path.join('script', 'mkdeb'); diff --git a/docs_src/guides/GettingStarted-2.md b/docs_src/guides/GettingStarted-2.md index 549d2ee3a5..0149be47c7 100644 --- a/docs_src/guides/GettingStarted-2.md +++ b/docs_src/guides/GettingStarted-2.md @@ -4,7 +4,7 @@ If you followed the first part of the Getting Started Guide, you should have a f We're going to build on your new plugin to show the sender's [Gravatar](http://gravatar.com/) image in the sidebar, instead of just a colored line. -If you don't still have it open, find the plugin source in`~/.nylas/dev/packages`and open the contents in your favorite text editor. +If you don't still have it open, find the plugin source in `~/.nylas/dev/packages`and open the contents in your favorite text editor. > We use [CJSX](https://github.com/jsdf/coffee-react), a [CoffeeScript](http://coffeescript.org/) syntax for [JSX](https://facebook.github.io/react/docs/jsx-in-depth.html), to streamline our plugin code. For syntax highlighting, we recommend [Babel](https://github.com/babel/babel-sublime) for Sublime, or the [CJSX Language](https://atom.io/packages/language-cjsx) Atom package. @@ -12,11 +12,11 @@ If you don't still have it open, find the plugin source in`~/.nylas/dev/packages Let's poke around and change what the sidebar displays. -Just like in the last tutorial, you'll find the code responsible for the sidebar in`lib/my-message-sidebar.cjsx`. Take a look at the`render`method -- this generates the content which appears in the sidebar. +Just like in the last tutorial, you'll find the code responsible for the sidebar in `lib/my-message-sidebar.cjsx`. Take a look at the `render` method -- this generates the content which appears in the sidebar. -\(How does it get in the sidebar? See[Interface Concepts](https://nylas.github.io/nylas-mail/docs/InterfaceConcepts.html)and look at`main.cjsx`for clues. We'll dive into this more later in the guide.\) +\(How does it get in the sidebar? See [Interface Concepts](https://nylas.github.io/nylas-mail/docs/InterfaceConcepts.html) and look at `main.cjsx` for clues. We'll dive into this more later in the guide.\) -We can change the sidebar to display the contact's email address as well. Check out the[Contact attributes](https://nylas.github.io/nylas-mail/docs/Contact.html)and change the`_renderContent`method to display more information: +We can change the sidebar to display the contact's email address as well. Check out the [Contact attributes](https://nylas.github.io/nylas-mail/docs/Contact.html) and change the `_renderContent` method to display more information: ```js _renderContent: => @@ -26,13 +26,13 @@ _renderContent: => ``` -After making changes to the plugin, reload N1 by going to`Developer > Reload`. +After making changes to the plugin, reload N1 by going to `Developer > Reload`. ### Installing a dependency {#installing-a-dependency} -Now we've figured out how to show the contact's email address, we can use that to generate the[Gravatar](http://gravatar.com/)for the contact. However, as per the[Gravatar documentation](https://en.gravatar.com/site/implement/images/), we need to be able to calculate the MD5 hash for an email address first. +Now we've figured out how to show the contact's email address, we can use that to generate the [Gravatar](http://gravatar.com/) for the contact. However, as per the [Gravatar documentation](https://en.gravatar.com/site/implement/images/), we need to be able to calculate the MD5 hash for an email address first. -Let's install the`md5`plugin and save it as a dependency in our`package.json`: +Let's install the `md5` plugin and save it as a dependency in our `package.json`: ``` $ npm @@ -43,7 +43,7 @@ md5 Installing other dependencies works the same way. -Now, add the`md5`requirement in`my-message-sidebar.cjsx`and update the`_renderContent`method to show the md5 hash: +Now, add the `md5` requirement in `my-message-sidebar.cjsx` and update the `_renderContent` method to show the md5 hash: ``` md5 = require 'md5' @@ -61,7 +61,7 @@ class MyMessageSidebar ``` -> JSX Tip: The`{..}`syntax is used for JavaScript expressions inside HTML elements.[Learn more](https://facebook.github.io/react/docs/jsx-in-depth.html). +> JSX Tip: The `{..}` syntax is used for JavaScript expressions inside HTML elements. [Learn more](https://facebook.github.io/react/docs/jsx-in-depth.html). You should see the MD5 hash appear in the sidebar \(after you reload N1\): @@ -69,7 +69,7 @@ You should see the MD5 hash appear in the sidebar \(after you reload N1\): ### Let's Render! {#let-s-render-} -Turning the MD5 hash into a Gravatar image is simple. We need to add an``tag to the rendered HTML: +Turning the MD5 hash into a Gravatar image is simple. We need to add an `` tag to the rendered HTML: ``` _renderContent => @@ -80,13 +80,13 @@ _renderContent => ``` -Now the Gravatar image associated with the currently focused contact appears in the sidebar. If there's no image available, the Gravatar default will show; you can[add parameters to your image tag](https://en.gravatar.com/site/implement/images/)to change the default behavior. +Now the Gravatar image associated with the currently focused contact appears in the sidebar. If there's no image available, the Gravatar default will show; you can [add parameters to your image tag](https://en.gravatar.com/site/implement/images/) to change the default behavior. ![](/img/sidebar-gravatar.png) ### Styling {#styling} -Adding styles to our Gravatar image is a matter of editing`stylesheets/main.less`and applying the class to our`img`tag. Let's make it round: +Adding styles to our Gravatar image is a matter of editing `stylesheets/main.less` and applying the class to our `img` tag. Let's make it round: **stylesheets/main.less** @@ -115,13 +115,13 @@ _renderContent => ``` -> React Tip: Remember to use DOM property names, i.e.`className`instead of`class`. +> React Tip: Remember to use DOM property names, i.e. `className` instead of `class`. You'll see these styles reflected in your sidebar. ![](/img/sidebar-style.png) -If you're a fan of using the Chrome Developer Tools to tinker with styles, no fear; they work in N1, too. Open them by going to`Developer > Toggle Developer Tools`. You'll also find them helpful for debugging in the event that your plugin isn't behaving as expected. +If you're a fan of using the Chrome Developer Tools to tinker with styles, no fear; they work in N1, too. Open them by going to `Developer > Toggle Developer Tools`. You'll also find them helpful for debugging in the event that your plugin isn't behaving as expected. # Step 3: Adding a Data Store @@ -129,11 +129,11 @@ Now let's introduce a data store to give our sidebar superpowers. ## Stores and Data Flow {#stores-and-data-flow} -The Nylas data model revolves around a central`DatabaseStore`and lightweight`Models`that represent data with a particular schema. This works a lot like ActiveRecord, SQLAlchemy and other "smart model" ORMs. See the[Database](https://nylas.github.io/nylas-mail/docs/database)explanation for more details. +The Nylas data model revolves around a central `DatabaseStore` and lightweight `Models` that represent data with a particular schema. This works a lot like ActiveRecord, SQLAlchemy and other "smart model" ORMs. See the [Database](https://nylas.github.io/nylas-mail/docs/database) explanation for more details. -Using the[Flux pattern](https://facebook.github.io/flux/docs/overview.html#structure-and-data-flow)for data flow means that we set up our UI components to 'listen' to specific data stores. When those stores change, we update the state inside our component, and re-render the view. +Using the [Flux pattern](https://facebook.github.io/flux/docs/overview.html#structure-and-data-flow) for data flow means that we set up our UI components to 'listen' to specific data stores. When those stores change, we update the state inside our component, and re-render the view. -We've already used this \(without realizing\) in the[Gravatar sidebar example](https://nylas.github.io/nylas-mail/docs/getting-started-2): +We've already used this \(without realizing\) in the [Gravatar sidebar example](https://nylas.github.io/nylas-mail/docs/getting-started-2): ``` componentDidMount: => @@ -146,7 +146,7 @@ We've already used this \(without realizing\) in the[Gravatar sidebar example](h contact: FocusedContactsStore.focusedContact() ``` -In this case, the sidebar listens to the`FocusedContactsStore`, which updates when the person selected in the conversation changes. This triggers the`_onChange`method which updates the component state; this causes React to render the view with the new state. +In this case, the sidebar listens to the `FocusedContactsStore`, which updates when the person selected in the conversation changes. This triggers the `_onChange` method which updates the component state; this causes React to render the view with the new state. To add more depth to our sidebar plugin, we need to: @@ -155,11 +155,11 @@ To add more depth to our sidebar plugin, we need to: * Extend our data store to do additional things with the contact data * Update our sidebar to listen to, and display data from, the new store. -In this guide, we'll fetch the GitHub profile for the currently focused contact and display a link to it, using the[GitHub API](https://developer.github.com/v3/search/). +In this guide, we'll fetch the GitHub profile for the currently focused contact and display a link to it, using the [GitHub API](https://developer.github.com/v3/search/). ## Creating the Store {#creating-the-store} -The boilerplate to create a new store which listens to`FocusedContactsStore`looks like this: +The boilerplate to create a new store which listens to `FocusedContactsStore` looks like this: **lib/github-user-store.coffee** @@ -179,15 +179,15 @@ Reflux = require 'reflux' @trigger(@) ``` -\(Note: You'll need to set up the`reflux`dependency.\) +\(Note: You'll need to set up the `reflux` dependency.\) -You should be able to drop this store into the sidebar example's`componentDidMount`method -- all it does is listen for the`FocusedContactsStore`to change, and then`trigger`its own event. +You should be able to drop this store into the sidebar example's `componentDidMount` method -- all it does is listen for the `FocusedContactsStore` to change, and then `trigger` its own event. Let's build this out to retrieve some new data based on the focused contact, and expose it via a UI component. ## Getting Data In {#getting-data-in} -We'll expand the`_onFocusedContactChanged`method to do something when the focused contact changes. In this case, we'll see if there's a GitHub profile for that user, and display some information if there is. +We'll expand the `_onFocusedContactChanged` method to do something when the focused contact changes. In this case, we'll see if there's a GitHub profile for that user, and display some information if there is. ``` request = require 'request' @@ -225,9 +225,9 @@ request = require 'request' lback) ``` -The`console.log`line should show the GitHub profile for a contact \(if they have one!\) inside the Developer Tools Console, which you can enable at`Developer > Toggle Developer Tools`. +The `console.log` line should show the GitHub profile for a contact \(if they have one!\) inside the Developer Tools Console, which you can enable at `Developer > Toggle Developer Tools`. -You may run into rate-limiting issues with the GitHub API; to avoid these, you can add [authentication](https://developer.github.com/v3/#authentication) with a [pre-baked token](https://github.com/settings/tokens) by modifying the HTTP request your store makes.**Caution! Use this for local development only.**You could also try implementing a simple cache to avoid making the same request multiple times. +You may run into rate-limiting issues with the GitHub API; to avoid these, you can add [authentication](https://developer.github.com/v3/#authentication) with a [pre-baked token](https://github.com/settings/tokens) by modifying the HTTP request your store makes. **Caution! Use this for local development only.** You could also try implementing a simple cache to avoid making the same request multiple times. ## Display Data {#display-time} @@ -342,13 +342,10 @@ class GithubUserStore extends NylasStore { export default new GithubUserStore(); ``` -Now we can access`@state.github`\(which is the GitHub user profile object\), and display the information it contains by updating the`render`and`renderContent`methods. +Now we can access `@state.github` \(which is the GitHub user profile object\), and display the information it contains by updating the `render` and `renderContent` methods. ### Extending The Store To make this plugin more compelling, we can extend the store to make further API requests and fetch more data about the user. Passing this data back to the UI component follows exactly the same pattern as the barebones data shown above, so we'll leave it as an exercise for the reader. :\) -> You can find a more extensive version of this example in our[sample plugins repository](https://github.com/nylas/edgehill-plugins/tree/master/sidebar-github-profile). - - - +> You can find a more extensive version of this example in our [sample plugins repository](https://github.com/nylas/nylas-mail/tree/master/internal_packages/github-contact-card). diff --git a/docs_src/guides/GettingStarted.md b/docs_src/guides/GettingStarted.md index 3f110a2172..f4fc37a2a2 100644 --- a/docs_src/guides/GettingStarted.md +++ b/docs_src/guides/GettingStarted.md @@ -45,7 +45,7 @@ componentWillUnmount: => _renderContent: => ``` -![](/img/screenshot-base-plugin.png =100x) +![](/img/screenshot-base-plugin.png) Try opening a message in N1 - you'll see the new package's example text show up on the sidebar. Delete the content of the `render` method and save - the text should disappear. diff --git a/internal_packages/github-contact-card/README.md b/internal_packages/github-contact-card/README.md index 31e5489a2e..4b2ab043dc 100644 --- a/internal_packages/github-contact-card/README.md +++ b/internal_packages/github-contact-card/README.md @@ -7,7 +7,7 @@ and then displays public repos and their stars. This example is a good starting point for plugins that want to display data from external sources in the sidebar. If you want to see some more advanced plugins, have a look through [all the internal plugins, here on Github](https://github.com/nylas/nylas-mail/tree/master/internal_packages). - +![](screenshot.png) #### Install this plugin diff --git a/internal_packages/github-contact-card/screenshot.png b/internal_packages/github-contact-card/screenshot.png new file mode 100644 index 0000000000..a954cb4fde Binary files /dev/null and b/internal_packages/github-contact-card/screenshot.png differ diff --git a/package.json b/package.json index a37b815f58..70c76c252f 100644 --- a/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "nylas", + "name": "nylas-mail", "productName": "Nylas Mail", "version": "1.0.28", "description": "The best email app for people and teams at work", diff --git a/script/mkdeb b/script/mkdeb index 3cb925ec7f..fe9b005314 100755 --- a/script/mkdeb +++ b/script/mkdeb @@ -22,7 +22,7 @@ TARGET="$TARGET_ROOT/nylas-$VERSION-$ARCH" mkdir -m $FILE_MODE -p "$TARGET/usr" mkdir -m $FILE_MODE -p "$TARGET/usr/share" -cp -r "$APP_CONTENTS_DIRECTORY" "$TARGET/usr/share/nylas" +cp -r "$APP_CONTENTS_DIRECTORY" "$TARGET/usr/share/nylas-mail" mkdir -m $FILE_MODE -p "$TARGET/DEBIAN" cp "$OUTPUT_PATH/control" "$TARGET/DEBIAN/control" @@ -31,28 +31,28 @@ cp "$LINUX_ASSETS_DIRECTORY/debian/postinst" "$TARGET/DEBIAN/postinst" cp "$LINUX_ASSETS_DIRECTORY/debian/postrm" "$TARGET/DEBIAN/postrm" mkdir -m $FILE_MODE -p "$TARGET/usr/bin" -cp "$LINUX_ASSETS_DIRECTORY/nylas.sh" "$TARGET/usr/bin/nylas" -chmod +x "$TARGET/usr/bin/nylas" +ln -s "../share/nylas-mail/nylas" "$TARGET/usr/bin/nylas-mail" +chmod +x "$TARGET/usr/bin/nylas-mail" mkdir -m $FILE_MODE -p "$TARGET/usr/share/applications" -cp "$OUTPUT_PATH/nylas.desktop" "$TARGET/usr/share/applications" +cp "$OUTPUT_PATH/nylas-mail.desktop" "$TARGET/usr/share/applications" mkdir -m $FILE_MODE -p "$TARGET/usr/share/pixmaps" -cp "$ICON_FILE" "$TARGET/usr/share/pixmaps" +cp "$ICON_FILE" "$TARGET/usr/share/pixmaps/nylas-mail.png" mkdir -m $FILE_MODE -p "$TARGET/usr/share/icons/hicolor" for i in 256 128 64 32 16; do mkdir -p "$TARGET/usr/share/icons/hicolor/${i}x${i}/apps" - cp "$LINUX_ASSETS_DIRECTORY/icons/${i}.png" "$TARGET/usr/share/icons/hicolor/${i}x${i}/apps/nylas.png" + cp "$LINUX_ASSETS_DIRECTORY/icons/${i}.png" "$TARGET/usr/share/icons/hicolor/${i}x${i}/apps/nylas-mail.png" done -# Copy generated LICENSE.md to /usr/share/doc/nylas/copyright -mkdir -m $FILE_MODE -p "$TARGET/usr/share/doc/nylas" -cp "$TARGET/usr/share/nylas/LICENSE" "$TARGET/usr/share/doc/nylas/copyright" +# Copy generated LICENSE.md to /usr/share/doc/nylas-mail/copyright +mkdir -m $FILE_MODE -p "$TARGET/usr/share/doc/nylas-mail" +cp "$TARGET/usr/share/nylas-mail/LICENSE" "$TARGET/usr/share/doc/nylas-mail/copyright" # Add lintian overrides mkdir -m $FILE_MODE -p "$TARGET/usr/share/lintian/overrides" -cp "$ROOT/build/resources/linux/debian/lintian-overrides" "$TARGET/usr/share/lintian/overrides/nylas" +cp "$ROOT/build/resources/linux/debian/lintian-overrides" "$TARGET/usr/share/lintian/overrides/nylas-mail" # Remove group write from all files chmod -R g-w "$TARGET"; diff --git a/script/mkrpm b/script/mkrpm index 0b8ab1cfb9..c542b9e6fa 100755 --- a/script/mkrpm +++ b/script/mkrpm @@ -22,9 +22,7 @@ mkdir -p $RPM_BUILD_ROOT/RPMS cp -r "$APP_CONTENTS_DIRECTORY/"* "$RPM_BUILD_ROOT/BUILD" cp -r "$LINUX_ASSETS_DIRECTORY/icons" "$RPM_BUILD_ROOT/BUILD" cp "$BUILD_DIRECTORY/nylas.spec" "$RPM_BUILD_ROOT/SPECS" -cp "$LINUX_ASSETS_DIRECTORY/nylas.sh" "$RPM_BUILD_ROOT/BUILD" -cp "$RPM_BUILD_ROOT/BUILD/nylas.sh" "$RPM_BUILD_ROOT/BUILD/nylas" -cp "$BUILD_DIRECTORY/nylas.desktop" "$RPM_BUILD_ROOT/BUILD" +cp "$BUILD_DIRECTORY/nylas-mail.desktop" "$RPM_BUILD_ROOT/BUILD" rpmbuild -ba "$BUILD_DIRECTORY/nylas.spec" cp $RPM_BUILD_ROOT/RPMS/$ARCH/nylas-*.rpm "$BUILD_DIRECTORY" diff --git a/src/browser/main.js b/src/browser/main.js index eb2011d082..74621174f5 100644 --- a/src/browser/main.js +++ b/src/browser/main.js @@ -56,17 +56,17 @@ const setupErrorLogger = (args = {}) => { const declareOptions = (argv) => { const optimist = require('optimist'); const options = optimist(argv); - options.usage("Nylas Mail v" + (app.getVersion()) + "\n\nUsage: n1 [options]\n\nRun N1: The open source extensible email client\n\n`n1 --dev` to start the client in dev mode.\n\n`n1 --test` to run unit tests."); + options.usage("Nylas Mail v" + (app.getVersion()) + "\n\nUsage: nylas-mail [options]\n\nRun Nylas Mail: The open source extensible email client\n\n`nylas-mail --dev` to start the client in dev mode.\n\n`n1 --test` to run unit tests."); options.alias('d', 'dev').boolean('d').describe('d', 'Run in development mode.'); options.alias('t', 'test').boolean('t').describe('t', 'Run the specified specs and exit with error code on failures.'); options.boolean('safe').describe('safe', 'Do not load packages from ~/.nylas-mail/packages or ~/.nylas/dev/packages.'); options.alias('h', 'help').boolean('h').describe('h', 'Print this usage message.'); options.alias('l', 'log-file').string('l').describe('l', 'Log all test output to file.'); - options.alias('c', 'config-dir-path').string('c').describe('c', 'Override the path to the N1 configuration directory'); + options.alias('c', 'config-dir-path').string('c').describe('c', 'Override the path to the Nylas Mail configuration directory'); options.alias('s', 'spec-directory').string('s').describe('s', 'Override the directory from which to run package specs'); options.alias('f', 'spec-file-pattern').string('f').describe('f', 'Override the default file regex to determine which tests should run (defaults to "-spec\.(coffee|js|jsx|cjsx|es6|es)$" )'); options.alias('v', 'version').boolean('v').describe('v', 'Print the version.'); - options.alias('b', 'background').boolean('b').describe('b', 'Start N1 in the background'); + options.alias('b', 'background').boolean('b').describe('b', 'Start Nylas Mail in the background'); return options; };