Commit graph

451 commits

Author SHA1 Message Date
Juan Tejada 9298c9a129 fix(empty-state): Remove z-index to allow undo toast to work 2016-03-25 12:30:08 -07:00
Juan Tejada 9e9928861c fix(empty-state): Update animation assets 2016-03-25 12:21:41 -07:00
Juan Tejada a43a73c35d fix(empty-state): Limit scaling factor for animation
- Fix display: none in css
2016-03-25 10:56:49 -07:00
Juan Tejada 843751ea94 fix(styles): Remove unused style in empty-state.less 2016-03-25 10:48:32 -07:00
Juan Tejada 30055abf34 feat(inbox-zero): Adds inbox zero animations and empty states
Summary: Adds inbox zero animations and empty states

Test Plan: Manual

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2801
2016-03-25 09:56:02 -07:00
Jackie Luo 2fedf7f091 fix(themes): Re-add disclosure triangles to Taiga 2016-03-24 16:19:41 -07:00
Jackie Luo d0b001012e feat(composer-emoji): Add emoji button to composer
Summary: The emoji picker allows users to insert emoji to their messages on click. A few emoji that don't render properly in Chromium are replaced with PNGs, both in the composer view and the message list view, but only the Unicode characters are sent in the message bodies.

Test Plan: TODO

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2787
2016-03-24 10:45:48 -07:00
Juan Tejada 176e3d05c3 fix(popover): Reduce animation length to 100ms 2016-03-23 17:43:43 -07:00
Juan Tejada 419eace7e8 feat(popover): Add subtle ease-in animation when opening popover
- Closes popover on window resize:
  - Re rendering popover on window resize will be a bit more tricky because
    the FixedPopover only receives an origin rect. The one who
    dispatches the action has the responsability of re dispatching when
    the window resizes
- Fixes tiny behavior in send later popover
2016-03-22 13:45:07 -07:00
Ben Gotow 5dcb3a1bce fix(template): Rewrite in ES6, add missing windowTypes 2016-03-21 18:25:50 -07:00
Juan Tejada 96846d4052 feat(download-all): Adds download-all button + style updates, more ES6
Summary:
- Adds initial version of download all button
- Converts attachments plugin to ES6 and adds updated styling
- Updates quoted text button
- #905, #1712

Test Plan: - Unit + manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2769
2016-03-21 18:23:26 -07:00
Juan Tejada e83bf2bbec feat(selection): Add new display for selection count + update toolbar
Summary:
- New behavior is that the in split mode, you will perform actions on
  the selection via the MessageListToolbar (the toolbar positioned above
  the message list)
- Refactored and moved around a bunch of code to achieve this:
  - Mostly renaming stuff and moving stuff around and removing some
    duplication
  - Update naming of toolbar role to a single role, and update relevant code
  - Converted and refactored a bunch of code into ES6, specifically to reuse the code for the ThreadActionsToolbar at the 2 locations
  - Deprecated MultiselectActionBar in favor of MultiselectToolbar
  - Deprecated old roles
- Punted the animation for the stackable cards in the selection display for now.
- #370

Test Plan: - Manual and unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2756
2016-03-21 12:20:11 -07:00
Ben Gotow d58a1aeaf3 feat(dock-icon): Drop files to attach them to new msg
Summary:
Fix specs

Fix responding to mailto, files at launch

It's super important that `window:loaded` is /not/ sent from index.js because `loadSettings.bootstrapScript` is async and nothing is actually loaded yet. This was causing the app to dispatch the mailto:// links into the main window before a DraftStore existed.

I think this was necessary at one point because we had NylasWindows not using a bootstrapScript? Should not be here anymore...

