Commit graph

1462 commits

Author SHA1 Message Date
Ben Gotow 586d099c23 fix(schedule): Move z-indexes to prevent dropdown layering issue 2016-04-11 14:58:58 -07:00
Ben Gotow db90db3131 fix(schedule): Use draft session to udpate metadata, always save in syncback 2016-04-11 14:32:54 -07:00
Ben Gotow 5220b471e3 fix(db): Counts no longer require Thread table join 2016-04-11 13:51:31 -07:00
Ben Gotow c00190c492 fix(auth): Fix missing var. This is why we should go ES6! 2016-04-11 10:48:16 -07:00
Ben Gotow b4b67c65c9 fix(initial-sync): Fix sync sidebar showing all the time 2016-04-11 00:43:06 -07:00
Juan Tejada 3716706833 feat(thread-search): Add spinner to indicate search in progress
Summary:
- This diff also restructures the search package in a few ways:
  - Rename package to `thread-search` instead of `search-bar`
  - Move SearchQuerySubscription and SearchMailboxPerspective inside
  package. This allows SearchQuerySubscription to have access to
  SearchActions in a clean way and keeps all of the search related code
  in 1 package
  - Remove SearchMailboxPerspetcive from mailbox-perspective.coffee
- Adds temporary spinner while we get a new design for it

Test Plan: - TODO

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2868
2016-04-10 16:20:26 -07:00
Evan Morikawa e2e9a72233 fix(scheduler): use proper start and end time formats for when block 2016-04-10 11:44:24 -04:00
Evan Morikawa 42d7aa47b4 fix(scheduler): properly formatting when objects for post 2016-04-09 21:47:52 -04:00
Evan Morikawa 8960009643 fix(scheduler): properly set proposals 2016-04-09 21:25:01 -04:00
Evan Morikawa 8f7b99ee4f refactor(scheduler): move all event data into metadata
Summary: Moved events into metadata. Removed a lot of code

Test Plan: todo

Reviewers: juan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2866
2016-04-09 21:19:01 -04:00
Ben Gotow d884eccb36 fix(specs): * 2016-04-08 16:03:21 -07:00
Juan Tejada 172ac4fc0a update(search): Add search usage reporting + other fixes
Summary:
- Converts SearchQuerySubscription to ES6 to fix method overriding for
  `removeCallback`
