Commit graph

784 commits

Author SHA1 Message Date
Ben Gotow a1bb98ebf4 feat(paste): Paste accepts more HTML, paste and match style now available
Summary:
Related to #320, #494, #515, #553

Ignore newlines and returns in HTML, they can be inside tags

Allow all attributes so that paste from excel looks nice

Never let someone paste a `contenteditable` attribute

Update specs

Test Plan: Run new specs

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2309
2015-12-07 15:34:03 -08:00
Ben Gotow d8c79a4d50 fix(theme): Dark mode styling for undo/redo component 2015-12-07 15:11:11 -08:00
Ben Gotow 2320292c15 fix(theme): Dark mode styling of the from field, "More contacts" button
Fixes #607
2015-12-07 15:05:44 -08:00
Ben Gotow fc2118aade 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 f7b73c6920 fix(important): Fixes keymap handlers for mark as important/unimportant
- Updates to bind handlers inside thread list
- Fixes typo in event name
- Updates config path for showImportant
2015-12-07 12:05:40 -08:00
Ben Gotow 77394b837d fix(license): GPLv3 => GPL-3.0 2015-12-07 10:50:47 -08:00
Yoeri Stessens 4567183d3a Merge branch 'master' of github.com:nylas/N1 2015-12-07 12:04:41 +01:00
Yoeri Stessens 9d6769ba89 Add remove fallback for archiving messages 2015-12-07 11:29:31 +01:00
Ben Gotow 386a599fbc fix(keymaps): Listen to atom commands instead of DOM events
Using `addEventListener` only works when the command is triggered by the atom keymaps manager, NOT when the command is triggered by the command registry (NylasEnv.commands.dispatch). Odds are, when you subscribe to key commands you /really/ mean to subscribe to the command, no matter how it's invoked.

This fixes #556, in which the down / up arrows in the message list weren't working.
2015-12-04 18:27:11 -08:00
Juan Tejada bdfd96fed2 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
Ben Gotow b9c4a64910 fix(signatures): Make the entire signature box clickable
Fixes #580
2015-12-04 17:06:12 -08:00
Ben Gotow f308e51f62 fix(unread-icon): Show the correct icon for the action 2015-12-04 16:38:26 -08:00
Juan Tejada e133896e68 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
Ben Gotow b224347e10 docs(notifs): On linux, display a note about Zenity in prefs 2015-12-03 11:36:54 -08:00
Ben Gotow 015e8a5aba fix(autoload-images): Catch images with no extension, add tests 2015-12-03 11:25:26 -08:00
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 fe95af37f8 fix(labels): Allow user to label as spam or trash from the dropdown
Also fixes the sort ordering of standard labels in the category picker. Fixes #555
2015-12-02 11:43:37 -08:00
Yoeri Stessens 44e3f99cc9 Alter the text to a more general approach and run tests
The text is now more in line with other mail clients to minimalize possible confusion between users of multiple mail clients and/or platforms.
2015-12-02 08:23:03 +01:00
Ben Gotow ceb9e2cdb1 feat(keybindings): Show all keybindings in prefs 2015-12-01 18:31:19 -08:00
Evan Morikawa 0ab5886423 refactor(contenteditable): use DOM mutation observers
Summary: This uses DOM mutation observers instead of `onInput`

Test Plan: manual and new integration tests

Reviewers: bengotow, juan

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

feat(contenteditable): add bold, underline, etc keymaps

Moving button extensions out of toolbar

Extracted floating toolbar buttons

Convert ContenteditableExtension to new spec

Update packages to use new callback signature

Fix specs
2015-12-01 15:31:03 -08:00
Ben Gotow 6d2f39cd6c fix(tray): On Win32 / Linux click should open main window if closed 2015-12-01 14:46:08 -08:00
Yoeri Stessens da56a9b5c8 Change backspace behavior
There is a setting so that the backspace can delete messages instead of archiving.
I think that backspace must delete the message, but like many other clients, you have the choice.
2015-12-01 17:07:46 +01:00
Juan Tejada 24978b2a4b feat(shortcuts): Add listeners for unread/important keyboard shortcuts
Summary:
- Adds KeyCommandRegions to hook up missing listeners for marking as unread and
  important keyboard shortcuts