Test Plan: Run a few new tests

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2737
2016-03-17 13:14:55 -07:00
Jackie Luo 8b1f443b1a fix(ui-variables): Add correct hexcode for @background-color-success 2016-03-15 20:01:01 -07:00
Jackie Luo c49d523e8f refactor(ui-variables): Clean UI variables for consistency/usage
Summary: Shortens and simplifies UI variables so that unused variables are no longer present.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2738
2016-03-15 11:18:50 -07:00
Jackie Luo f695c9c8a8 🎨(plugins): Fixes switch alignment issue in #1743 2016-03-15 11:09:09 -07:00
Jackie Luo c68834553d Merge pull request #1731 from jamiewilson/darkside
(darkside) using new toolbar selectors, svgs, etc
2016-03-14 18:50:43 -07:00
Jackie Luo e5c2075d26 🎨(plugins): Add theme-specific icon in plugins tab 2016-03-14 17:55:25 -07:00
Jamie Wilson 913c9d633c using new toolbar selectors, svgs, etc. 2016-03-14 19:02:00 -05:00
Jackie Luo 6e9384792a 🎨(themes): Fixes Windows button UI issues in #1649 2016-03-12 11:43:49 -08:00
Jackie Luo 3068a08de5 fix(themes): Add classes for toolbar elements 2016-03-11 16:55:28 -08:00
Jackie Luo 688582bf57 🎨(theme-picker): Adjust styles 2016-03-10 15:18:57 -08:00
Jackie Luo 4d7f515090 feat(plugins): Move uninstall from theme picker to plugins tab
Summary: Move uninstall functionality to the plugins tab in preferences.

Test Plan: Tested locally.

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2716
2016-03-10 14:16:07 -08:00
Jackie Luo 73e01dabb4 fix(themes): Fix linter issues and relink images 2016-03-10 11:54:05 -08:00
Ben Gotow 263c3a152e 💄(sidebar): Replace icon with person 2016-03-10 11:15:52 -08:00
Ben Gotow 1cb8108c31 💄(workspace): Fix #1482 2016-03-09 14:09:35 -08:00
Evan Morikawa 8475afbbfb fix(sidebar): ui tweaks to narrow sidebar 2016-03-09 15:46:10 -05:00
Juan Tejada c6acca8ca3 remove(popover): Remove Popover in favor of FixedPopover
Summary:
- FixedPopover now correctly adjusts itself when overflowing outside
  window, in all directions
  - Updates styles
  - Adds specs
- Remove Popover and popover.less, and refactor all code that used it in
  favor of the new FixedPopover

Test Plan: Unit tests

Reviewers: drew, evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2697
2016-03-09 10:05:46 -08:00
Jackie Luo ba5cba3181 feat(theme-picker): Uninstall themes on click
Summary: Themes can now be uninstalled by clicking a button in the theme picker, instead of going to `~/.nylas/packages` to delete the directory.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2700
2016-03-08 17:08:35 -08:00
Drew Regitsky 6a4b081707 fix(sync-errors): Handle account deltas indicating sync issues
Summary:
Changes the delta code to handle new deltas on the Account object,
which are triggered by changes in sync state indicating various backend
issues. Saves the sync state in a new field on the Account object, which
is persisited in `config.cson`.

Includes several UI changes to display more information when an account has
backend sync issues. Adds better messages and new actions the user can take
based on the type of sync issue.

Additionally, fixes bug in action bridge that was preventing multi-arg global
actions from working.

Test Plan:
Manual, by testing different sync state values and triggering deltas from the
backend

Reviewers: juan, evan, bengotow

Reviewed By: evan, bengotow

Subscribers: khamidou

Differential Revision: https://phab.nylas.com/D2696
2016-03-08 16:06:04 -08:00
Ben Gotow 9bb181ef3e 💄(search): Show focus around search input 2016-03-07 18:19:17 -08:00
Jackie Luo c67e2a24ea feat(theme-picker): Add visual theme picker to menu
Summary: Adds a new visual theme picker to the menu that allows users to select different themes based on color palettes and then change their themes live.

