Commit graph

858 commits

Author SHA1 Message Date
Evan Morikawa 8292a6ff68 feat(signatures): add raw signature support 2015-11-30 14:02:58 -08:00
Ben Gotow 25d4f6cd31 fix(signatures): Display signatures tab, blur after prefs changes 2015-11-30 13:39:42 -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 d7d5ed2832 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 10f291eb4e fix(prefs): Focus main window when open prefs and prevent dupe sheets
- Fixes #498
- Fixes #484
2015-11-28 09:08:45 -08:00
Ben Gotow 79413e7c45 fix(autolinker): Add title attr to all links in emails to display href
Fixes GitHub Issues #479 and #335
2015-11-25 18:29:59 -08:00
Ben Gotow 0a413a1598 fix(sidebar): selected is not actually a required prop
Fixes #476
2015-11-25 16:30:01 -08:00
Ben Gotow eeb976167e fix(license): Mark a few additional packages as GPLv3 2015-11-25 14:41:10 -08:00
Ben Gotow 5bb417c66c Merge pull request #453 from dcposch/fix-license
Internal package.json license: GPLv3
2015-11-25 14:37:54 -08:00
Ben Gotow cb756f4f07 fix(composer): Don't pass a callback to dialog API, update changelog 2015-11-25 14:13:21 -08:00
Ben Gotow a82ebba618 fix(attachments): Only preview images up to 5MB, not 10MB 2015-11-24 16:27:07 -08:00
Juan aa27692b03 Merge pull request #449 from mbilker/travis-linux-testing
Travis Linux Testing
2015-11-24 12:48:31 -08:00
Juan Tejada ff341fcf84 fix(lint): Fix linter issues on account-sidebar-section.cjsx 2015-11-24 12:44:06 -08:00
Juan Tejada f48875d681 fix(sidebar): Add minor tweaks to sidebar behavior:
- Add default prop to DisclosureTriangle to eliminate warning
- Prevent from firing a new DestroyCategoryTask if category already is
deleted
- Update onBlur event to not close input if I click on the add button
2015-11-24 11:09:00 -08:00
DC e53270f843 Internal package.json license: GPLv3
Changed from 'Propietary' to 'GPLv3' to match LICENSE.md
2015-11-24 09:09:33 -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
Ben Gotow 5ee8ffabbc fix(prefs): Minor tweaks, see description
- Make the keymaps panel less wide
- <select>'s now populate their current value properly
- Items should blur after being interacted with so that `esc` still moves you back to parent sheet
2015-11-23 20:34:04 -08:00
mbilker 35f7c54376 fix(spec): use correct modifier key based on process.platform 2015-11-23 23:31:37 -05:00
Ben Gotow e72d522b2b fix(account-sidebar): Fix specs to match new unread counts 2015-11-23 20:26:18 -08:00
Ben Gotow afa6968dc4 fix(dark-mode): Adjust email CSS immediately upon switching themes
Fixes #145
2015-11-23 20:20:06 -08:00
Ben Gotow 010b089511 fix(sidebar): Swap out + image, tweak CSS for unread 2015-11-23 20:08:10 -08:00
Juan Tejada 524028e257 feat(sidebar): Add sidebar controls to add and remove categories
Summary:
- Refactors account-sidebar internal package:
  - Separates into smaller react components
  - Makes DisclosureTriangle its own independent component
  - Adds data to AccountSidebarStore to allow removal or addition of items for a
    specific section of the sidebar
- Adds button and input and css styles to create categories
- Adds context menu to destroy a category
- Adds new method to CategoryStore to get the icon name for the categories of
  the current account
- Removes some unused code

Test Plan: Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2283
2015-11-23 19:43:56 -08:00
Ben Gotow 33d8b22d58 fix(theme): Improve styling of popout composer in dark mode 2015-11-23 18:28:30 -08:00
Ben Gotow 46a01de651 fix(copy): Call split / list modes "Single Panel / Two Panel"
Fixes T5907
2015-11-23 17:34:56 -08:00
Ben Gotow e1882ab61a feat(counts): Unread counts for all folders and labels across all accounts
Summary:
This diff replaces the UnreadCountStore with a better approach that is able to track unread counts for all folders/labels without continuous (and cripplingly slow) SELECT COUNT(*) queries.