- Updates specs

Test Plan: - All tests pass

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2300
2015-11-30 18:29:45 -08:00
Ben Gotow d48fa50654 feat(rsvp): "Quick RSVP" to events recongized by the API 2015-11-30 17:12:45 -08:00
Juan Tejada 9f309d399b update(extensions): Rename DraftStoreExtension and MessageStoreExtension
Summary:
- Rename DraftStoreExtension to ComposerExtension
- Rename MessageStoreExtension to MessageViewExtension
- Rename ContenteditablePlugin to ContenteditableExtension
  - Update Contenteditable to use new naming convention
  - Adds support for extension handlers as props
- Add ExtensionRegistry to register extensions:
  - ContenteditableExtensions will not be registered through the
    ExtensionRegistry. They are meant for internal use, or if anyone wants
    to use our Contenteditable component directly in their plugins.
  - Adds specs
- Refactors internal_packages and src to use new names and new ExtensionRegistry api
- Adds deprecation util function and deprecation notices for old api methods:
  - DraftStore.{registerExtension, unregisterExtension}
  - MessageStore.{registerExtension, unregisterExtension}
  - DraftStoreExtension.{onMouseUp, onTabDown}
  - MessageStoreExtension
- Adds and updates docs

Test Plan: - Unit tests

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2293
2015-11-30 16:08:05 -08:00
Ben Gotow b1c925883d fix(signatures): Monospace font, nested scrolling fix 2015-11-30 14:26:11 -08:00
Evan Morikawa c2beaee006 feat(signatures): add raw signature support 2015-11-30 14:02:58 -08:00
Ben Gotow be491d6cae fix(signatures): Display signatures tab, blur after prefs changes 2015-11-30 13:39:42 -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 84adfb3bdf 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 e8878e5ce8 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 e0e6a288f1 fix(sidebar): selected is not actually a required prop
Fixes #476
2015-11-25 16:30:01 -08:00
Ben Gotow 7605e984c4 fix(license): Mark a few additional packages as GPLv3 2015-11-25 14:41:10 -08:00
Ben Gotow b2c09d005b Merge pull request #453 from dcposch/fix-license
Internal package.json license: GPLv3
2015-11-25 14:37:54 -08:00
Ben Gotow 3fabc31e4d fix(composer): Don't pass a callback to dialog API, update changelog 2015-11-25 14:13:21 -08:00
Ben Gotow bd2dfef7ce fix(attachments): Only preview images up to 5MB, not 10MB 2015-11-24 16:27:07 -08:00
Juan 2bd83f38ff Merge pull request #449 from mbilker/travis-linux-testing
Travis Linux Testing
2015-11-24 12:48:31 -08:00
Juan Tejada 56b62f8b58 fix(lint): Fix linter issues on account-sidebar-section.cjsx 2015-11-24 12:44:06 -08:00
Juan Tejada 468ef439b4 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 2bd710d668 Internal package.json license: GPLv3
Changed from 'Propietary' to 'GPLv3' to match LICENSE.md
2015-11-24 09:09:33 -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 fabc047a79 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 edf5275a22 fix(spec): use correct modifier key based on process.platform 2015-11-23 23:31:37 -05:00
Ben Gotow ad04faab02 fix(account-sidebar): Fix specs to match new unread counts 2015-11-23 20:26:18 -08:00
Ben Gotow 4b75265cdd fix(dark-mode): Adjust email CSS immediately upon switching themes
Fixes #145
2015-11-23 20:20:06 -08:00
Ben Gotow 3fdfbefcb3 fix(sidebar): Swap out + image, tweak CSS for unread 2015-11-23 20:08:10 -08:00
Juan Tejada a9aaab9f38 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 522ad2da79 fix(theme): Improve styling of popout composer in dark mode 2015-11-23 18:28:30 -08:00
Ben Gotow 6b6a61f455 fix(copy): Call split / list modes "Single Panel / Two Panel"
Fixes T5907
2015-11-23 17:34:56 -08:00