Test Plan: Test included.

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2669
2016-03-04 15:34:48 -08:00
Evan Morikawa 69b4185a93 fix(win): fix minor styling for buttons on windows 2016-03-04 14:37:11 -05:00
Juan Tejada f46502ad3e test(plugins): Add snooze and send later specs
Summary:
- Also refactors the code a bit for testability and maintainability
- Fixes #1515

Test Plan: - Unit tests

Reviewers: evan, drew, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2651
2016-03-03 12:38:42 -08:00
Evan Morikawa 10e0fcc965 feat(find-in-thread): add the ability to find in a thread
Summary: Find in thread

Test Plan: todo

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2660
2016-03-02 14:46:27 -08:00
Juan Tejada 93f43f6b4f feat(snooze): Add snooze date label to snooze threads
- Adds a new InjectedComponentSet for the role 'ThreadList:Label'.
- Adds a new label to the thread list indicating the snooze date if the
  thread has been snoozed
- Coerces MailLabel to achieve this. This is a temporary hack, we should
  design a better view to display snooze date information
2016-02-25 13:12:40 -08:00
Drew Regitsky d5ba162e82 fix(composer-buttons): Fix broken icons on overflow, make buttons wrap 2016-02-25 12:30:20 -08:00
Evan Morikawa d710ffd817 fix(popover): set min-width on popovers 2016-02-25 12:06:45 -08:00
Juan Tejada 2a757f332e fix(plugins): Add headers for composer popover + Fix in snooze popover 2016-02-25 10:24:29 -08:00
Ben Gotow 7908a11251 💄(sidebar): 1px fix for @drew ;-) 2016-02-24 21:06:06 -08:00
Ben Gotow 9d0ebe9423 fix(snooze): A few minor popover adjustments. See desc.
- Rather than have a `showing` prop on the fixed popover, I just remove it and put a span in it's place when it's gone. This means we always get componentDidMount when the popover appears and simplifies when to focus it's content.
- The fixed popover implements esc and blur behaviors itself
- The fixed popover uses the background-secondary color and works in dark mode
- The snooze items have hover and active states
2016-02-24 20:05:21 -08:00
Ben Gotow 91f60592ff fix(thread-list): Invisible div extending into thread list blocks clicks 2016-02-24 20:05:21 -08:00
Jackie Luo 8aee4e6472 🎨(floating-toolbar): Fix height for floating toolbar pointer 2016-02-24 17:25:57 -08:00
Juan Tejada a2311ce631 fix(popover): Unmount any fixed popover that's already rendered
- Fix input styles for fixed popover
2016-02-24 16:22:30 -08:00
Drew Regitsky 1cd9fcf535 fix(sidebar): Only show add folder icon on hover 2016-02-24 16:11:00 -08:00
Ben Gotow 73bc277d68 💄(composer): Shadow on pointer of floating toolbar 2016-02-24 14:12:07 -08:00
Jackie Luo 4459fad47b 🎨(composer-emojis): Remove pointer and adjust styling
Summary: The floating toolbar now takes an optional boolean to decide whether it shows the pointer.

Test Plan: Tested locally.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2628
2016-02-24 11:31:32 -08:00
Juan Tejada ab181305b3 💄 (popover): Properly apply styles to input inside popover
- Fix tabindex in send later popover
- Update placeholder copy
2016-02-24 11:22:54 -08:00
Ben Gotow 7bc335c28b fix(*): misc fixes for warnings, appearance of PL indicators 2016-02-24 01:04:57 -08:00
Juan Tejada d95ecd29c9 fix(styles): Fix popover styles caused by incorrect merge 2016-02-23 20:08:43 -08:00
Juan Tejada e82278ab25 feat(snooze): Adds initial design pass and update snooze popover
Summary:
- Add FixedPopover, an absolutely positioned popover component to use for swipe snoozing:
  - This component needs to be finished, as its current behavior is primarily for the snooze plugin
- Updates popover.cjsx to properly render pointer for thesnooze popover for the `down` direction
- Adds new design assets
- Adds date input to snooze popover

