diff --git a/docs/WritingSpecs.md b/docs/WritingSpecs.md
index a1f158e96..9d2312be5 100644
--- a/docs/WritingSpecs.md
+++ b/docs/WritingSpecs.md
@@ -5,17 +5,15 @@ Section: Guides
Order: 7
---
-# Writing specs
-
Nylas uses [Jasmine](http://jasmine.github.io/1.3/introduction.html) as its spec framework. As a package developer, you can write specs using Jasmine 1.3 and get some quick wins. Jasmine specs can be run in N1 directly from the Developer menu, and the test environment provides you with helpful stubs. You can also require your own test framework, or use Jasmine for integration tests and your own framework for your existing business logic.
This documentation describes using [Jasmine 1.3](http://jasmine.github.io/1.3/introduction.html) to write specs for a Nylas package.
-#### Running Specs
+### Running Specs
You can run your package specs from `Developer > Run Package Specs...`. Once you've opened the spec window, you can see output and re-run your specs by clicking `Reload Specs`.
-#### Writing Specs
+### Writing Specs
To create specs, place `js`, `coffee`, or `cjsx` files in the `spec` directory of your package. Spec files must end with the `-spec` suffix.
diff --git a/internal_packages/category-picker/lib/category-picker.cjsx b/internal_packages/category-picker/lib/category-picker.cjsx
index c19e055d8..b031c819f 100644
--- a/internal_packages/category-picker/lib/category-picker.cjsx
+++ b/internal_packages/category-picker/lib/category-picker.cjsx
@@ -322,7 +322,8 @@ class CategoryPicker extends React.Component
_isUserFacing: (allInInbox, category) =>
hiddenCategories = []
- currentCategoryId = FocusedMailViewStore.mailView().categoryId()
+ currentCategoryId = FocusedMailViewStore.mailView()?.categoryId()
+
if @_account?.usesLabels()
hiddenCategories = ["all", "spam", "trash", "drafts", "sent"]
if allInInbox
diff --git a/internal_packages/notifications/lib/activity-sidebar.cjsx b/internal_packages/notifications/lib/activity-sidebar.cjsx
index 596ca450a..ac2466d87 100644
--- a/internal_packages/notifications/lib/activity-sidebar.cjsx
+++ b/internal_packages/notifications/lib/activity-sidebar.cjsx
@@ -90,7 +90,7 @@ class ActivitySidebar extends React.Component
- Syncing mail data…
+ Syncing your mailbox…
diff --git a/internal_packages/notifications/lib/initial-sync-activity.cjsx b/internal_packages/notifications/lib/initial-sync-activity.cjsx
index ea367211f..3244c3d36 100644
--- a/internal_packages/notifications/lib/initial-sync-activity.cjsx
+++ b/internal_packages/notifications/lib/initial-sync-activity.cjsx
@@ -55,7 +55,7 @@ class InitialSyncActivity extends React.Component
else
@setState expandedSync: !@state.expandedSync}>
{@_renderProgressBar(totalProgress)}
-
Syncing mail data…
+
Syncing your mailbox…
{@_expandedSyncState()}
diff --git a/internal_packages/onboarding/assets/nylas-pictographB@2x.png b/internal_packages/onboarding/assets/nylas-pictographB@2x.png
new file mode 100644
index 000000000..6b9c73b61
Binary files /dev/null and b/internal_packages/onboarding/assets/nylas-pictographB@2x.png differ
diff --git a/internal_packages/onboarding/lib/account-choose-page.cjsx b/internal_packages/onboarding/lib/account-choose-page.cjsx
index 3d42e4660..0e438c4fa 100644
--- a/internal_packages/onboarding/lib/account-choose-page.cjsx
+++ b/internal_packages/onboarding/lib/account-choose-page.cjsx
@@ -30,7 +30,7 @@ class AccountChoosePage extends React.Component
-
+
Select your email provider
diff --git a/internal_packages/onboarding/lib/account-settings-page.cjsx b/internal_packages/onboarding/lib/account-settings-page.cjsx
index ded6eb8a6..6236a29f4 100644
--- a/internal_packages/onboarding/lib/account-settings-page.cjsx
+++ b/internal_packages/onboarding/lib/account-settings-page.cjsx
@@ -79,11 +79,16 @@ class AccountSettingsPage extends React.Component
_onSettingsChanged: (event) =>
field = event.target.dataset.field
+ format = event.target.dataset.format
+ int_formatter = (a) ->
+ i = parseInt(a)
+ if isNaN(i) then "" else i
+ formatter = if format is 'integer' then int_formatter else (a) -> a
settings = @state.settings
if event.target.type is 'checkbox'
settings[field] = event.target.checked
else
- settings[field] = event.target.value
+ settings[field] = formatter(event.target.value)
@setState({settings})
_onValueChanged: (event) =>
@@ -94,7 +99,11 @@ class AccountSettingsPage extends React.Component
_onFieldKeyPress: (event) =>
if event.key in ['Enter', 'Return']
- @_onSubmit()
+ pages = @state.provider.pages || []
+ if pages.length > @state.pageNumber+1
+ @_onNextButton()
+ else
+ @_onSubmit()
_renderTitle: =>
if @state.provider.name is 'gmail'
@@ -129,6 +138,7 @@ class AccountSettingsPage extends React.Component
onChange={@_onValueChanged}
onKeyPress={@_onFieldKeyPress}
data-field={field.name}
+ data-format={field.format} ? ""
className={errclass}
placeholder={field.placeholder} />
@@ -144,6 +154,7 @@ class AccountSettingsPage extends React.Component
onChange={@_onSettingsChanged}
onKeyPress={@_onFieldKeyPress}
data-field={field.name}
+ data-format={field.format} ? ""
className={field.className ? ""} />
{field.label}
@@ -159,6 +170,7 @@ class AccountSettingsPage extends React.Component
onChange={@_onSettingsChanged}
onKeyPress={@_onFieldKeyPress}
data-field={field.name}
+ data-format={field.format} ? ""
className={errclass+(field.className ? "")}
placeholder={field.placeholder} />
diff --git a/internal_packages/onboarding/lib/account-types.coffee b/internal_packages/onboarding/lib/account-types.coffee
index 29e900ca3..6be0325c1 100644
--- a/internal_packages/onboarding/lib/account-types.coffee
+++ b/internal_packages/onboarding/lib/account-types.coffee
@@ -125,6 +125,7 @@ Providers = [
label: 'Port (optional)'
className: 'half'
default: 993
+ format: 'integer'
page: 1
}, {
name: 'imap_ssl_enabled'
@@ -157,6 +158,7 @@ Providers = [
placeholder: '587'
label: 'Port (optional)'
className: 'half'
+ format: 'integer'
default: 587
page: 2
}, {
diff --git a/internal_packages/onboarding/lib/nylas-api-environment-store.coffee b/internal_packages/onboarding/lib/nylas-api-environment-store.coffee
index 46c08c4c8..4e2d090af 100644
--- a/internal_packages/onboarding/lib/nylas-api-environment-store.coffee
+++ b/internal_packages/onboarding/lib/nylas-api-environment-store.coffee
@@ -4,11 +4,10 @@ NylasStore = require 'nylas-store'
class NylasApiEnvironmentStore extends NylasStore
constructor: ->
@listenTo Actions.changeAPIEnvironment, @_setEnvironment
+ @_setEnvironment('production') unless atom.config.get('env')
- defaultEnv = if atom.inDevMode() then 'staging' else 'staging'
- @_setEnvironment(defaultEnv) unless atom.config.get('env')
-
- getEnvironment: -> atom.config.get('env')
+ getEnvironment: ->
+ atom.config.get('env')
_setEnvironment: (env) ->
throw new Error("Environment #{env} is not allowed") unless env in ['development', 'experimental', 'staging', 'production']
diff --git a/internal_packages/onboarding/lib/welcome-page.cjsx b/internal_packages/onboarding/lib/welcome-page.cjsx
index 6d0125906..3439bb4f8 100644
--- a/internal_packages/onboarding/lib/welcome-page.cjsx
+++ b/internal_packages/onboarding/lib/welcome-page.cjsx
@@ -45,7 +45,7 @@ class WelcomePage extends React.Component
_renderStep0: ->
-
+
Say hello to N1.
The next-generation email platform.
Built with ❤︎ by Nylas
@@ -65,7 +65,7 @@ class WelcomePage extends React.Component
- N1 is built with modern web technologies and easy to extend with JavaScript.
+ N1 is built with modern web technologies and is easy to extend with JavaScript.
{@_renderNavBubble(1)}
diff --git a/internal_packages/onboarding/spec/nylas-api-environment-store-spec.coffee b/internal_packages/onboarding/spec/nylas-api-environment-store-spec.coffee
index c6da261b6..fbbec1c6f 100644
--- a/internal_packages/onboarding/spec/nylas-api-environment-store-spec.coffee
+++ b/internal_packages/onboarding/spec/nylas-api-environment-store-spec.coffee
@@ -15,18 +15,18 @@ describe "NylasApiEnvironmentStore", ->
spyOn(atom, "inDevMode").andReturn true
spyOn(atom.config, "get").andReturn undefined
store = new storeConstructor()
- expect(atom.config.set).toHaveBeenCalledWith("env", "staging")
+ expect(atom.config.set).toHaveBeenCalledWith("env", "production")
it "initializes with the correct default in production", ->
spyOn(atom, "inDevMode").andReturn false
spyOn(atom.config, "get").andReturn undefined
store = new storeConstructor()
- expect(atom.config.set).toHaveBeenCalledWith("env", "staging")
+ expect(atom.config.set).toHaveBeenCalledWith("env", "production")
describe "when setting the environment", ->
it "sets from the desired action", ->
- Actions.changeAPIEnvironment("production")
- expect(atom.config.set).toHaveBeenCalledWith("env", "production")
+ Actions.changeAPIEnvironment("staging")
+ expect(atom.config.set).toHaveBeenCalledWith("env", "staging")
it "throws if the env is invalid", ->
expect( -> Actions.changeAPIEnvironment("bad")).toThrow()
diff --git a/internal_packages/onboarding/stylesheets/onboarding.less b/internal_packages/onboarding/stylesheets/onboarding.less
index 3a520734e..80d692eed 100644
--- a/internal_packages/onboarding/stylesheets/onboarding.less
+++ b/internal_packages/onboarding/stylesheets/onboarding.less
@@ -312,9 +312,6 @@
.page.account-choose {
width: 388px;
height: 615px;
- img.logo.content-mask {
- background-color: rgba(255,255,255,0.4);
- }
.caption {
font-size: 17px;
@@ -539,9 +536,6 @@
line-height: 41px;
}
- img.logo.content-mask {
- background-color: rgba(255,255,255,0.4);
- }
img.icons.content-mask {
background-color: rgba(255,255,255,0.7);
}
@@ -647,7 +641,7 @@
p {
margin-top: 1em;
- color: rgba(255,255,255,0.7);
+ color: rgba(255,255,255,0.9);
font-size: 17px;
line-height: 24px;
}
diff --git a/src/flux/edgehill-api.coffee b/src/flux/edgehill-api.coffee
index f767e9436..6bbe1fe32 100644
--- a/src/flux/edgehill-api.coffee
+++ b/src/flux/edgehill-api.coffee
@@ -18,7 +18,6 @@ class EdgehillAPI
_onConfigChanged: =>
env = atom.config.get('env')
if env is 'development'
- # @APIRoot = "http://localhost:5009"
@APIRoot = "https://edgehill-dev.nylas.com"
else if env is 'experimental'
@APIRoot = "https://edgehill-experimental.nylas.com"