Commit graph

234 commits

Author SHA1 Message Date
Evan Morikawa c3ecca2692 feat(tests): add integration tests
comment

Adding test harness

Using key strokes in main window test

Tests work now

Clean up argument variables

Rename list manager and get rid of old spec-helper methods

Extract out time overrides from spec-helper

Spectron test for contenteditable

fix spec exit codes and boot mode

fix(spec): cleanup N1.sh and make specs fail with exit code 1

Revert tests and get it working in window

Move to spec_integration and add window load tester

Specs pass. Console logs still in

Remove console logs

Extract N1 Launcher ready method

Make integrated unit test runner

feat(tests): adding integration tests

Summary:
The /spectron folder got moved to /spec_integration

There are now unit tests (the old ones) run via the renamed
`script/grunt run-unit-tests`

There are now integration tests run via the command `script/grunt
run-integration-tests`.

There are two types of integration tests:
1. Tests that operate on the whole app via Selenium/Chromedriver. These
tests have access to Spectron APIs but do NOT have access to any JS object
running inside the application. See the `app-boot-spec.es6` for an example
of these tests. This is tricky because we want to test the Main window,
but Spectron may latch onto any other of our loading windows. Code in
`integration-helper` give us an API that finds and loads the main window
so we can test it

2. Tests that run in the unit test suite that need Spectron to perform
integration-like behavior. These are the contentedtiable specs. The
Spectron server is accessed from the app and can be used to trigger
actions on the running app, from the app. These tests use the
windowed-test runner so Spectron can identify whether the tests have
completed, passed, or failed. Unfortunately Spectron can't access the logs
, nor the exit code of the test script thereby forcing us to parse the
HTML DOM. (Note this is still a WIP)

I also revamped the `N1.sh` file when getting the launch arguments to work
properly. It's much cleaner. We didn't need most of the data.

Test Plan: new tests

Reviewers: juan, bengotow

Differential Revision: https://phab.nylas.com/D2289

Fix composer specs

Tests can properly detect when Spectron is in the environment

Report plain text output in specs

fixing contenteditable specs

Testing slow keymaps on contenteditable specs

Move to DOm mutation

Spell as `subtree` not `subTree`
2015-12-02 13:41:14 -08:00
Ben Gotow ceb9e2cdb1 feat(keybindings): Show all keybindings in prefs 2015-12-01 18:31:19 -08:00
Evan Morikawa c2beaee006 feat(signatures): add raw signature support 2015-11-30 14:02:58 -08:00
Evan Morikawa 83b0a4db5f 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 6a4613b4a1 feat(prefs): Allow tabs with an accounts submenu
Summary:
This diff:
- Improves the styling of the tabs in the preferences sidebar.
- Adds an optional param to section cofnig that puts an "account" submenu beneath the tab item.
- Renames preferences "sections" => "tabs", and renames the PreferencesSectionStore to PreferencesUIStore. I think we should include "UI" in more of our stores, and I think "tabs" is a good idea because it's unambigious—there's no way you could confuse it for a "section" of the NylasEnv.config tree or think it deals with actually saving prefs.

Test Plan: Inspect visually

Reviewers: evan, juan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2296
2015-11-30 11:43:49 -08:00
Juan Tejada 58ded66962 fix(styles): Remove custom pre tag styling for email
Fixes #424
2015-11-24 12:35:35 -08:00
Juan Tejada d759f6039b fix(boot): Copy env from main process into renderer process on linux
See: https://github.com/atom/electron/issues/3306
This was casuing NYLAS_HOME to be unavailable on the renderer process
2015-11-24 12:11:44 -08:00
Ben Gotow e0976fde2c 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
Ben Gotow 522ad2da79 fix(theme): Improve styling of popout composer in dark mode 2015-11-23 18:28:30 -08: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
Ben Gotow a5256bd56a 🍒(atom): Pull new, cleaner compile cache + index.js 2015-11-17 19:43:08 -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
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 697b3855bf fix(dropdowns): 3% darken on hover, not full blue 2015-11-13 16:58:55 -08:00
Ben Gotow 7d7ba4fbba fix(ui-dark): Small color adjustments, resolves #299, #148 2015-11-09 18:52:24 -08:00
Ben Gotow bbea8beee5 fix(feedback): Move feedback window creation to app process
Prevents cross-window callbacks that are preventing the app from quitting
2015-11-09 12:15:24 -08:00
Ben Gotow eb8810e01b fix(babel): Roll back to babel@5, see details
- move babelrc to static so that it can be used during the build process and also whenever the app is transpiling things on the fly.
- move babel back to version 5, which is compatible with `apm install`. (babel 6 seems to require the "dedupe" behavior of NPM3)
- update harmony-collections to use an unpublished commit that fixes the "WeakMap is not generic" issue
2015-11-07 14:27:18 -08:00
Evan Morikawa 37e3fe0f45 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
Juan Tejada a6c44b8529 feat(system-tray): add system-tray package
Summary:
- Updates support for ES6 code inside packages
- Displays system tray icon with unread count on darwin, or with bubble on other platforms
- Uses canvas api to dynamically generate icon image given unread count:
  - Adds CavasUtils.canvasFromImgAndText to do this