Test Plan: - TODO

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2624
2016-02-23 20:03:42 -08:00
Ben Gotow 5e78a9b2c6 💄(plugins): Updated assets and a bit of error handling 2016-02-23 17:51:10 -08:00
Ben Gotow 6392073a64 💄(toolbar): Baseline fix for mark as read 2016-02-23 15:56:34 -08:00
Ben Gotow 40274cfc77 fix(composer): Redo toolbar styling with theme variables + minor fixes 2016-02-23 15:40:44 -08:00
Ben Gotow 5f38c9dfb1 fix(send-later): Re-order so send later always appears beside send 2016-02-23 14:37:10 -08:00
Evan Morikawa 2dc88f3fe2 fix(img): png-crush images 2016-02-23 14:12:02 -08:00
Evan Morikawa eedf84792d fix(composer): fix styles in popout composer 2016-02-23 13:55:31 -08:00
Ben Gotow 39265572bc 💄(send-later): Lots of styling of send-later 2016-02-23 13:52:18 -08:00
Evan Morikawa 481dc28585 feat(composer): new composer footer and icon design 2016-02-23 13:42:10 -08:00
Evan Morikawa 97b15a5ace feat(inbox-zero): add minimal graphic to inbox when no threads 2016-02-23 10:50:08 -08:00
Ben Gotow 34da43c42a 💄(icon): A delightful seafoam green icon 2016-02-23 10:35:08 -08:00
Ben Gotow 420bfbd2f6 fix(list): Restore keyboard cursor to single pane mode 2016-02-22 16:08:44 -08:00
Ben Gotow d3641d2703 💄 Minor visual tweaks to win32 + dark mode 2016-02-22 13:30:12 -08:00
Ben Gotow f63b7e66e4 feat(swipe-to-*): Gesture support and animation in thread list
Summary:
This diff does two things:
- It adds a new SwipeContainer that makes it easy to implement swipe gestures. This is built into listTabular, so you can create a list and define onSwipeLeft/Right to enable gestures.

- It adds support for basic add/remove animations to the thread list. This works by adding a CSS transition to `top` and also leaving removed rows around for a specified time. (these times need to match.) Pretty much just cloned the core idea from TimeoutTransitionGroup.

Test Plan: No tests yet

Reviewers: evan, juan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2581
2016-02-19 18:22:28 -08:00
Ben Gotow 9392422760 fix(launchscreen): hack until renderer sync fixed upstream 2016-02-18 16:09:30 -08:00
Ben Gotow d49cbbf62b fix(lint): LESS lint issues 2016-02-18 15:49:45 -08:00
Ben Gotow 298eb06548 💄: White buttons, dropdown / popover cleanup, hairline dividers 2016-02-18 15:21:42 -08:00
Ben Gotow fa34fc303f fix(onboarding): Missing require for Actions, bad CSS 2016-02-17 22:21:23 -08:00
Evan Morikawa cc540fef6e fix(composer): allow link paste without tooltip
Also fix style issues with link text.

Fix cmd+k link editing when nothing is selected.

Make confirm button only appear when there are changes to be made
2016-02-12 13:50:20 -08:00
Ben Gotow 9dff4e22c9 fix(outline-view): Make text larger in the sidebar 2016-02-12 10:20:14 -08:00
Ben Gotow 92abf1f441 🎨: Fixes, labels in narrow thread view, better label wrap 2016-02-11 15:25:24 -08:00
Ben Gotow 3b2b844485 Merge pull request #1283 from rittbys/master
Change the title bar to say Nylas N1 instead of Nylas
2016-02-10 14:39:13 -08:00
Ben Gotow 8a8170eb0e 🎨: Smaller buttons, smaller toolbar, smaller text
This should not be considered final, but we do plan to shrink the size of the entire UI slightly to match platform conventions.
2016-02-09 19:45:24 -08:00
rittbys b4267ff7df Changed the title bar to say Nylas N1 instead of Nylas
Changes to be committed:
	modified:   static/index.html