- Reports different usage metrics for search
- Removes unecessary data source listener iniside ThreadListStore:
  - This listener focused the first thread on the list, which is
  actually unwanted (#1461)
  - It prevented QuerySubscriptions from being disposed promptly because
  of the remaining listener. They qould only be disposed until the
  subscription triggered once, which is not actually desired behavior
  (e.g. for SearchQuerySubscription)

Test Plan: - Manual

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2864
2016-04-08 14:11:32 -07:00
Ben Gotow 227bc81736 fix(sync-errors): Improve display of sync errors and offline status
- Make the retry interval go 2 sec, 3.4s, 6 sec...
- Only show the connection status bar if the interval is > 5 seconds, in case the error was temporary.
- Do not show sync errors in the sidebar. The only available action is "Try Again", and we try again on our own. The error is frustrating and the user can't do anything about it anyway.
2016-04-08 13:52:26 -07:00
Drew Regitsky 3918f1a181 feat(auth): Provide reauth param to handle changed server endpoints
Summary:
Notify the backend when auth is a reauth of an existing account by
providing the `accountId`. This lets the backend differentiate between
a new auth (where a new account will be created if the server endpoints
don't match) and a re-auth (where the auth will fail on server endpoint
mismatch, prompting the user).

Test Plan: manual

Reviewers: juan, evan, bengotow

Reviewed By: bengotow

Subscribers: mg, spang, kav-ya

Differential Revision: https://phab.nylas.com/D2833
2016-04-08 12:00:03 -07:00
Ben Gotow 0b4527bb03 fix(autoscale): Apply vw when width and height are not present 2016-04-07 18:02:04 -07:00
Evan Morikawa 6a70584ffa feat(scheduler): better time picker
fix(scheduler): time picker fixed
2016-04-07 15:14:33 -07:00
Jackie Luo c78401c566 🎨(preferences): Change spacing and button sizes 2016-04-07 14:32:51 -07:00
Ben Gotow b6f539ac7b 💄(prefs): Shrink top tabs better, add min-widths 2016-04-07 14:14:20 -07:00
Jackie Luo 5fc110c1dc 🎨(preferences): Adjust textbox styles for signatures and templates 2016-04-07 14:12:35 -07:00
Evan Morikawa be7a196eeb fix(tracking): uid uses draftClientId 2016-04-07 12:18:37 -07:00
Juan Tejada cb46f8a9d8 fix(contact-sidebar): Don't render <select> when no contacts available 2016-04-07 09:57:53 -07:00
Juan Tejada 317f9be93d feat(thread-search): Make thread search indexing smarter
Summary:
- When accounts change, make sure sync has completed, and only add or
remove threads from the index based on accounts that were added or
removed instead of rebuilding the entire index from scratch

- When thread is updated, make sure to only update the index for threads
that belong to accounts that are not currently in the sync process

- Add more logging and docs

Test Plan: TODO

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D2852
2016-04-07 09:57:29 -07:00
Ben Gotow b16b465fd9 lint(*): Fix linter errors from QA fixes 2016-04-06 16:15:46 -07:00
Ben Gotow 0bd7480338 fix(autolinker): Additional test case from #1863 2016-04-06 14:29:28 -07:00
Ben Gotow a05daeb0f0 fix(autolinker): Add test cases, .ly, url hash chars 2016-04-06 14:17:10 -07:00
Evan Morikawa d4de652dab fix(scheduler): can scheduler on 30 min intervals 2016-04-06 14:09:51 -07:00
Evan Morikawa 544eacd87e fix(scheduler): removes proposals from metadata when removing event
Also add <tbody> tags
2016-04-06 13:59:24 -07:00
Evan Morikawa f1a8b6929f fix(scheduler): can remove proposed times 2016-04-06 13:59:24 -07:00
Evan Morikawa dc5210275e fix(scheduler): fix top banner 2016-04-06 13:59:24 -07:00
Ben Gotow 3cd94e8957 fix(cc/bcc): Make targets bigger, wait longer before declaring focus left 2016-04-06 13:54:39 -07:00
Jackie Luo 748e6ed55e 🎨(preferences): Update styling 2016-04-06 13:08:44 -07:00
Ben Gotow 965884fa95 fix(*): Minor CSS fixes, open tracking fix when only message is draft 2016-04-06 12:35:30 -07:00
Ben Gotow 5989fa7e52 fix(error): Show actual API domain in connection error bar 2016-04-06 12:35:30 -07:00
Jackie Luo 8479fdd0ce fix(composer-emoji): Fix tabs to scroll correctly 2016-04-06 12:06:27 -07:00
Evan Morikawa f97aa855a4 fix(schedule): extracted to own SyncbackDraftEventsTask 2016-04-06 11:50:21 -07:00
Ben Gotow 7210e2f42d fix(mail-rules): Only process inbox, never skip threads
Summary:
- Disable processing button while already processing
- Only process mail in the inbox in bulk reprocess task
- Advance through mail using "after X" rather than "offset X", avoiding the issue where mail can be deleted as you're advancing.

Test Plan: Run existing tests

Reviewers: evan, juan

Reviewed By: juan

Differential Revision: https://phab.nylas.com/D2847
2016-04-05 19:16:58 -07:00
Evan Morikawa bb318bf69c feat(scheduler): add new date & time picker
Summary: Adds a date and time picker to the new event creator

Test Plan: todo

Reviewers: bengotow, juan

Reviewed By: bengotow, juan

Differential Revision: https://phab.nylas.com/D2842
2016-04-05 18:42:19 -07:00
Juan Tejada cf6f577a68 fix(scheduler): Fix moment-timezone require 2016-04-05 15:19:53 -07:00
Evan Morikawa 3d80e03421 fix(scheduler): import from moment-timezone 2016-04-05 14:57:51 -07:00
Juan Tejada 4c250640fe fix(react): Fix several warnings in missing imports 2016-04-05 14:53:37 -07:00
Ben Gotow d1b1c5bea2 fix(quoted-text): Correctly update container height 2016-04-05 14:27:54 -07:00
Ben Gotow 34201ff644 fix(collapsed-participants): Resize in correct scenarios 2016-04-05 14:16:24 -07:00
Jackie Luo 4f11201ff7 fix(theme-picker): Reformat invalid class names 2016-04-05 13:43:43 -07:00
Juan Tejada 9f4b9693ac fix(sync-status): Fix logic for checking sync status:
- Only check sync status keys that belong to actual models being synced
- Return false if state object is empty
2016-04-05 13:29:25 -07:00
Juan Tejada 18aa0f2bb8 fix(thread-search): Correct typo 2016-04-05 13:29:25 -07:00
Ben Gotow e08c7fe9d4 fix(notifs): _.reject does not support dict, Sentry 26699 2016-04-05 13:10:39 -07:00
Juan Tejada 4e326edfce fix(warning): Add key to react component 2016-04-05 12:16:32 -07:00
Juan Tejada 5a8f8b9877 fix(thread-search): Only rebuild index when # of accounts has changed 2016-04-05 12:16:32 -07:00
Ben Gotow 698af87912 fix(mail-rules): all "on" handlers need to be bound functions 2016-04-05 12:01:53 -07:00
Juan Tejada c17c1ffaa6 fix(prefs): Fix this binding in mail rules prefs page 2016-04-05 11:28:08 -07:00
Ben Gotow 646ac9589c fix(composer): Show when rendered, send draft JSON to composer windows 2016-04-04 18:30:50 -07:00
Juan Tejada fc489e5db3 feat(thread-search): Add client side search
Summary:
This diff includes several updates:
- Update sqlite version to use FTS5
- Adds new methods to DatabaseStore to create and update Search Indexes
- Currently indexing subject, participants, and thread message bodies or snippets if the body is not available
- Update initial sync to fetch 5000 message bodies per account
- Adds a new SearchMatcher
- Add new thread-search-index package to run in the worker window to
  init and keep thread search index up to date
- Converts Thread to ES6

TODO:
- Remove/Update suggestions dropdown
- Add tests

Test Plan: - TODO

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Differential Revision: https://phab.nylas.com/D2826
2016-04-04 17:15:19 -07:00
Ben Gotow 2688881ff3 fix(lint): Missing const breaking build 2016-04-04 17:12:59 -07:00
Ben Gotow 26fe05153c feat(offline-status): Show a bar when not connected to the API
Summary:
The TaskQueue does it's own throttling and has it's own processQueue retry timeout, no need for longPollConnected

Remove dead code (OfflineError)

Rename long connection state to status so we don't ask for `state.state`

Remove long poll actions related to online/offline in favor of exposing connection state through NylasSyncStatusStore

Consoliate notifications and account-error-heaer into a single package and organize files into sidebar vs. header.

Update the DeveloperBarStore to query the sync status store for long poll statuses

Test Plan: All existing tests pass

Reviewers: juan, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D2835
2016-04-04 17:11:09 -07:00
Evan Morikawa db1f651a3e fix(scheduler): add timezone & fix tabbing 2016-04-04 16:06:48 -07:00
Ben Gotow b4434f6617 fix(focus): Remove focusedField in favor of imperative focus, break apart ComposerView
Summary:
- Removes controlled focus in the composer!
  - No React components ever perfom focus in lifecycle methods. Never again.
  - A new `Utils.schedule({action, after, timeout})` helper makes it easy to say "setState or load draft, etc. and then focus"
  - The DraftStore issues a focusDraft action after creating a draft, which causes the MessageList to focus and scroll to the desired composer, which itself decides which field to focus.
  - The MessageList never focuses anything automatically.
- Refactors ComposerView apart — ComposerHeader handles all top fields, DraftSessionContainer handles draft session initialization and exposes props to ComposerView
  - ComposerHeader now uses a KeyCommandRegion (with focusIn and focusOut) to do the expanding and collapsing of the participants fields. May rename that container very soon.
- Removes all CommandRegistry handling of tab and shift-tab. Unless you preventDefault, the browser does it's thing.
- Removes all tabIndexes greater than 1. This is an anti-pattern—assigning everything a tabIndex of 0 tells the browser to move between them based on their order in the DOM, and is almost always what you want.
- Adds "TabGroupRegion" which allows you to create a tab/shift-tabbing group, (so tabbing does not leave the active composer). Can't believe this isn't a browser feature.

Todos:
- Occasionally, clicking out of the composer contenteditable requires two clicks. This is because atomicEdit is restoring selection within the contenteditable and breaking blur.
- Because the ComposerView does not render until it has a draft, we're back to it being white in popout composers for a brief moment. We will fix this another way - all the "return unless draft" statements were untenable.
- Clicking a row in the thread list no longer shifts focus to the message list and focuses the last draft. This will be restored soon.

Test Plan: Broken

Reviewers: juan, evan

Reviewed By: juan, evan

Differential Revision: https://phab.nylas.com/D2814
2016-04-04 15:22:01 -07:00
Evan Morikawa 4986049bd6 fix(console): remove log 2016-04-04 15:20:25 -07:00
Evan Morikawa fd76568f15 fix(react): replace with ReactDOM 2016-04-04 15:17:50 -07:00
Evan Morikawa 15ff969e73 feat(calendar): add week view for quick scheduler
Summary: New Calendar

Test Plan: TODO

Reviewers: drew, juan, bengotow

Reviewed By: bengotow

Subscribers: jackie

Differential Revision: https://phab.nylas.com/D2767
2016-04-04 15:05:48 -07:00
Jackie Luo 73bf32c477 fix(composer-emoji): Replace images with Unicode characters properly 2016-04-04 11:03:52 -07:00
Jackie Luo d786fb85da Merge pull request #1861 from jamiewilson/darkside
(darkside) correcting window buttons, adding input focus
2016-04-02 13:40:24 -07:00
Jamie Wilson 8164d75b02 correcting size of window contol buttons
This addresses issue #1687 on nylas/n1
2016-04-02 15:02:26 -05:00
Jackie Luo f7e0acc4dd 🎨(preferences): Darken tab icons during click 2016-04-01 14:50:56 -07:00
Ben Gotow 209debf797 fix(thread-list): Constrain details width to ensure attachment icon visible. #1858 2016-04-01 14:49:15 -07:00
Jackie Luo e2480c1e36 fix(templates): Convert to ES6 and allow creation of new templates 2016-04-01 14:30:43 -07:00
Jackie Luo 6e07dce03c 🎨(preferences): Updates preferences to look prettier
Summary:
Adds new redesigned preferences with horizontal tab bar and refactored code.

Converts Preferences, Plugins, and a few components to ES6.

Test Plan: Tested locally.

Reviewers: evan, bengotow

Reviewed By: bengotow

Subscribers: juan

Differential Revision: https://phab.nylas.com/D2818
2016-04-01 14:01:26 -07:00
Jackie Luo 603a3dfb4b spec(composer-emoji): Fix specs for popover 2016-03-31 18:14:11 -07:00
Ben Gotow 9a588dbda6 fix(autolinker): Update regexp to handle reported failure cases 2016-03-31 16:36:23 -07:00
Juan Tejada bec4a86629 fix(build): FIx linting and react errors and popover spec 2016-03-31 16:10:09 -07:00
Ben Gotow 3d8133ff8d fix(inline): Use vw for max-width, use DOM rather than regex 2016-03-31 15:16:22 -07:00
Ben Gotow 78681f6ed1 fix(inline): radial progress, merge body with download data on render 2016-03-31 15:16:21 -07:00
Jackie Luo 6faa7d5e12 spec(composer-emoji): Add tests for emoji popover
Summary: Adds tests to check that emoji popover is inserting emoji correctly and adding PNGs as expected.

Test Plan: Tested locally.

Reviewers: evan, bengotow, juan

Reviewed By: juan

Subscribers: juan

Differential Revision: https://phab.nylas.com/D2810
2016-03-31 14:54:46 -07:00
Jackie Luo dc1ff47bb0 🎨(theme-picker): Fix oval close button 2016-03-31 12:04:41 -07:00
Jackie Luo 49a321124f 🎨(scroll): Fix UI issues in theme picker/emoji picker 2016-03-30 15:52:51 -07:00
Ben Gotow 39768fd9d4 bump(react): 0.13.2 => 0.14.7
Great breakdown of React changes here:
https://github.com/facebook/react/blob/master/CHANGELOG.md#0140-october-7-2015

Due to deprecation warnings, I don't think this will break third-party extensions unless they were doing really bad things.
2016-03-29 01:43:12 -07:00
Jackie Luo 62b06121f6 fix(composer-emoji): Render emoji characters on Windows/Linux 2016-03-28 16:18:41 -07:00
Jamie Wilson c5d41eaf6a applying accent color to focused inputs 2016-03-28 12:49:47 -05:00
Jackie Luo ec3ac5f58d 🎨(themes): Tweak Taiga to feel more native 2016-03-27 15:51:27 -07:00
Jackie Luo 9a923c7c88 fix(thread-list): Show emoji in bolded subject lines 2016-03-27 15:51:27 -07:00
Juan Tejada f7a4523604 update(open-tracking): Only display icon when last message has metadata 2016-03-25 14:00:55 -07:00
Juan Tejada 0e360b061b Revert "fix(open-tracking): Make sure icon only shows in sent perspective"
This reverts commit 872aae1bcd.
2016-03-25 14:00:55 -07:00
Jackie Luo cbf9627029 fix(composer-emoji): Only show replacement PNGs for OS X 2016-03-25 13:35:32 -07:00
Juan Tejada 872aae1bcd fix(open-tracking): Make sure icon only shows in sent perspective 2016-03-25 12:37:42 -07:00
Juan Tejada 8a3c2730cb fix(tray): Re add old icon assets for tray icon for win32 and linux 2016-03-25 10:05:17 -07:00
Ben Gotow 3fa93c2730 fix(composer): Sentry 9688 2016-03-24 17:18:50 -07:00
Jackie Luo 3e36e10f07 lint(themes): Add import to ui-variables 2016-03-24 16:56:49 -07:00
Ben Gotow c1b3f87d71 fix(autolinker): Don't include trailing ? or . in URLs 2016-03-24 16:35:11 -07:00
Jackie Luo 2fedf7f091 fix(themes): Re-add disclosure triangles to Taiga 2016-03-24 16:19:41 -07:00
Juan Tejada 5d90cb40b0 🎨(selected-stack): Update text color for clear selection btn 2016-03-24 15:47:49 -07:00
Ben Gotow cbce8fb79b fix(search): Display search API errors in transient notiication bar 2016-03-24 15:42:05 -07:00
Ben Gotow fc33e97bf8 perf(*): Replace _.omit, refresh scrollbar height less often 2016-03-24 15:14:41 -07:00
Juan Tejada 4bfb4fe916 patch(thread-list): Limit number of injected icons in narrow mode to 1
- Update InjectedComponentSet to take a limit for the amount of matching
  components to render
2016-03-24 12:32:01 -07:00
Juan Tejada d3ca6e592d feat(list): Add ThreadIcon injected region to narrow thread-list 2016-03-24 12:00:49 -07:00
Jackie Luo d6bc6e7bc5 fix(composer-emoji): Return if no search results are found 2016-03-24 11:57:49 -07:00
Ben Gotow 1d97b6811a fix(selection): Make the clear selection button a button 2016-03-24 10:57:12 -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
Ben Gotow ac70ed3064 fix(undo-redo): Remove initial state check 2016-03-24 10:42:15 -07:00
Ben Gotow 27000e1965 fix(autolinker): Only match top ten tld's when schme not present 2016-03-24 10:14:47 -07:00
Ben Gotow 75ff8282a8 perf(autolinker): Use requestIdleCallback to fix hanging on large bodies 2016-03-23 19:03:21 -07:00
Juan Tejada 95cd1945de fix(snooze): Correctly display snoozed until label 2016-03-23 18:00:46 -07:00