When models are written to the database, we currently don't send out notifications with the "previous" state of those objects in the database. This makes it hard to determine how to update counters. (In the future, we may need to do this for live queries). Unfortunately, getting the "previous" state is going to be very hard, because multiple windows write to the database and the "previous" state we have might be outdated. We'd almost have to run a "SELECT" right before every "REPLACE INTO".

I created an API that allows you to register observers around persistModel and unpersistModel. With this API, you can run queries before and after the database changes are made and pluck just the "before" state you're interested in.

The `ThreadCountsStore` uses this API to determine the impact of persisting a set of threads on the unread counts of different labels. Before the threads are saved, it says "how much do these thread IDs contribute to unread counts currently?". After the write is complete it looks at the models and computes the difference between the old count impact and the new count impact, and updates the counters.

I decided not to attach the unread count to the Label objects themselves because 1) they update frequently and 2) most things observing the DatabaseStore for categories do not care about counts, so they would be updating unnecessarily.

The AccountSidebar now listens to the ThreadCountsStore as well as the CategoryStore, and there's a new preference in the General tab for turning off the counts.

Test Plan: Tests are a work in progress, want to get feedback first!

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2232
2015-11-23 17:12:22 -08:00
Ben Gotow 78dd69290d 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
Juan Tejada 8ac340cbb4 fix(tray): Prevent duplicate trays on preference changes 2015-11-23 09:53:05 -08:00
Juan Tejada cc536c1268 fix(tray): Prevent system tray from being initialized more than once
- Makes sure the tray is deactivated before activating
2015-11-23 09:31:10 -08:00
Ben Gotow 5d4c1b96a9 feat(dark-mode): Double invert filter for nice dark HTML bodies 2015-11-20 18:53:34 -08:00
Juan Tejada 98bc9dc958 feat(sidebar): Add behavior to persist collapsed state of sidebar items
Summary:  - Updates account sidebar to persist collapsed state to the the config

Test Plan:  - manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2276
2015-11-19 15:48:44 -08:00
Juan Tejada 338dc5284f fix(specs): Update composer-view-spec to use renamed functions 2015-11-18 15:51:48 -08:00
Juan Tejada 02deba38c4 fix(composer): Fix several composer issues and refactor Contenteditable
Summary:
  - Fixes T5819 issues
  - Adds ContenteditbalePlugin mechanism to allow extension of Contenteditable
    functionality, and completely removes lifecycleCallbacks from Contenteditable
  - Refactors list functionality outside of Contenteditable and into a plugin
  - Updates ComposerView to apply DraftStoreExtensions through a ContentEditablePlugin
  - Moves spell checking logic outside of Contenteditable into the spellcheck package

Fixes T5824 (atom.assert)
Fixes T5951 (shift-tabbing) bullets

Test Plan: - Unit tests and manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T5951, T5824, T5819

Differential Revision: https://phab.nylas.com/D2261
2015-11-18 15:22:31 -08:00
Ben Gotow b9954b764d fix(search): Execute search for subject, autoselect first item
Fixes T5899, but we may want to iterate on it more later.
2015-11-18 12:35:19 -08:00
Evan Morikawa 0c93cb856f fix(draft): fix showing of incorrect body when pending send
Summary: Fixes T3712

Test Plan: new tests

Reviewers: juan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3712