2016-02-09 18:30:05 -06:00
Ben Gotow 5676a52d47 fix(csp): other URL schemes don't count as '*' 😶 2016-02-09 15:02:11 -08:00
Ben Gotow 24237af004 fix(csp): Allow image-src *, fixes #1254 2016-02-08 22:42:29 -08:00
Ben Gotow fbb7a4b40c bump(*): Electron 0.36.7, version to 0.4.6 2016-02-08 18:35:23 -08:00
Ben Gotow 7406e2a5a3 feat(perspective): Restore through NylasEnv.savedState 2016-02-05 18:36:48 -08:00
Ben Gotow b784dcc3e7 💄(thread-list): Correct top border on selected threads. Fixes #1189 2016-02-02 11:12:28 -08:00
Ben Gotow 0fb109aeee feat(reorder): Re-order mail rules (#1074) and accounts (#631)
Summary:
This implements EditableList re-ordering via a new prop callback.
You can drag and drop items in the mail rules list and the accounts list.
Note that you can't drag between lists - right now this is just to enable
re-ordering.

Test Plan: No new specs yet

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2495
2016-02-01 14:06:54 -08:00
Ben Gotow c9cb887b57 security(*): Disable eval in all windows (#1159) 2016-01-29 19:25:31 -08:00
Ben Gotow 12f3ca4f3b fix(dropdown): Open up or down depending on position 2016-01-29 15:52:40 -08:00
Juan Tejada 2955ce7dee fix(styles): Cleanup less files for account sidebar and switcher 2016-01-29 11:03:52 -08:00
Ben Gotow 7d782ea084 fix(drag-drop): Fix drop styles in account sidebar 2016-01-28 16:57:24 -08:00
Ben Gotow de489368e6 fix(unified): Add a unified icon. designer gets back tues. 2016-01-28 16:01:22 -08:00
Juan Tejada aa4de82625 Add folder/label renames
- Updates OutlineView to reuse OutlineViewItem for creating new items
- Adds ability to edit outline view items via double click or right
  click
- Cleans up css and code and sidebar item
- Updates SyncbackCategoryTask to update categories as well
- Adds 405 to permanent api error codes
2016-01-27 23:16:17 -08:00
Ben Gotow e2234bf58e Merge branch 'master' into unified-inbox
# Conflicts:
#	internal_packages/feedback/lib/feedback-button.cjsx
#	internal_packages/thread-list/lib/thread-list.cjsx
#	src/flux/stores/draft-store.coffee
2016-01-25 17:28:29 -08:00
Juan Tejada d008d5f475 Fix editable list input styles 2016-01-25 14:55:01 -08:00
Evan Morikawa ecbadaf01e feat(send): Send and Archive
Summary: Send and Archive plus a new setting.

Test Plan: new tests

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2446
2016-01-25 14:14:09 -08:00
Juan Tejada 0fce8a059f Decrease OutlineView children indentation 2016-01-20 19:30:12 -08:00
Juan Tejada 99f997d953 Fix styles for outline view heading 2016-01-20 17:47:59 -08:00
Juan Tejada 6c559ddb7e Add collapse capabilities to OutlineView
- Make user category sections collapsible when in unified view
- Get rid of dumb CategoryHelpers class
2016-01-20 17:09:05 -08:00
Evan Morikawa c7a685630d refactor(toolbar): allow toolbar extensions in contenteditable
Summary:
This is a refactor of the toolbar in the contenteditable. Goals of this
are:

1. Allow developers to add new buttons to the toolbar
2. Allow developers to add other component types to the floating toolbar (like the LinkEditor)
3. Make the toolbar declaratively defined instead of imperatively set
4. Separate out logical units of the toolbar into individual sections
5. Clean up `innerState` of the Contenteditable

The Floating Toolbar used to be an imperative mess. Doing simple
functionality additions required re-understanding a very complex set of
logic to hide and show the toolbar and delecately manage focus states.
There also was no real capacity for any developer to extend the toolbar.

It also used to be completely outside of our `atomicEdit` system and was a
legacy of having raw access to contenteditable controls (since it all used
to be directly inside of the contenteditable)

Finally it was difficult to declaratively define things because the
`innerState` of the Contenteditable was inconsistently used and its
lifecycle not properly thought through. This fixed several lifecycle bugs
with that.

Along the way several of the DOMUtils methods were also subtly not
functional and fixed.

The Toolbar is now broken apart into separate logical units.

There are now `ContentedtiableExtension`s that declare what should be
displayed in the toolbar at any given moment.

They define a method called `toolbarComponentData`. This is a pure
function of the state of the `Contenteditable`. If selection and content
conditions look correct, then that method will return a component to
render. This is how we declaratively define whether a toolbar should be
visible or not instead of manually setting `hide` & `show` bits.

There is also a `toolbarButtons` method that declaratively defines buttons
that can go in the new `<ToolbarButtons>` component.

The `ToolbarButtonManager` takes care of extracting these and binding the
correct editorAPI context.

Now the `<LinkEditor>` is a separate component from the `<ToolbarButtons>`
instead of being smashed together.

The `LinkManager` takes care of declaring when the `LinkEditor` should be
displayed and has properly bound methods to update the `contenteditable`
through the standard `atomicEdit` interface.

If users have additional contenteditable popup plugins (like displaying
extra info on a name or some content in the composer), they can now
implement the `toolbarComponentData` api and declaratively define that
information based on the state of the contenteditable.

Test Plan: TODO

Reviewers: bengotow, juan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2442
2016-01-20 14:35:20 -08:00
Ben Gotow 45403131f1 rm(intercom): Point feedback to support.nylas, shrink button 2016-01-20 11:26:14 -08:00
Ben Gotow 50e03946dd Show the important icon whenever any account in the perspective supports it 2016-01-19 00:00:08 -08:00
Juan Tejada 866805f835 More account sidebar refactor + sections for unified inbox
- Refactors some of the old code which was 💩
  - Makes SidbarSection a factory for different types of items for the
    OutlineView
  - Decided not to create a OutlineViewItem.Model class since the only
    purpose it would serve would be to validate getters for props or for
    documentation, both of which are already done via React.PropTypes.
- Adds sections when looking at unified inbox and integrates with new
  mailbox perspecitve interface
- Updates OutlineViewItem a bit + styles
- Tests missing
2016-01-18 23:22:46 -08:00
Juan Tejada e1084708b8 Minor fixes and style updates 2016-01-18 11:48:34 -08:00
Juan Tejada ebb9c9735f AccountSidebar package refactor:
- Creates OutlineView generic component and uses that instead of custom
  code
- Refactors AccountSidebarStore:
  - Split the generation of the state tree into smaller functions
  - Adds different types of account sidebar items and sections, which contain
    logic and props necessary to be rendered as OutlineViewItems, and
    removes that logic from the store
- Removes WorkspaceStore.SidebarItem and removes the ability to register
  new sidebar items. If people want to add something to the sidebar they
  can just register a Component via the component registry and use the
  OutlineView component
- Removes the DraftListSidebarItem, which was basically duplicated code
  for an item but with a different data source. This is now handled
  generically by the account sidebar by rendering OutlineViewItems with
  different props and handlers
- Clean ups here and there:

- TODO
  - Add AccountSwitcher
  - Revisit calculation and generation of the state tree. Should the
    parent store contain and update the entire state all the time.
    Should separate items inside the tree have their own data sources?
  - This would avoid having the AccountSidebarStore listen to a bunch of
    different other stores, and the specific logic wold be contained
    inside each item type.
2016-01-15 16:55:21 -08:00
Ben Gotow 97d49256bd fix(packages): Default icon for third-party packages 2016-01-12 13:52:01 -08:00
Ben Gotow c0ff88d1b0 Revert "bump(electron): 0.35.4 => 0.36.2"
This reverts commit 863bda2f86.
2016-01-08 10:06:16 -08:00
Ben Gotow 863bda2f86 bump(electron): 0.35.4 => 0.36.2 2016-01-06 13:20:27 -08:00
DC a423e406c2 Make test output selectable 2015-12-31 04:06:18 -08:00
Ben Gotow 913787eacf fix(styles): Allow css from any domain (for web fonts) 2015-12-28 11:25:58 -08:00
Ben Gotow af67597f0b feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:

- The preferences package has a new tab which allows you to edit
  mail filters. Filters are saved in a new core store, and a new
  stock component (ScenarioEditor) renders the editor. The editor
  takes a set of templates that define a value space, and outputs
  a valid set of values.

- A new MailFilterProcessor takes messages and creates tasks to
  apply the actions from the MailFiltersStore.

- The worker-sync package now uses the MailFilterProcessor to
  apply filters /before/ it calls didPassivelyReceiveNewModels,
  so filtrs are applied before any notifications are created.

- A new task, ReprocessMailFiltersTask allows you to run filters
  on all of your existing mail. It leverages the existing TaskQueue
  architecture to: a) resume where it left off if you quit midway,
  b) be queryable (for status) from all windows and c) cancelable.
  The TaskQueue is a bit strange because it runs performLocal and
  performRemote very differently, and I had to use `performRemote`.
  (todo refactor soon.)