- Adds config option to display system tray icon on darwin

Test Plan: Need to write the tests for this.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2231
2015-11-06 11:12:38 -08:00
Evan Morikawa cc61aa7811 feat(signatures): add signature support in preferences
Summary:
Adding signature support in preferences

Extracting out DraftStore extensions from the Contenteditable component

Moved Contenteditable to the nylas component kit

Build react remote window selection synchronization.

Test Plan: todo

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2204
2015-10-29 17:20:41 -04:00
Evan Morikawa 985a8b55fe fix(ui): better unread count box
Smaller box that sits next to item.
Drafts is now no longer a strong color
Fixes T3535
2015-10-28 18:50:04 -04:00
Ben Gotow 43c43a6bf5 fix(search): New X, focus styling for search
Fixes T3485
2015-10-27 11:28:11 -07:00
Ben Gotow 1a3b4e7106 fix(fullscreen): On Mac OS X, green window control defaults to fullscreen 2015-10-23 18:30:47 -07:00
Evan Morikawa cc95662adc fix(win): composer and input styles 2015-10-23 15:04:35 -07:00
Ben Gotow 316d460288 fix(thread-list): Better hover state for quick actions 2015-10-23 12:47:32 -07:00
Evan Morikawa 4b7a3264bd fix(windows): fix apm package loading and onboarding styles 2015-10-23 12:18:00 -07:00
Ben Gotow a83201ef7e feat(sidebar): Hierarchical folders/labels in the sidebar, rendering perf
Summary:
Fix label sorting... apparently we just synced them in creation date order