Differential Revision: https://phab.nylas.com/D2273
2015-11-18 12:32:07 -08:00
Ben Gotow 1d70cfae39 fix(specs): Ternary operator in jasmine-helper was valid coffee... 2015-11-17 17:48:32 -08:00
Ben Gotow 0068e7d4a7 fix(specs): Update specs following 0.29.2 > 0.34.3 move 2015-11-17 17:40:06 -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
Ben Gotow 62b8dc2d3a fix(tray): Retina tray icon with template image for dark menu bar mode 2015-11-17 15:36:52 -08:00
Ben Gotow 2f2a80b03a 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 ccd27b4427 fix(tray): Slightly resize win/linux tray icons 2015-11-14 13:10:39 -08:00
Juan Tejada 319faf8b5c fix(lint): Remove lint errors 2015-11-13 19:41:53 -08:00
Ben Gotow 620f5c949d fix(tray): "Open Inbox" if main window is minimized / hidden 2015-11-13 18:11:44 -08:00
Ben Gotow 934909a7dd fix(category-picker): vertical alignment of labels/folders icon 2015-11-13 17:42:10 -08:00
Ben Gotow afdeba5dcf fix(dropdowns): 3% darken on hover, not full blue 2015-11-13 16:58:55 -08:00
Ben Gotow 689af8d941 fix(search): Prevent search from hitting X button 2015-11-13 16:10:49 -08:00
Ben Gotow 4ebc93db57 fix(sidebar): Don't capitalize every word in label names. #401
Fixes #401
2015-11-13 09:45:19 -08:00
Juan Tejada 3a4c92a94b fix(system-tray): prevent duplicate menu item on darwin 2015-11-11 13:44:37 -08:00
Ben Gotow d8beb4a0cf undo(prefs): atom.keymaps does not implement unsubscribe 2015-11-11 10:20:48 -08:00
Ben Gotow 08db4679aa fix(prefs): atom.keymaps does not implement unsubscribe
https://github.com/atom/atom-keymap/issues/101
2015-11-09 21:44:59 -08:00
Ben Gotow d23b0fd16c fix(specs): Remove loading cover in spec window 2015-11-09 20:53:17 -08:00
Ben Gotow 452cbf1fa7 fix(ui-dark): Small color adjustments, resolves #299, #148 2015-11-09 18:52:24 -08:00
Ben Gotow debf7b902d fix(account-switcher): Dark content mode, closes #382 2015-11-09 18:15:27 -08:00
Ben Gotow 1b85eb55ef 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 369c5049a7 fix(autoload-images): Check to see if whitelist exists 2015-11-09 12:15:24 -08:00
Evan Morikawa 069b1835cd feat(selection): add selection of read, unread, starred, etc
Summary:
Can select all, deselect-all, read, unread, starred, unstarred.

Yes, it's not REALLY select "all", but it uses the items in the current
`retainedRange`. This is actually similar to what gmail does (only selects
on the first page of a 100).

Test Plan: new test

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2241
2015-11-09 10:03:55 -05:00
Juan Tejada 9801529aa1 fix(keymaps): create user keymaps file in .nylas/ if non existent 2015-11-06 19:01:31 -08:00
Ben Gotow 818e1ae986 feat(reading): Disable autoloading of images, opt-in one by one
Summary: This diff implements Gmails "load images, always load images from bengotow@gmail.com" option. Someone asked for it late last night and I figured it'd be fun to add. We also needed to refactor the MessageItem to allow for a GPG plugin - MessageItems now subscribe to the body of the message from the messageBodyProcessor, so in the event that processing rules change, someone can invalidate the processor cache by calling `resetCache()`, and then it recomputes bodies and triggers a refresh of each message body.

Test Plan: Updated existing tests, no new tests for this plugin just yet.

Reviewers: evan, juan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2235
2015-11-06 15:53:21 -08:00
Evan Morikawa 13c0ffa989 feat(keymap): add cmd+1, cmd+2, etc to quick-select accounts
Fix "unique key" for react props

Fix composer styling bug in popout composer
2015-11-06 14:38:50 -08:00
Juan Tejada 29383e436c fix(system-tray): properly deactivates package 2015-11-06 13:52:08 -08:00
Evan Morikawa 74047bb594 fix(signatures): temporarily disable signatures in preferences 2015-11-06 12:40:34 -08:00
Evan Morikawa 451816a183 fix(specs): fix specs 2015-11-06 12:08:32 -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
Juan Tejada d838610290 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
Ben Gotow d9aadd4736 fix(search): Allow typing in the middle of the search text 2015-11-04 17:11:40 -08:00
Ben Gotow b11ab8406b fix(deltas): Use the official API to create cursors 2015-10-30 22:20:41 -07:00
Evan Morikawa 6d1dbe1dbf fix(composer): support Chinese & others - handle composition events
Summary:
ignores composition event commands until they're done. We then simply
update the new state after that happens.

Some additional refactoring:

- The <Contenteditable /> prop is 'value' instead of 'html' to make it
  look more like a standard React controlled input
- Removed `filters` prop and `footerElements` prop from Contenteditable.
  These could easily be moved into the composer (where they belong).
- Moved contenteditable and a few of its helper classes into their own
  folder.