This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.

Test Plan: Run tests, only for actual filter processing atm.

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2379
2015-12-23 02:19:32 -05:00
Juan Tejada 2503263e93 fix(feedback-window): Remove handler that prevented window from closing
- Fixes #773
- window.onbeforeunload inside feedback window was returning false and
preventing the window from being closed.
2015-12-20 01:50:44 -08:00
Juan Tejada f0cc7afb54 fix(editable-list): Prevent empty selection on esc pressed + other fixes
- When prop specified to not allow empty selection it should also
prevent it from being cleared when pressing Esc while focusing the list
- Adds a default value to the edit item input
- Updates specs
- Updates styles
2015-12-14 14:29:45 -08:00
Evan Morikawa ad68c0729a fix(hot-api): remove react-hot-api 2015-12-11 11:22:22 -05:00
Juan Tejada 415d612458 feat(account-prefs): Adds new page for Account in preferences
Summary:
Adds the new Account preferences page. This consists of two major React components,
PreferencesAccountList and PreferencesAccountDetails, both of which use EditableList.

I added a bunch of fixes and updated the API for EditableList, plus a bit of
refactoring for PreferencesAccount component, and a bunch of CSS so its a big diff.

The detailed changelog:

Updates to EditableList:
  - Fix bug updating selection state when arrows pressed to move selection
  - Add new props:
    - allowEmptySelection to allow the list to have no selection
    - createInputProps to pass aditional props to the createInput
  - Add scroll region for list items
  - Update styles and refactor render methods