Allow labels / folders to be nested using separators `.`, `/`, and `\`

Allow collapsing of nested labels in sidebar

Add overflow hidden to some core flexboxes, which dramatically reduces repaints because it knows columns will not overflow into other columns

Prevent scroll region contents from re-rendering all the time, not sure why this works

Add test for account sidebar store

Test Plan: Run new test of AccountSidebarStore

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2181
2015-10-22 10:53:57 -07:00
Evan Morikawa 2500e52179 feat(windows): improve UI for Windows
Remove rounded corners and gradients
2015-10-21 20:32:33 -07:00
Evan Morikawa 134702805d feat(windows): upgarade preferences UI on Windows 2015-10-21 17:28:52 -07:00
Ben Gotow d4a3c1dad9 Merge pull request #113 from agudulin/master
style(*): Add styles for <select> elements, override system defaults
2015-10-21 13:56:16 -07:00
Evan Morikawa 8808a821f8 feat(win32): improve button styles for Win 8.1 spec 2015-10-21 12:17:34 -07:00
Ben Gotow b963688455 fix(art): Correct "Trash" icon, naming consistency 2015-10-21 11:58:05 -07:00
Alexander Gudulin d8b18b9adf Setup styles for dropdown (select) control 2015-10-21 21:27:53 +03:00
Ben Gotow f7c6ae0774 fix(toolbars): Cross disolve toolbar items on a one-off basis
Summary:
This diff removes the timeout transition group from the sheet-toolbar, which was causing toolbar items to fade when columns were opened / closed and they were moved from column to column.

Instead, I'm just animating the message toolbar items, which are one of the few sets of toolbar items that really should fade, and do so as an entire set.

I've also renamed the "sheet-toolbar" animation to "opacity-125ms". I think it'd be cool to create a standard set of these animations, but I didn't see any others it would make sense to create generic names for yet. (The others have weird timings or are bound up inside packages).

Resolves Github #90

Test Plan: No new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2159
2015-10-21 10:34:14 -07:00
Evan Morikawa 8755786d90 fix(theme): more consistent styles for dark-mode theme 2015-10-09 16:05:26 -07:00
Drew Regitsky 09b91a0a28 feature(feedback): move feedback to a package, indicator for new msgs
Summary: Move all Intercom feedback code to a package. Change the appearance of the lower right question mark icon when a new intercom message is received (red, with repeating CSS bounce animation). New messages are detected by keeping the intercom window open (after the first time it's opened by the user), and listening for DOM mutations of particular classes.

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: evan

Differential Revision: https://phab.nylas.com/D2125
2015-10-07 13:55:54 -07:00
Evan Morikawa d09d292382 fix(styles): padding fixes 2015-10-05 00:38:48 -07:00
Ben Gotow 84c8e2f99d fix(icons): New artwork for a few initial packages, labels 2015-10-03 23:34:43 -07:00
Ben Gotow 8a2d10d3bd fix(feedback): Change default window position, move handling to main window, hide close buttons in Intercom 2015-10-03 22:22:12 -07:00
Ben Gotow 0a1ebd7d30 feat(templates): Final examples package is in - templates! 2015-10-03 14:05:47 -07:00
Evan Morikawa 9e41843fa4 fix(styles): fix fonts in settings and iframe 2015-10-02 17:48:36 -07:00
Evan Morikawa 609b6107f9 feat(auth): add disabled state to forms when submitting
Summary: Fixes T3773

Test Plan: manual

Reviewers: drew, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3773

Differential Revision: https://phab.nylas.com/D2105
2015-10-02 17:10:49 -07:00
Drew Regitsky 1a3294f100 feat(onboarding): add hotmail as a provider
Summary:
Adds a button for hotmail/outlook as a provider. Username field is not
shown is set to the email address for submitting to Nylas.

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: evan

Differential Revision: https://phab.nylas.com/D2095
2015-10-02 16:12:08 -07:00
Evan Morikawa 85eb94b90f fix(fonts): update fonts and styles 2015-10-01 17:55:11 -07:00
Evan Morikawa 25103c1b10 fix(fonts): update fonts 2015-10-01 11:48:19 -07:00
Evan Morikawa ae69790024 feat(archive): shows trash for non-archive accounts
Summary:
Fixes T3570
Fixes T3737

Rename ArchiveThreadHelper to RemoveThreadHelper

Rename of `getRemovalTask`

Remove unarchive from `RemoveThreadHelper`. Pass in mailviewfilter

Rename actions

Rename archive action

renmaing

support trash and archive folders in RemoveThreadHelper

Move everything over to trash

add tests

Hide trash and archive

Test Plan: new tests

Reviewers: dillon, bengotow

Reviewed By: dillon, bengotow

Maniphest Tasks: T3570, T3737

Differential Revision: https://phab.nylas.com/D2089
2015-09-30 19:51:48 -07:00
Ben Gotow 93e29d01d8 fix(initial-packages): Pull from examples directory, include in ci builds 2015-09-30 11:43:06 -07:00
Ben Gotow 76cb33b3f6 feat(post-auth): Initial prefs + packages screens, welcome copy changes
Summary:
Package names must match directory names

Not going to use new Swithc component, but might as well be part of component kit

Move APMWrapper into core so it can be used from anywhere

Move manual package install coe to package-manager

Gray out window titles when in the background

Do not allow multiple onboarding windows at the same time

Finalize styling f initial-prefs and initial-packages, make it work (only github package atm)

Other nits

Change the welcome copy:

- Call it easy to extend vs easy to use
- Remove the subtitle from the first screen which doesn't really fit
- Make the second page emphasize that its created /for/ developers and easy to extend with Javascript.
- Explain what the sync engine is rather than saying it's "faster and more extensible" (??)

Test Plan: Run tests

Reviewers: evan, dillon

Reviewed By: evan

Maniphest Tasks: T3346

Differential Revision: https://phab.nylas.com/D2079
2015-09-29 23:58:30 -07:00
Ben Gotow e9879a5495 feat(feedback): Add blue feedback button in bottom left, remove dead code from DeveloperBarStore
Summary: Adds a prominent blue button to email us feedback

Test Plan: Run tests

Reviewers: dillon, evan

Reviewed By: dillon, evan

Differential Revision: https://phab.nylas.com/D2081
2015-09-29 23:20:23 -07:00
Ben Gotow 1d9a34f5ea rename(Nylas Mail): Replace Nylas Mail > N1 2015-09-29 09:44:30 -07:00