- Moved `UndoManager` up out of the `flux` folder into `src`. Currently
  undo/redo is only in the composer when all contenteditables should have
  the basic funcionality. Will refactor this later.
- Fix tests

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2211
2015-10-30 20:03:33 -04:00
Ben Gotow 0956c18cab feat(shortcuts): Pageup/dn in message list, shift+pageup/dn in thread list 2015-10-29 20:34:43 -07:00
Ben Gotow 795c4f7c80 fix(sp): It's => its 2015-10-29 19:35:31 -07:00
Evan Morikawa fa3a2ee631 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
Ben Gotow 525e1c8e89 fix(thread-list): Line up sender, subject and snippet
Fixes GitHub issue #278
2015-10-29 11:30:06 -07:00
Ben Gotow afe77b27fb feat(notifs): Native notifications for Mac OS X, Win coming
Summary: Replaces `new Notification`-based HTML5 notifications with system native notifications on Mac OS X. This allows us to implement the "Reply" button in the notifications. This will also serve as the hook for native Windows notifications, which are unsupported in Chromium.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2199
2015-10-29 11:23:51 -07:00
Ben Gotow ed13ac360b fix(notifs): Make sure notifs always have thread references
Summary:
This started as a fix to https://sentry.nylas.com/sentry/edgehill/group/2970/, which was caused by `threads[msg.threadId]?.categoryNamed('inbox') isnt null`, because `undefined isnt null`.

Then I realized that we batch "incoming" messages and threads arbitrarily, and the reason this happened is because the thread and message were split into different delta updates. Previously, notifications would just have been skipped.

Now we call `_onNewMessagesMissingThreads` when threads cannot be found for new messages, and then try to find the threads again in 10 seconds. If we can find them, we simulate a delta call and run them back through the processor. It would have been simpler to call `_onNewMailReceived` again directly, but I want to be 100% sure we never create infinite loops.

Test Plan: Run new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2188
2015-10-28 16:55:35 -07:00
Evan Morikawa e0180a1e12 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 45ffa2ce15 fix(notifications): Buttons always triggered default action 2015-10-28 10:47:44 -07:00
Ben Gotow e76adb283c feat(changelog): Link to changelog before and after updates
Summary: Link to the changelog, and add a new notification which appears after updates are installed