Other Updates:
- Updates Account model to hold aliases and a label
  - Adds getter for label to default to email
- Update accountswitcher to display label, update styles and spec

- Refactor PreferencesAccounts component:
  - Splits it into smaller components,
  - Removes unused code
- Splits preferences styelsheets into smaller separate stylesheet for
  account page. Adds some updates and fixes (scroll-region padding)
- Update AccountStore to be able to perform updates on an account.
- Adds new Action to update account, and an action to remove account to
  be consistent with Action usage
- Adds components for Account list and Aliases list using EditableList

Test Plan: - All specs pass, but need to write new tests!

Reviewers: bengotow, evan

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2332
2015-12-10 15:27:29 -08:00
Evan Morikawa f56dc18690 feat(spec): add config dir to integration specs
Summary:
- You can now pass `--config-dir-path=/some/custom/path` to `./N1.sh`
- `main.coffee` cleaned up a bit. A lot of unused params from legacy Atom
  stuff were still being used
- Integration specs now set the config dir before booting.
- New spec to check for the autoupdater in the app and make sure it's
  pointing at the right place.

Test Plan: script/grunt run-integration-tests

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2331
2015-12-10 10:52:20 -05:00
Ben Gotow c39edccb32 fix(spinner): Improve loading indicator style / tweening 2015-12-09 15:47:51 -08:00
Ben Gotow 3931a0b948 fix(expand-all): Fixes for dark theme, don't show expand when one message 2015-12-07 18:01:06 -08:00
Juan Tejada 3abce37762 fix(editable-list): Fix use of children props in EditableNode + updates
- Fix issue with using this.props.children which was preventing
rerendering
- Updates styles for list
- Updates create item input:
  - Add key to prevent warning
  - Add prop for the placeholder
  - Add onBlur behavior
2015-12-07 15:57:30 -08:00
Ben Gotow f8169273b8 fix(downloads): Improve inline attachment handling
- Show downloading state for inline attachments
- Ensure that the UI updates /after/ the download has completed
- Don't delete finished downloads (previously we were forgetting that a file was downloaded and checking again and again)

Fixes #462
2015-12-07 15:00:25 -08:00
Juan Tejada daa4e2a038 update(components): Add support to create new items inside EditableList
- Adds logic to allow simple item creation
- Adds new onItemCreated callback
- Updates specs
2015-12-07 12:40:39 -08:00
Juan Tejada 07f81f81a6 feat(components): Add EditableList component to component-kit
Summary:
- Generic list component wich supports adding, editing and removing
string-like items or components
- Needs some css love

Test Plan: - Unit tests.

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2322
2015-12-07 08:15:40 -08:00
Juan Tejada 931a93af4e feat(print): Add functionality to print currently focused thread
Summary:
- Adds button inside the message list to print the thread
- Adds cmdctrl-p binding to print thread
- Adds new action and new internal_package to listen to this action.
- Creates a standalone browser window with current thread html, and removes all
collapsed messsages from the print view

Test Plan: - Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2310
2015-12-04 18:12:06 -08:00
Juan Tejada e45a7526db feat(messages): Add button to expand/collapse all messages in thread
Summary:
- Works like Gmail does
- Adds specs

Test Plan: - Unit tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2301
2015-12-03 11:57:48 -08:00
Evan Morikawa 73e7c1c52e 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 092956b379 feat(keybindings): Show all keybindings in prefs 2015-12-01 18:31:19 -08:00
Evan Morikawa 8292a6ff68 feat(signatures): add raw signature support 2015-11-30 14:02:58 -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 a1269e35cc fix(styles): Remove custom pre tag styling for email
Fixes #424
2015-11-24 12:35:35 -08:00
Juan Tejada b3a86de16a 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 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 33d8b22d58 fix(theme): Improve styling of popout composer in dark mode 2015-11-23 18:28:30 -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
Ben Gotow f8539aa382 🍒(atom): Pull new, cleaner compile cache + index.js 2015-11-17 19:43:08 -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
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 afdeba5dcf fix(dropdowns): 3% darken on hover, not full blue 2015-11-13 16:58:55 -08:00
Ben Gotow 452cbf1fa7 fix(ui-dark): Small color adjustments, resolves #299, #148 2015-11-09 18:52:24 -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 e64e6e526d 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 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
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
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 659bac0069 fix(search): New X, focus styling for search
Fixes T3485
2015-10-27 11:28:11 -07:00
Ben Gotow 65078fd7d1 fix(fullscreen): On Mac OS X, green window control defaults to fullscreen 2015-10-23 18:30:47 -07:00
Evan Morikawa fdf9c51606 fix(win): composer and input styles 2015-10-23 15:04:35 -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 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
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 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 3452129738 fix(art): Correct "Trash" icon, naming consistency 2015-10-21 11:58:05 -07:00
Alexander Gudulin 1de28f670b Setup styles for dropdown (select) control 2015-10-21 21:27:53 +03:00