Test Plan: No tests to see here..

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2201
2015-10-27 16:48:05 -07:00
Ben Gotow 170c8e4eea fix(onboarding): Check code format before hitting API 2015-10-27 16:43:07 -07:00
Ben Gotow 827e10cee1 rm(composer): Dead code related to Scribe / Bower 2015-10-27 11:38:39 -07:00
Ben Gotow 659bac0069 fix(search): New X, focus styling for search
Fixes T3485
2015-10-27 11:28:11 -07:00
Ben Gotow 3a5f667a0b fix(files): Not-yet-downloaded files can be opened via double click
Fixes T4840
2015-10-27 11:05:33 -07:00
Ben Gotow b4eb8dc60c fix(onboarding): Request /status/ to avoid 302 2015-10-27 10:50:18 -07:00
Ben Gotow abca03b13d fix(prefs): Fix overflow of account names. #175 2015-10-26 10:47:47 -07:00
Ben Gotow 1e7732f260 fix(prefs): Guard against null account in preferences window 2015-10-26 10:47:47 -07:00
Ben Gotow 7e041be33c fix(drafts): Draft selection / deletion fixes 2015-10-23 16:04:27 -07:00
Ben Gotow ccbd494d64 fix(sidebar): Better disclosure triangle position on multiline labels / folders 2015-10-23 16:04:27 -07:00
Evan Morikawa e00cc0c760 fix(onboarding): fix add account button width 2015-10-23 15:21:58 -07:00
Ben Gotow a855a67d1d fix(message-list): Clicking Archive or Trash should pop back to the thread list 2015-10-23 15:21:37 -07:00
Ben Gotow 4b1d8b0fbd fix(plugins): Packages => Plugins in a few more places 2015-10-23 15:14:44 -07:00
Evan Morikawa fdf9c51606 fix(win): composer and input styles 2015-10-23 15:04:35 -07:00
Ben Gotow da3287c100 fix(undo-redo): Fix "undo" button clickability, improve animation 2015-10-23 15:03:12 -07:00
Ben Gotow 3e9e6b9faf fix(list): Additional focused CSS changes 2015-10-23 14:55:07 -07:00
Ben Gotow 4cebe51e17 fix(threads): Show the archive button in the bulk action bar 2015-10-23 14:50:39 -07:00
Evan Morikawa 539e9b3799 fix(archive): can archive and trash from focused message 2015-10-23 14:49:29 -07:00
Ben Gotow fc840384da fix(list): Incorrect snippet color on unread selected threads in narrow mode 2015-10-23 12:54:02 -07:00
Ben Gotow 8393fdbf94 fix(keymaps): Reveal keymap.cson rather than opening 2015-10-23 12:49:14 -07:00
Ben Gotow 1ad6c563a4 fix(thread-list): Better hover state for quick actions 2015-10-23 12:47:32 -07:00
Evan Morikawa 4390edcc64 fix(windows): fix apm package loading and onboarding styles 2015-10-23 12:18:00 -07:00
Ben Gotow ea23796bf8 fix(onboarding): Do not open plugin folders after install 2015-10-23 11:58:33 -07:00
Ben Gotow d4053d00fe fix(onboarding): Replace ❤️ with a heart image for win32 2015-10-23 11:42:55 -07:00
Ben Gotow ebd98c711a fix(onboarding): Fix size animation, resolves #150 2015-10-23 11:35:13 -07:00
Ben Gotow 4697ead406 Merge pull request #121 from madhugb/master
Fixed a pixel cut in floating-toolbar
2015-10-23 09:54:39 -07:00
Ben Gotow 3770014808 fix(drafts): Fix missing import, resolves Sentry 4041 2015-10-22 16:13:37 -07:00
Ben Gotow 4a37766a17 fix(spellcheck): Fix dead code, resolve Sentry 3594 2015-10-22 16:08:03 -07:00
Evan Morikawa cfb4142471 fix(event): remove EventStore
Summary:
The EventStore was really doing nothing, except caching hundreds of MB of
event data unnecessarily in each and every window :(

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2187
2015-10-22 14:14:58 -07:00
Ben Gotow 334830d6e1 fix(feedback): Links should open in the user's default browser 2015-10-22 11:34:51 -07:00
Ben Gotow e69da22e5e 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
Ben Gotow f3c4c04d00 fix(onboarding): Correct error where token pane is too small 2015-10-22 10:32:20 -07:00
Madhu GB fc01b1bc56 A pixel cut in floating-toolbar 2015-10-22 11:18:55 +05:30
Evan Morikawa 54837b3ab8 fix(lint): fix indentation linter error 2015-10-21 20:39:05 -07:00
Evan Morikawa b76fd0e578 feat(windows): improve UI for Windows
Remove rounded corners and gradients
2015-10-21 20:32:33 -07:00
Evan Morikawa 1516e3fb8c feat(windows): upgarade preferences UI on Windows 2015-10-21 17:28:52 -07:00
Ben Gotow a1995fc505 fix(empty-state): Subpixel animation via translate3d 2015-10-21 14:52:50 -07:00
Ben Gotow 1de7f36361 Merge pull request #109 from NSHenry/master
feat(onboarding): Optional eas_server_host field for Exchange auth
2015-10-21 14:38:17 -07:00
Ben Gotow edaa07dfee fix(account-switcher): Chevron icon was upside-down 2015-10-21 14:12:27 -07:00
Ben Gotow deb8f03864 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 7969ed14c8 feat(win32): improve button styles for Win 8.1 spec 2015-10-21 12:17:34 -07:00
Ben Gotow eba7c62787 fix(category): Consolidate logic around "archive" vs" all" 2015-10-21 11:58:06 -07:00
Ben Gotow 3452129738 fix(art): Correct "Trash" icon, naming consistency 2015-10-21 11:58:05 -07:00
Alexander Gudulin 0503be59a5 Revert back container width, fix controls align 2015-10-21 21:52:04 +03:00
Evan Morikawa 6c0370d7a8 feat(tooltip): use native tooltip style 2015-10-21 11:27:57 -07:00
Alexander Gudulin 1de28f670b Setup styles for dropdown (select) control 2015-10-21 21:27:53 +03:00
Ben Gotow 81008e70bb fix(specs): Unbreak tests for CategoryPicker 2015-10-21 10:57:42 -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 fc252673ab 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 092c28d2c0 fix(tasks): don't continue if dependent task fails
Summary:
Fixes T4291

If I made a final edit to a pre-existing draft and sent, we'd queue a
`SyncbackDraftTask` before a `SendDraftTask`. This is important because
since we have a valid draft `server_id`, the `SendDraftTask` will send by
server_id, not by POSTing the whole body.

If the `SyncbackDraftTask` fails, then we had a very serious issue whereby
the `SendDraftTask` would keep on sending. Unfortunately the server never
got the latest changes and sent the wrong version of the draft. This
incorrect version would show up later when the `/send` endpoint returned
the message that got actually sent.

The solution was to make any queued `SendDraftTask` fail if a dependent
`SyncbackDraftTask` failed.

This meant we needed to make the requirements for `shouldWaitForTask`
stricter, and block if tasks failed.

Unfortunatley there was no infrastructure in place to do this.

The first change was to change `shouldWaitForTask` to `isDependentTask`.
If we're going to fail when a dependent task fails, I wanted the method
name to reflect this.

Now, if a dependent task fails, we recursively check the dependency tree
(and check for cycles) and `dequeue` anything that needed that to succeed.

I chose `dequeue` as the default action because it seemed as though all
current uses of `shouldWaitForTask` really should bail if their
dependencies fail. It's possible you don't want your task dequeued in this
dependency case. You can return the special `Task.DO_NOT_DEQUEUE_ME`
constant from the `onDependentTaskError` method.

When a task gets dequeued because of the reason above, the
`onDependentTaskError` callback gets fired. This gives tasks like the
`SendDraftTask` a chance to notify the user that it bailed. Not all tasks
need to notify.

The next big issue was a better way to determine if a task truely errored
to the point that we need to dequeue dependencies. In the Developer Status
area we were showing tasks that had errored as "Green" because we caught
the error and resolved with `Task.Status.Finished`. This used to be fine
since nothing life-or-death cared if a task errored or not. Now that it
might cause abortions down the line, we needed a more robust method then
this.

For one I changed `Task.Status.Finished` to a variety of finish types
including `Task.Status.Success`. The way you "error" out is to `throw` or
`Promise.reject` an `Error` object from the `performRemote` method. This
allows us to propagate API errors up, and acts as a safety net that can
catch any malformed code or unexpected responses.

The developer bar now shows a much richer set of statuses instead of a
binary one, which was REALLY helpful in debugging this. We also record
when a Task got dequeued because of the conditions introduced here.

Once all this was working we still had an issue of sending old drafts.

If after a `SyncbackDraftTask` failed, now we'd block the send and notify
the users as such. However, if we tried to send again, there was a
separate issue whereby we wouldn't queue another `SyncbackDraftTask` to
update the server with the latest information. Since our changes were
persisted to the DB, we thought we had no changes, and therefore didn't
need to queue a `SyncbackDraftTask`.

The fix to this is to always force the creation of a `SyncbackDraftTask`
before send regardless of the state of the `DraftStoreProxy`.

Test Plan: new tests. Lots of manual testing

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Maniphest Tasks: T4291

Differential Revision: https://phab.nylas.com/D2156
2015-10-21 10:33:43 -07:00
Nate Henry 57b608e464 Added eas_server_host field
eas_server_host field added to allow for specifying the Exchange server
if necessary.
2015-10-21 11:33:11 -04:00
Ben Gotow 0084306a69 fix(thread-list): stop thread-icons from shrinking, justify participants explicitly 2015-10-14 18:05:29 -07:00
Ben Gotow 31991d370e fix(config): new mail sounds on by default, change config keypath
unread-notifications.sounds => core.notifications.sounds
2015-10-14 17:11:36 -07:00
Ben Gotow c7b2a69926 fix(sidebar): Prevent white top border in all scenarios 2015-10-12 11:14:44 -07:00
Ben Gotow 8d627b5cae fix(sidebar): Remove top margin causing white border 2015-10-12 11:04:27 -07:00
Ben Gotow 1ea7a3285e fix(feedback): Make button slightly smaller, less obtrusive 2015-10-12 11:04:27 -07:00
Ben Gotow 5155db25d5 fix(thread-list): Enable drag and drop in narrow view 2015-10-12 11:04:27 -07:00
Ben Gotow 01a3fa3876 fix(intercom): Badge the intercom button, don't use safe-ipc 2015-10-09 16:12:52 -07:00
Evan Morikawa 676cb77e7b fix(theme): more consistent styles for dark-mode theme 2015-10-09 16:05:26 -07:00
Ben Gotow 9107bc325e fix(specs): ContactStore spec fixes for new contact ranking support 2015-10-09 13:42:24 -07:00
Drew Regitsky d3d450105e fix(contacts): move contact rank fetching to sync workers, refactor
Summary:
Fixes bug where contact ranking was not being fetched, and refactors the refreshing
of contact ranks. Moves periodic refreshing of the database-stored ranks to the sync
workers so it occurs in the background, once per account. Refactors JSON cache code
accordingly.

Test Plan: manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2137
2015-10-09 12:40:36 -07:00
Evan Morikawa 21a4bcb3c4 Fix scrollability in expanded activity sidebar
Summary:
If your screen is narrow or you are syncing a lot of stuff, the expanded
activity sidebar had no scroll affordance

Test Plan: manual

Reviewers: drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2135
2015-10-09 09:31:37 -07:00
Ben Gotow d5e04295b2 fix(initial-sync): When an error is encountered, do not start fetching from zero again
Summary:
Previously, when an error was encountered during initial mailbox sync we just started it
over after a retry delay. Recent API uptime issues mean that this was happening often and lots of
people were seeing sync retry many times. This is bad because the app is less performant while
it's syncing mail, and also generates unnecessary load as the app re-fetches threads it already has.

In this diff, there are new specs and functionality in nylas-sync-worker to start fetching
where we left off. This is typically going to be OK because the default sort ordering of the
threads endpoint is newest->oldest, so if new items have arrived since we started fetching
and page boundaries have changed, we'll get duplicate data rather than missing data. Connceting
to the streaming API as soon as we start the sync also ensures that we roll up any changes to
data we've already paginated over.

Test Plan: Run tests

Reviewers: drew, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2132
2015-10-08 19:02:54 -07:00
Evan Morikawa 900cd69438 fix(developer): visual improvements to developer bar
Summary: Make ETIMEDOUT red

Test Plan: manual

Reviewers: bengotow, dillon

Reviewed By: dillon

Differential Revision: https://phab.nylas.com/D2126
2015-10-07 17:28:45 -07:00
Drew Regitsky 7f0fca9c25 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
Ben Gotow 2cedc4cfea fix(auth): Resize the auth window after an update to the token status 2015-10-06 17:58:07 -07:00
Drew Regitsky d9ac4e4359 fix(onboarding): fix error handling for invalid account data from server
Summary:
Change `addAccountFromJSON` in `AccountStore` to throw an exception when it encounters
invalid data, instead of calling `atom.emitError()`. Just calling `emitError` doesn't
throw an exception, so the code proceeds as if an account has been added. Instead, call
`emitError` from AccountSettingsPage, and display an error message to the user.

Test Plan: manual

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: evan

Differential Revision: https://phab.nylas.com/D2116
2015-10-05 17:31:29 -07:00
Ben Gotow a8228238d3 fix(specs): Clean up spec failures due to hot fixes prior to launch 2015-10-05 16:45:30 -07:00
Michael Grinich f04682031c actually no more gh-pages 2015-10-05 05:08:53 -07:00
Ben Gotow f29f0eb839 fix(auth): Rename edgehill.token => invitationCode in config 2015-10-05 03:34:11 -07:00
Ben Gotow 20e1a7de9d fix(auth): Merge but temporarily disable encrpytion during Gmail Oauth 2015-10-05 03:27:28 -07:00
Ben Gotow 0675e75650 fix(onboarding): Packages => plugins, at least in the text 2015-10-05 02:07:10 -07:00
Evan Morikawa 658a267f9d fix(styles): padding fixes 2015-10-05 00:38:48 -07:00
Ben Gotow e84b993071 disable(events): Turn off the events package until it can be polished 2015-10-04 16:57:43 -07:00
Ben Gotow 4ae5483fb6 fix(lint): Indentation causing linter failures 2015-10-04 16:53:39 -07:00