Commit graph

273 commits

Author SHA1 Message Date
dillon 4e6b4f4c9c feat(toggle-unread): threads can now toggle their unread status. fixes T3483.
Summary:
still WIP, but functionality is there.

TODO:
[x] write tests
[x] swap out the current markasread icon for the correct markasread icon that @sdw is making
[x] figure out how to address this point by @bengotow: https://phab.nylas.com/D2024?id=19139#inline-12168

Test Plan: tested manually. still need to write tests though.

Reviewers: evan, bengotow

Reviewed By: bengotow

Subscribers: sdw

Maniphest Tasks: T3483

Differential Revision: https://phab.nylas.com/D2024
2015-09-15 16:49:16 -07:00
dillon 9c7259227d feat(account-sidebar): move account switcher from the side to the top of the account sidebar. fixes T3546.
Summary: ready for final code review! @evan @bengotow

Test Plan: added some tests for the account switcher

Reviewers: evan, bengotow

Reviewed By: evan, bengotow

Maniphest Tasks: T3546

Differential Revision: https://phab.nylas.com/D2016
2015-09-14 15:05:33 -07:00
Ben Gotow be103b22bf tweak(win32): Hide the app menu on Windows, show in a right-side button instead 2015-09-11 14:49:26 -07:00
Ben Gotow 42d397fa76 tweak(win32): Make the window toolbar white on windows 2015-09-10 12:41:12 -07:00
Ben Gotow e1725e1c96 fix(loading-cover): Prevent strange overflow caused by position:absolute
Fixes T3539
2015-09-09 14:41:04 -07:00
Ben Gotow ac3ca9d8f8 fix(thread-list): Depressed+active state needs to be different for immediate click feedback 2015-09-09 14:05:03 -07:00
Ben Gotow 18795d075b fix(window-controls): Proper @1x assets to avoid tiny white aliasing
Fixes T3501
2015-09-08 14:32:49 -07:00
Ben Gotow 910f272076 feat(important): Improtant flags you can enable optionally for Gmail accounts
Summary: Fixes T3477

Test Plan: Tests are forthcoming

Reviewers: dillon, evan

Reviewed By: evan

Maniphest Tasks: T3477

Differential Revision: https://phab.nylas.com/D1990
2015-09-08 10:53:07 -07:00
Evan Morikawa ee41722891 fix(composer): much better specs for composer & quoted text
Summary: Fixed a bug bug with the quoted text clearing the bodies on replies

Test Plan: all the tests

Reviewers: dillon, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1981
2015-09-03 19:41:56 -07:00
Ben Gotow 71f1a3e315 fix(Atom): Wait to send window:loaded until new loading process has finished (broken because of animation blocks) 2015-09-02 16:49:13 -07:00
Ben Gotow be697e42c7 fix(message-list): Roll back min width hiding reply buttons, etc. Just allow individual body iframes to scroll horizontally when necessary 2015-09-01 10:51:24 -07:00
Ben Gotow b04f496a02 fix(loading): Initial bounce was missing from loading animation 2015-09-01 10:27:44 -07:00
dillon b6bc5e1a01 fix(scroll-region): add min-width to scrollable message area. fixes T3442.
Summary: I wasn't sure how much the min-width should be. I cross-checked with Gmail and found that they set a pretty generous min-width. I felt 700px seemed comfortable.

Test Plan: Manually tested. All other tests remain green.

Reviewers: bengotow

Maniphest Tasks: T3442

Differential Revision: https://phab.nylas.com/D1954
2015-08-31 10:46:37 -07:00
Ben Gotow 11dab9095a fix(loading): Add nice text to our new loader 2015-08-28 14:24:17 -07:00
Evan Morikawa a0e64bf580 refactor(packages): Remove Edgeforce 2015-08-28 15:16:32 -04:00
Ben Gotow 7190ca69f7 refactor(db): change ID system to have clientIDs and serverIDs
Summary: Major ID refactor

Test Plan: edgehill --test

Reviewers: bengotow, dillon

Differential Revision: https://phab.nylas.com/D1946
2015-08-28 11:24:29 -07:00
Ben Gotow 1a576d92dc feat(work): Create the "Work" window, move TaskQueue, Nylas sync workers
Summary:
Move sync workers and Edgehill token checks to work window

Move the task queue and database setup to the work window

Move ContactStore background refresh to work window

Store the task queue in the database

WIP

The TaskQueue now puts tasks in the database instead of in a file, which also means it can be observed

Move all delta sync and initial sync to a package, make NylasSyncStore which exposes read-only sync state

DraftStore no longer reads task status. Once you set the "sending" bit on a draft, it never gets unset. But that's fine actually.

If your package lists windowTypes, you *only* get loaded in those windowTypes. If you specify no windowTypes, you get loaded in the root window.

This means that onboarding, worker-ui, worker-sync, etc. no longer get loaded into the main window

ActivitySidebar has a special little store that observes the task queue since it's no longer in the window

Move "toggle component regions" / "toggle react remote" to the Developer menu

Move sync worker specs, update draft store specs to not rely on TaskQueue at all

Test Plan: Run existing tests, all pass

Reviewers: dillon, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1936
2015-08-27 16:39:40 -07:00
Ben Gotow 78a02ad52c fix(button-dropdown): Broken styles on reply/reply-all button dropdown 2015-08-24 17:31:03 -07:00
Ben Gotow 81d2edcaf9 feat(accounts): Kill namespaces, long live accounts
Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.

This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.

When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.

Search bar doesn't need to do full refresh on clear if it never committed

Allow drafts to be switched to a different account when not in reply to an existing thread

Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal

Show many dots for many accounts in long polling status bar

add/remove accounts from prefs

Spec fixes!

Test Plan: Run tests, none broken!

Reviewers: evan, dillon

Reviewed By: evan, dillon

Differential Revision: https://phab.nylas.com/D1928
2015-08-21 15:29:58 -07:00
dillon 698e8a2367 fix(message-sidebar): remove faulty component. fixes T2391.
Summary: I'm proposing this patch as a temp fix for this issue. Desired functionality should probably be defined before adding more code.

Test Plan: Attempting to test manually... can't get my runtime edgehill to propagate these changes tho :(

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2391

Differential Revision: https://phab.nylas.com/D1911
2015-08-21 10:45:07 -07:00
Ben Gotow f883732522 bump(version): 0.2.5
Features:
- Preferences! You can now change all kinds of things from Menu > Preferences, including:
  + Key binding sets (Gmail, Outlook, Mail.app)
  + Theme (light or dark)
  + Mark-as-read delay
  + Attachment downloading policy
  + Sounds and notifications
  + Default reply behavior
- Layout and theme are now remembered when you re-launch Nylas Mail
- You can now star the message under the keyboard cursor by pressing 'S'

Performance:
- Creating drafts is now much faster on long threads

Fixes:
- "Hover and Archive" is now displayed correctly
- Signing in with an email with capitalization ("BEN@Nylas.com") no longer breaks subtle things
- Messages sent yesterday are now shown with relative time (2:31PM, 12 hours ago)
- NylasSyncWorker now backs off when it encounters network failure
- On Windows, the database is deleted properly when you log out
- Archiving now properly sends mail to All Mail in Gmail
- Images inside some emails now render without becoming distorted
- Mailto link handling is now case-insensitive
2015-08-18 10:57:37 -07:00
Ben Gotow b890aaca6f fix(email-frame): We can no longer specify a max-width on images, because it's relative to an unknown parent container and changes the dynamic of sizing of images inside of tables
We may need another fix, but we sure as hell can't have this one.
2015-08-17 14:50:40 -07:00
Ben Gotow ed2a5c90d9 feat(preferences): WIP Preferences panel
Summary:
Things still to come:
- General tab
- Signatures tab (potentially remove and land)

Adding emacs things to gitignore

Adding progress. iterating on html/css is incredibly painful

Added layout for accounts page.

Adding layout for appearance page

layout for shortcuts preferences page

adding layount for notifications menu

Adding signatures layout

WIP

WIP - tab switching, accounts tab

WIP ALL THE THINGS

Keymap template support (Gmail / outlook, etc.)

Test Plan: No tests atm

Reviewers: evan

Differential Revision: https://phab.nylas.com/D1890
2015-08-14 15:40:11 -07:00
EthanBlackburn 8b108c78de Quick actions fix
Summary: Fixes T2345.

Test Plan: Tested manually

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2345

Differential Revision: https://phab.nylas.com/D1886
2015-08-13 14:56:22 -07:00
Ben Gotow a5f05f52fd fix(composer): Remove unnecessary zIndex rules, fix wrapping around Cc/Bcc/Subject icons
Previously, we were adding 160px of padding to the entire To field. Now the buttons in the top right are floating inside the container and only impact the first line of participants.

I also stripped out a lot of zIndex rules on the participant fields, subject, body that I think were only necessary because "once you've started adding zindexes you need them everywhere".

Also changed the hover state of the buttons to be consistent.
2015-08-10 14:47:47 -07:00
Ben Gotow e2a1658ab3 fix(email-styles): Remove img height:auto; causing images to stretch based on their intrinsic size
We constrain images to a max-width of 600px. We have logic to change width and height attributes of inline attachments when both specified (and larger than 600px). This `height:auto` flag causes the image below to render at 600x600 because it's a 1x1 image:

<img src="http://image.lyftmail.com/lib/fe6915707166047a7d14/m/1/spacer.gif" height="1" width="600" style="display: block; width: 600px; min-width: 600px;" border="0">

I think the height:auto case only happens when A) the image is more than 600px wide B) the image has a hard-coded height and not a hard-coded width. In this case our max-width rule will change the width and the height will be fixed. I think we should disregard this case unless we find scenarios where it happens.
2015-08-10 14:12:38 -07:00
Ben Gotow c4dd6813d6 fix(contact-chips): Remove left/right margin from input to align properly
Fixes T2878
2015-08-06 12:27:49 -07:00
Evan Morikawa ada9f722f5 feat(message-list): better sending state
Summary:
We now have a `MessageItemContainer` class that handles the logic of
deciding what kind of message to show. We introduce a new `PendingMessage`
(which is just a sublcass of `MessageItem`) that has the spinner and
stuff.

Also tests

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1833
2015-08-03 17:19:07 -07:00
Ben Gotow 9b2f830348 fix(*): Minor performance tweaks and fixes to category picker
Summary:
fix(undo-redo): UndoRedoComponent does not take props

fix(category-picker):

- Use Actions.queueTask like the rest of the app so UndoRedoStore can see it. Can change this in the future but it's currently the only place in the app we directly queue tasks.

- Stop subscribing to the FocusedContentStore / FocusedCategoryStore (which are not used in setState?) since we receive threads as props

- Rename categoryDatum to item because it's not a category. (Was super confused that categories were becoming JSON in `_extendCategoryWithDisplayData`) Give item a category property so that tasks can specify items and not IDs (allows for better descriptions like "Moved one thread to Archive"

Add simple shouldComponentUpdate to retina-img

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1832
2015-08-03 17:05:31 -07:00
Ben Gotow 1dc7c03ebd fix(contact-chips): Contact chips are editable and have much better style
Summary:
The TokenizingTextField has several new optional props, including onEdit, which enables
editing of the tokens and tokenIsInvalid, which allows you to make tokens red, while still
accepting them as tokens.

When you go to send a message with invalid recipients it won't let you until you remove/
edit them.

Hotloading

Edit chips, keymappings not through command registry, 7 new tests for editing chips

Test Plan: Run 7 new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1825
2015-08-03 13:06:28 -07:00
EthanBlackburn 17bcb88ae3 UndoRedoButton now shows
Summary: A notification now appears at the bottom of the window when the user performs an action that can be undone

Test Plan: Tested manually

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Differential Revision: https://phab.nylas.com/D1820
2015-07-31 13:12:47 -07:00
Ben Gotow 73ae6ea6f3 fix(T2387): Use better file icons from SDW
Summary:
fix misc spec failure by making event store fetch immediately on setup

add specs for displayExtension, displayName

Test Plan: Run new tests

Reviewers: evan

Maniphest Tasks: T2387

Differential Revision: https://phab.nylas.com/D1821
2015-07-31 12:34:24 -07:00
Ben Gotow fa2519923f fix(T2337): Break words to ensure messages wrap, fall back to horizontal scrolling of messages
Fixes T2337
2015-07-30 17:49:06 -07:00
EthanBlackburn 88a45dfd13 RSVP tile for events on messages
Summary: RSVP tile now appears for messages with attached events.

Test Plan: Tested manually. Will add unit tests

Reviewers: evan, bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1797
2015-07-28 18:21:30 -07:00
Ben Gotow d2833cfefa feat(hotloading): CJSX hotloading when running in dev mode
Summary:
# Conflicts:
#	static/components/tokenizing-text-field.less

Wat no

Test Plan: Tested with ci build

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1216

Differential Revision: https://phab.nylas.com/D1804
2015-07-24 14:10:48 -07:00
Evan Morikawa 5b7ca072cd fix(popover): don't let popover overflow
Summary:
The popover class now will adjust itself until it fits within the window
frame. You don't see the intermediate state in the double render.

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1795
2015-07-23 19:42:16 -07:00
Ben Gotow 7dfeabf7c9 fix(multiselect-bar): Do not render components inside action bar when it's hidden 2015-07-23 14:12:14 -07:00
Evan Morikawa 0b3dcd3e35 fix(styles): fix button padding and styles 2015-07-23 12:22:27 -07:00
Evan Morikawa f22d154486 feat(picker): new folder and label picker
Summary:
The new, styled folder and label picker!

Some highlights:
- Folder picker has custom icons and a divider
- Label picker has checkboxes with off, checked, and intermediate state
- Extracted LabelColorizer out of mail-label
- Search will bold the results it found
- Fixes to Tooltip to prevent it displaying at invalid moments
- Keyboard UX improvements to Menu

Test Plan: coming soon

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1790
2015-07-23 11:47:46 -07:00
Ben Gotow 5acbdb0955 fix(workspace): Support for hidden locations / columns
Summary:
- New control will likely be shortlived - SDW mocking up replacement for when settings UI lands
- New action for toggling location hidden
- New rule for mail labels: can't remove "Sent"

Test Plan: Run tests - none new atm

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1782
2015-07-23 11:18:42 -07:00
Ben Gotow 814ed76510 feat(drag-threads): Move threads to folders/labels from thread list
Summary:
Drag threads to the folders / labels in the sidebar
WIP

Drag and drop is styled!

Test Plan: Tests WIP

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1785
2015-07-23 11:10:51 -07:00
Evan Morikawa f29e0163aa fix(images): compress images
This reduced our image size by 92%. It saves us 4MB.

Several of our images had several hundred KB of plain text Adobe metadata
crap. Some had full blow Fireworks editing histories embedded in them.

I re-saved out these images and verified on both a diffing program and by
comparing the app that no pixels changed in the compression.
2015-07-22 22:41:19 -07:00
Ben Gotow a9d6795347 fix(SDW): Styling of various controls and buttons. See description
- Message reply dropdown uses new images. Fixes T2355
- New hover actions which are darker. Fixes T2358
- New reply icon in the message footer. Fixes T2359
- Toolbar buttons are the correct height. Fixes T2360
- Thread list selection state changes mail label style
- Removed dead assets
2015-07-21 13:53:06 -07:00
Ben Gotow a272761951 fix(labels): Labels in the thread list and in the message subject line
Summary: Mail labels

Test Plan: No tests atm, just visual code

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1774
2015-07-21 11:50:08 -07:00
Ben Gotow 3983269004 fix(toolbar-style): Add gradient to top toolbar, blurred styling 2015-07-16 17:51:18 -07:00
Ben Gotow 67c48b5136 fix(drag-n-drop): Remove react-dnd, display dropzone, allow tokens to be dragged out of app as plaintext
React-dnd is a nice library but it assumes it's going to be the only thing managing your drag and drop in the entire app. It also hides the underlying dataTransfer object so it's difficult to implement native drag and drop behaviors other than for Files and Urls, which they special-case.

Implementing it manually really isn't hard, and we can do things like attach a text/plain version of contact data to the contact drag.

Fixes T2054
2015-07-15 20:06:11 -07:00
Ben Gotow 9431da5321 fix(T2118): Center popout titles on windows/linux
Fixes T2118
2015-07-14 16:08:23 -07:00
Ben Gotow a384b7621c fix(back): Remove "Back to " prefix, centralize into back button itself, align using vertial-align instead of margin-top
Summary: Fixes T2135

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T2135

Differential Revision: https://phab.nylas.com/D1731
2015-07-13 16:33:57 -07:00
Ben Gotow 03b248cab2 fix(quoted-text-button): New, more obvious design for quoted text toggle
Test Plan: Run existing tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T2282

Differential Revision: https://phab.nylas.com/D1735
2015-07-13 16:28:20 -07:00
Evan Morikawa 93ea9c6165 fix(*): can select participant with space if it's an email
Summary:
Fixes T2272

If the label is too long, the unread icons will now ellipsis truncate the
text correctly instead of being pushed off of the side.

I made the max-width of the sidebar 17px wider to allow for Karim's french
"Inbox" translation.

Fixes T2266

Added some more protection to places where filenames could be blank when
downloading.

This was partially fixed by Rob's D1685

Fixes T2258

You can now finish selecting a participant by pressing `space`, but only
when the participant looks like an email address.

When you do this we directly add the email address to the chip instead of
looking up a contact. This allows you to send just to the email instead of
adding a potentially erroneous name into the input field

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2272, T2266, T2258

Differential Revision: https://phab.nylas.com/D1729
2015-07-13 10:25:30 -04:00
Evan Morikawa e8912e0e2e feat(quoted-text): New quoted text engine
Summary:
Add email reply parser

Quoted text detection for HTML

More blockquote specs

Added 'On … wrote:'

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1719
2015-07-08 09:51:33 -07:00
Ben Gotow 45bb16561f feat(offline-mode, undo-redo): Tasks handle network errors better and retry, undo/redo based on tasks
Summary:
This diff does a couple things:

- Undo redo with a new undo/redo store that maintains it's own queue of undo/redo tasks. This queue is separate from the TaskQueue because not all tasks should be considered for undo history! Right now just the AddRemoveTagsTask is undoable.

- NylasAPI.makeRequest now returns a promise which resolves with the result or rejects with an error. For things that still need them, there's still `success` and `error` callbacks. I also added `started:(req) ->` which allows you to get the underlying request.

- Aborting a NylasAPI request now makes it call it's error callback / promise reject.

- You can now run code after perform local has completed using this syntax:

```
    task = new AddRemoveTagsTask(focused, ['archive'], ['inbox'])
    task.waitForPerformLocal().then ->
      Actions.setFocus(collection: 'thread', item: nextFocus)
      Actions.setCursorPosition(collection: 'thread', item: nextKeyboard)
    Actions.queueTask(task)
```

- In specs, you can now use `advanceClock` to get through a Promise.then/catch/finally. Turns out it was using something low level and not using setTimeout(0).

- The TaskQueue uses promises better and defers a lot of the complexity around queueState for performLocal/performRemote to a task subclass called APITask. APITask implements "perform" and breaks it into "performLocal" and "performRemote".

- All tasks either resolve or reject. They're always removed from the queue, unless they resolve with Task.Status.Retry, which means they internally did a .catch (err) => Promise.resolve(Task.Status.Retry) and they want to be run again later.

- API tasks retry until they succeed or receive a NylasAPI.PermanentErrorCode (400,404,500), in which case they revert and finish.

- The AddRemoveTags Task can now take more than one thread! This is super cool because you can undo/redo a bulk action and also because we'll probably have a bulk tag modification API endpoint soon.

Getting undo / redo working revealed that the thread versioning system we built isn't working because the server was incrementing things by more than 1 at a time. Now we count the number of unresolved "optimistic" changes we've made to a given model, and only accept the server's version of it once the number of optimistic changes is back at zero.

Known Issues:

- AddRemoveTagsTasks aren't dependent on each other, so if you (undo/redo x lots) and then come back online, all the tasks try to add / remove all the tags at the same time. To fix this we can either allow the tasks to be merged together into a minimal set or make them block on each other.

- When Offline, you still get errors in the console for GET requests. Need to catch these and display an offline status bar.

- The metadata tasks haven't been updated yet to the new API. Wanted to get it reviewed first!

Test Plan: All the tests still pass!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1694
2015-07-07 13:38:53 -04:00
Ben Gotow f13d0e04a6 fix(getting-started): New menu item, sample package for devs 2015-07-06 14:23:51 -04:00
Ben Gotow 9aadd52afc fix(quoted-text): Do not consider gmail_extra quoted text
I don't know what gmail_extra is used for, but it appears from @mg's sample messages that it does not indicate quoted regions of the body. We also weren't looking for it in our hasQuotedText function.
2015-06-29 17:26:14 -07:00
Ben Gotow 4b8a081c14 fix(button-dropdown): merge causing style conflicts 2015-06-26 18:03:28 -07:00
EthanBlackburn 5addec4d9c Reply all behavior and button click capturing
Summary:
If an email is to a group, the reply button should have `To` set the original email sender and `Cc` the group Fixes Phab ticket 2142. Previously, the click on the reply button was not captured unless the click occured on the reply or reply all icon. Changed the span to a div with no padding that captures all clicks

Test Plan: tested manually, unit tests

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: evan

Maniphest Tasks: T2142

Differential Revision: https://phab.nylas.com/D1696
2015-06-26 16:45:05 -07:00
Ben Gotow c6eeddd8e7 fix(reply-dropdown): Improved assets and dropdown styles, hit regions 2015-06-26 15:03:13 -07:00
Ben Gotow 00d6a11512 fix(assets): New toolbar icons, shadows to achieve less heavy edges on messages
Summary: Just visual changes

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1695
2015-06-26 10:38:07 -07:00
Evan Morikawa 6f7017a887 fix(*): minor fixes
Summary:
Fixes T1905 - Gost line in recipients field
Fixes T1877 - Collapsed dates should not show time

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1877, T1905

Differential Revision: https://phab.nylas.com/D1671
2015-06-26 07:06:57 -07:00
Robert McQueen 9b75ad0c1d Add attachement icon to collapsed message if message has attachement
Summary: Adds attachment icon to collased message if message has attachment. I just copied the attachment icon in the thread-list to the message-list namespace in the static directory. If you want to do it another way, feel free to update

Test Plan: Tested locally. Not sure if this is worth a test, but I can write one if you want.

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2085

Differential Revision: https://phab.nylas.com/D1687
2015-06-25 10:35:06 -07:00
Robert McQueen 13920be848 feat(starring): Star/unstar from the message detail view
Summary: Adding star button to message-toolbar view

Test Plan: Added spec for starring message from the message-toolbar view

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1683
2015-06-25 10:33:26 -07:00
Ben Gotow 03e0e9d960 fix(composer): Show a scrollbar in the popout composer
Summary:
Fixes T1990

Change the ScrollRegion component so that you can optionally provide a getScrollbar prop that resolves to a ScrollRegion.Scrollbar component. This allows you to easily put the Scrollbar outside of the ScrollRegion if necessary.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1990

Differential Revision: https://phab.nylas.com/D1665
2015-06-23 15:21:25 -07:00
Evan Morikawa d08aa7ca92 fix(less): import for build script 2015-06-22 16:28:25 -07:00
Evan Morikawa 7739f08e84 feat(message): New Message List UI
Summary:
Initial message list collapsing

messages can be expanded explicitly

styling message items

composer UI and collapsing

expanding and collapsing headers

style new reply area

adding in message controls

Add message actions dropdown

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1664
2015-06-22 15:49:52 -07:00
Ben Gotow f7e16f0eca fix(*) Minor friday fixes - see description
- Delete should archive selection in split pane mode
- Thread list "quick actions" should be inverted when row is dark blue
- New star "action hover" state
- Multiselect list state is based on WorkspaceStore.layoutMode so add it to state
2015-06-19 16:07:24 -07:00
Ben Gotow 783dacf9a0 fix(button-borders): Use box-shadow to acheive 0.5px borders 2015-06-19 15:01:13 -07:00
Ben Gotow 19d97e5393 fix(*): Throttle so that DatabaseView won't pile on queries during scroll, better small attachment styles
Summary:
fix(attachment): Bad filenames breaking icons

fix developer bar colors

fix critical bug with files

Render small attachments inline-block, without hover effect, and with nice dotted transparency background

Test Plan: No new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1661
2015-06-19 11:31:27 -07:00
Ben Gotow 9b6117afdb fix(bold-emoji): Render bold emoji-range characters with standard weight font 2015-06-18 11:35:33 -07:00
Evan Morikawa bf11cf31cd fix(search): remove red search x 2015-06-18 09:43:18 -07:00
Evan Morikawa 1fa8e2d5fa fix(lint): fix minor style errors 2015-06-17 20:43:14 -07:00
Evan Morikawa c78ff03e60 feat(salesforce): new UI for Salesforce
Summary:
style opportunity picker and placeholder on tokenizing text fields

UI for synced opportunities

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1655
2015-06-17 20:40:08 -07:00
Ben Gotow 8d6dcfe549 perf(thread-list): Tailored SQLite indexes, ListTabular / ScrollRegion optimizations galore
Summary:
Allow Database models to create indexes, but don't autocreate bad ones

fix minor bug in error-reporter

Fix index on message list to make thread list lookups use proper index

Developer bar ignores state changes unless it's open

DatabaseView now asks for metadata for a set of items rather than calling a function for every item. Promise.props was cute but we really needed to make a single database query for all message metadata.

New "in" matcher so you can say `thread_id IN (1,2,3)`

Add .scroll-region-content-inner which is larger than the viewport by 1 page size, and uses transform(0,0,0) trick

ScrollRegion exposes `onScrollEnd` so listTabular, et al don't need to re-implement it with more timers. Also removing requestAnimationFrame which was causing us to request scrollTop when it was not ready, and caching the values of...

...clientHeight/scrollHeight while scrolling is in-flight

Updating rendered content 10 rows at a time (RangeChunkSize) was a bad idea. Instead, add every row in a render: pass as it comes in (less work all the time vs more work intermittently). Also remove bad requestAnimationFrame, and prevent calls to...

...updateRangeState from triggering additional calls to updateRangeState by removing `componentDidUpdate => updateRangeState `

Turning off hover (pointer-events:none) is now standard in ScrollRegion

Loading text in the scroll tooltip, instead of random date shown

Handle query parse errors by catching error and throwing a better more explanatory error

Replace "quick action" retina images with background images to make React render easier

Replace hasTagId with a faster implementation which doesn't call functions and doesn't build a temporary array

Print query durations when printing to console instead of only in metadata

Remove headers from support from ListTabular, we'll never use it

Making columns part of state was a good idea but changing the array causes the entire ListTabular to re-render.  To avoid this, be smarter about updating columns. This logic could potentially go in `componentDidReceiveProps` too.

Fix specs and add 6 more for new database store functionality

Test Plan: Run 6 new specs. More in the works?

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1651
2015-06-17 20:12:48 -07:00
Evan Morikawa 0b7b76c70e feat(composer): new composer and button styles
Summary:
initial styling of image attachments

more styles for composer overflow

style composer toolbar

toolbar styling

Fixes to inline composer

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1647
2015-06-17 16:03:50 -07:00
Evan Morikawa fe1e18740c feat(onboarding): refactor onboarding flow
Summary:
Add spinner and refactor container view to be router

add `NylasStore` as a global importable. specs for APIEnv

login page fixes

add old fixes to container view

finish extracting pages

fix onboarding flow

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1652
2015-06-17 15:58:58 -07:00
Ben Gotow c3287b7d57 fix(empty-states): Use quotes sparingly, show generic empty text in three-column mode and during search
Summary: We now show the inspirational quotes only when in list mode and viewing a tag. When you're viewing search results, or when you're in three-pane mode, you now see a more generic empty state.

Test Plan: No tests yet, may want to see if this refactor sticks when we start adding more empty states

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1642
2015-06-17 13:14:45 -07:00
Ben Gotow 19378ef5b0 fix(source-list-icons): Updated artwork courtesy of @sdw 2015-06-16 12:07:25 -07:00
Ben Gotow f887e4e55a fix(style): Minor styling adjustments (floating toolbar, token carats) 2015-06-11 18:46:30 -07:00
Evan Morikawa 6f4f0c0ad0 Fixes T1868: tokenizing inputs resize properly
Summary:
Fixes T1868
The hidden sizing window was not getting whitespace properly and the width
was different because of different paddings

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1868

Differential Revision: https://phab.nylas.com/D1623
2015-06-11 18:39:55 -07:00
Ben Gotow f7f1ab3605 feat(thread-actions): Hover actions on thread list, improved drawing performance
Summary: Adds hover actions to threads in the thread list, uses overflow:hidden to improve thread list render times

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1621
2015-06-11 18:38:57 -07:00
Ben Gotow aa10ddfd1c fix(thread-list): Narrow mode, and new selection rules for three-pane
Summary:
Fix bug in apm_wrapper

Refactor model selection so that it's easier to understand the logic for split vs list mode

Test Plan: Run new specs (WIP)

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1619
2015-06-11 18:00:40 -07:00
Evan Morikawa 6fcd5f2ced feat(attachments): new attachments & uploads UI with img support
Summary:
Initial styles on attachments ui

More file uploading UI

fix race condition in draft saving

attachments and uploads interweaved

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1610
2015-06-11 12:04:52 -07:00
Ben Gotow 6221bf1311 fix(fakt): Rename fakt, never try to use the locally installed version (with potentially incorrect baseline) 2015-06-08 17:48:59 -07:00
Ben Gotow a903bbea7c fix(build): CSS lint error breaking mac build 2015-06-08 17:24:55 -07:00
Ben Gotow 256813208f feat(starring): Star and unstar threads in the thread list
Summary:
When two or more buttons are grouped together, cut the padding off one interior edge so they're spaced more appropriately

Remove source list graphics for active states we aren't using

Starred in the sidebar

Small fix to the feature that keeps the selected item visible as you scroll

Test Plan: No new tests yet

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1607
2015-06-08 17:02:50 -07:00
Ben Gotow fb3f7fc410 feat(scrollbars): Custom scrollbars via ScrollRegion
Summary:
ScrollRegion with support for tooltips shown as you scroll, custom tooltips for thread list and message list.

fix(specs): all other scrollbars hidden to prevent incompatibility

fix scrollbar sizing when used in conjunction with resizableregion

Test Plan: Need to write tests and docs for ScrollRegion - no tests yet

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1597
2015-06-05 11:50:55 -07:00
Ben Gotow bc916a2530 feat(theming): Definitely not hacker mode. I don't know what you're talking about.
Summary: Add docs for new RetinaImg modes

Test Plan: Not much to test, except that it looks good!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1595
2015-06-05 11:40:44 -07:00
Ben Gotow 89e9cdef8d feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows
Summary:
Features:
- ThreadListParticipants ignores drafts when computing participants, renders "Draft" label, pending design

- Put the WorkspaceStore in every window—means they all get toolbars and custom gumdrop icons on Mac OS X

Bug Fixes:

- Never display notifications for email the user just sent

- Fix obscure issue with DatabaseView trying to update metadata on items it froze. This resolves issue with names remaining bold after marking as read, drafts not appearing in message list immediately.

- When you pop out a draft, save it first and *wait* for the commit() promise to succeed.

- If you scroll very fast, you node.contentWindow can be null in eventedIframe

Other:

Make it OK to re-register the same component

Make it possible to unregister a hot window

Break the Sheet Toolbar out into it's own file to make things manageable

Replace `package.windowPropsReceived` with a store-style model where anyone can listen for changes to `windowProps`

When I put the WorkspaceStore in every window, I ran into a problem because the package was no longer rendering an instance of the Composer, it was declaring a root sheet with a composer in it. This meant that it was actually a React component that needed to listen to window props, not the package itself.

`atom` is already an event emitter, so I added a `onWindowPropsReceived` hook so that components can listen to window props as if they were listening to a store. I think this might be more flexible than only broadcasting the props change event to packages.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1592
2015-06-03 16:02:19 -07:00
Ben Gotow 2cac5e1edf fix(fakt): Switch to otf fonts with correct baseline, remove hacky styles 2015-06-03 11:07:59 -07:00
Ben Gotow f0f4df6714 add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
Ben Gotow 2b324c4533 feature(package-management): Package management interface, APM integration
Summary:
Update a few more packages to deactivate properly

Miscelaneous fixes

Initial commit of new settings package

WIP

WIP - can load and unload and install / uninstall

Click to create new boilerplate package, package updating

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1582
2015-06-02 19:04:21 -07:00
Ben Gotow 310f8ba062 fix(mailto): Handle mailto on application launch, populate NamespaceStore synchronously
Summary:
atom-window `sendMessage` was not the same as `browserWindow.webContents.send`. WTF.

Save current namespace to config.cson so that it is never null when window opens

Don't re-create thread view on namespace change unless the namespace has changed

Tests for NamespaceStore state

Push worker immediately in workerForNamcespace to avoid creating two connections per namespace

Allow \n to be put into sreaming buffer, but only one

Clear streaming buffer when we're reconnecting to avoid processing same deltas twice (because of 400msec throttle)

Make `onProcessBuffer` more elegant—No functional changes

Test Plan: Run tests!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1551
2015-05-21 18:08:29 -07:00
Ben Gotow 91edef9f7a fix(naming): Move atom/inbox/nilas refs to Nylas
Conflicts:
	internal_packages/inbox-activity-bar/lib/activity-bar-long-poll-item.cjsx
2015-05-15 11:07:28 -07:00
Ben Gotow b476532952 fix(T1241): Key repeat rate higher than animation duration causes cursor to disppear
Summary: Resolves T1241

Test Plan: No tests to run - all CSS!

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1241

Differential Revision: https://review.inboxapp.com/D1510
2015-05-15 10:55:17 -07:00
Evan Morikawa 8941eb791e feat(salesforce): add Lead and Contact syncing
Summary:
associating salesforce contacts and leads with Nylas contacts

adding fetcher form salesforce

shows conencted leads and contacts

auto associates acount

fixing salesforce forms

Salesforce composers are styled

fix opportunity association with account on object creation

fix specs

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1507
2015-05-14 14:58:42 -07:00
Ben Gotow e8f7f76080 feat(window-manager): Refactor window code, actually destroy main window when logging out
Summary:
Resolves T1200 and probably others.

This diff moves all the window management / hot loading into a new class called the WindowManager
and also changes the way the app transitions between onboarding and main window. When you log out,
the main window clears config and clearing the config causes the window manager to close the main
window and open the login window. When it detects a token again, it opens the main window.

This means you can't:
- Open the main window from the login window
- Open mailto: links and accidentally see the main window or a composer, since the draft store isn't
  running anywhere.
- Don't need to worry about properly resetting thigns when namespaces change, since the window
  is now actually re-created from scratch with the new auth token.

Be a little more defensive about namespace checks in draft-store

Move window code to window-manager

Rename AtomApplication to just `Application`

Specs fix

Test Plan: Run tests, would be good to have more for this.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1200

Differential Revision: https://review.inboxapp.com/D1501
2015-05-14 14:54:29 -07:00
Ben Gotow ba00372645 feat(tags): Tags dropdown and new features for Menu and Popover
Summary:
Focused Content Store should notify observers when focused items change, not just when they're reassigned

Popovers should have a `direction` and optional event onOpened

Menu divider documentation was wrong, menus should support checked items by default

Pressing escape in a popover's input should dismiss the popover

Other changes

Remove specs that make no sense anymore

Small tweak to report build breaking. Shouldn't happen often ;)

Test Plan: Run tests, which will now phone home if they break

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1493
2015-05-13 12:01:41 -07:00
Evan Morikawa 2c60d75050 feat(salesforce): load current user
Summary:
Loads the current user to pre-populate the Salesforce field in the
creators
add tabindex to tokenizing text fields

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1468
2015-05-07 15:28:44 -07:00
Evan Morikawa 2b253a5c4a fix(lint): fix linter errors with latest land 2015-04-30 18:27:39 -07:00
Ben Gotow 9ffe0d74dd feat(unsafe-components): Wrap injected components, catch exceptions, clean up ComponentRegistry
Summary:
This diff gives the ComponentRegistry a cleaner, smaller API. Instead of querying by name, location or role,
it's now just location and role, and you can register components for one or more location and one or more
roles without assigning the entries in the registry separate names.

When you register with the ComponentRegistry, the syntax is also cleaner and uses the component's displayName
instead of requiring you to provide a name. You also provide the actual component when unregistering, ensuring
that you can't unregister someone else's component.

InjectedComponent and InjectedComponentSet now wrap their children in UnsafeComponent, which prevents
render/component lifecycle problems from propogating.

Existing components have been updated:

1. maxWidth / minWidth are now containerStyles.maxWidth/minWidth
2. displayName is now required to use the CR.
3. containerRequired = false can be provided to exempt a component from being wrapped in an UnsafeComponent.
   This is useful because it's slightly faster and keeps DOM flat.

This diff also makes the "Show Component Regions" more awesome. It displays column regions, since they now
use the InjectedComponentSet, and also shows for InjectedComponent as well as InjectedComponentSet.

Change ComponentRegistry syntax, lots more work on safely wrapping items. See description.

Fix for inline flexbox scenarios (message actions)

Allow ~/.inbox/packages to be symlinked to a github repo

Test Plan: Run tests!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1457
2015-04-30 16:10:15 -07:00
Ben Gotow 892205f431 docs(*): Additional docs for DraftStoreExtensions 2015-04-28 10:38:24 -07:00
Ben Gotow 9551a5db21 feat(empty-state): New view that appears when a multiselect-list is empty
Summary: fix(query): .count() queries are apparently coming back as strings. Never let this happen

Test Plan: Run 1 new test

Reviewers: evan

Reviewed By: evan

Subscribers: ktalwar

Differential Revision: https://review.inboxapp.com/D1441
2015-04-24 15:43:14 -07:00
Evan Morikawa 365fe400f7 feat(salesforce): add Salesforce creator
Summary:
tests on the schemas

build input elements

form builder pulls data

grouping by row

salesforce object store

salesforce api logic

successfully pulling salesforce objects into db

object store saving to db

refactoring tokenizing text field

full documented tokenizing text field with specs

linking in object picker component

converting generated form to a controlled input

form change handlers for controlled inputs

Salesforce object creator store

new way of opening windows

removed atom.state.mode

create new salesforce object creator in new window

form creator loading in popup with generated form

generated form renders select and multiselcet and textarea

add checkbox

creating related objects

windnows know when others close

remove debugger statements

form submission

converting data for salesforce posting

hot window loading

new hot window registration

hot loading windows

actions for listening to salesforce objects created

generated form errors

error handling for salesforce object creator

rename saleforce object form store

display errors to form

submitting state passed through

properly posts objects to Salesforce

change name to salesforce object form

add deep clone

use formItemEach

styling for Salesforce form creator

salesforce required fields come back and populate form

generated form loads related objects into fields

remove console logs and fix sales schema adapter test

fix task queue and formbuilder specs

fix action bridge spec

fix tokenizing text field spec

fix draft store and tokenizing proptypes

fix linter issues

fix tokenizing text field bug

rename to refresh window props

remove console.log

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1425
2015-04-24 12:36:19 -04:00
Ben Gotow df38008c56 fix(*): Small fixes from Lake Tahoe. See Summary.
Summary:
This diff includes a few small things:

- Menu: Don't select the first item until the user taps down arrow, and allow the user to use the arrow keys to move up and down through Menu items.

- Menu: Make scroll code from MultiselectList re-usable, use in Menu. Now if you use the keys to move to an item that is offscreen it will follow.

- Popover: Tapping the button that opened popover should close it

- Make sure buttons in toolbars are at least standard height

- Re-enable Markdown processing via `grunt docs`

- A bit of initial inline documentation for crosjdoc. Need to evaluate whether this is worth doing everywhere.

- New `search-playground` package for experimenting with search and search weights.

- Swap itemClassProvider for more generic itemPropProvider

- Add crojsdoc config file

- Export React, because third party packages can't require things from our app

- [FEATURE] Bring back static file support in third party packages via `nylas://translate/IMG_20150417_124142.jpg`

- Fix invariant error with search bar

- [FEATURE] "Show Original" under Message actions

- Fix DatabaseView so that many archives at once don't cause problems

Test Plan: Run specs

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1426
2015-04-22 16:41:29 -07:00
Ben Gotow 2d51c94f51 feat(registered-region): Replace everywhere injecting elements by Role with <RegisteredRegion>
Summary:
This is a small diff that isolates the pattern of "insert all the things with role=ThreadAction and pass them these props". The goal is to eventually make this wrapper do some analysis, performance checks, etc. Right now, it just has the advantage of making the parent components simpler and also adding a new inspector view where you can see the regions , their names and the props they take (thread:<Thread> or selection:<ModelListSelection>)

fix(menu): Re-importing different class with same name breaking dropdowns

make composer use flexbox for it's footer

fix alignment of the input in the participant text field. how did this break?

new action for hiding / showing component regions

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1422
2015-04-21 18:16:08 -07:00
Ben Gotow 8bd14602c3 fix(*): Small patches for thread icons, marking as read, scrollbars
Summary:
fix(scrollbars): overflow-y, not overflow

fix(participants): Overflow not set correctly on participants

fix(thread-list): Don't show reply or fw icon for unsent drafts

Remove bad code for updating sidebar drafts

Mark as read in MessageStore so that receiving new messages while viewing a thread re-marks it as read

Don't show messages I send with the "Reply" icon

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1418
2015-04-20 15:59:43 -07:00
Ben Gotow d9ee12cf81 refactor(*): Thread list fixes, flexible workspace store, multiple root sheets
Summary:
Remember to remove all the event listeners added to email frame

New files tab, queryable filename, not attribute

Rename ThreadSelectionBar to RootSelectionBar to go with RootCenterComponent, make it appear for draft selection and file selection as well

Initial file list and file list store, File Location

Remove unnecessary shouldComponentUpdate

Always track whether new requests have happened since ours to prevent out of order triggers

Always scroll to the current [focused/keyboard-cursor] in lists

So goodbye to the trash tag

Only scroll to current item if focus or keyboard has moved

Show message snippet in notification if no subject line

Make the RootSelectionBar pull items from Component Registry

New Archive button (prettier than the other one)

Refactor event additions to iframe so iframe can be used for file display also

Thread List is no longer the uber root package - drafts and files moved to separate packages

WorkspaceStore now allows packages to register sheets, "view" concept replaced with "root sheet" concept, "mode" may not be observed by all sheets, and is now called "preferred mode"

Don't animate transitions between two root sheets

Mode switch is only visible on root sheets that support multiple modes

Account sidebar now shows "Views" that have registered themselves: drafts and files for now

Model Selection Bar is now a component, just like ModelList. Meant to be in the toolbar above a Model List

Misc supporting changes

New files package which registers it's views and components

Rename files package to `file-list`

Move checkmark column down into model list

Don't throw exception if shift-down arrow and nothing selected

Takes a long time on login to fetch first page of threads, make pages smaller

Displaynames, spec fixes

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1412
2015-04-10 14:33:05 -07:00
Ben Gotow 86f7d65034 feat(thread-list): Multiple selection, bulk actions, refactoring
Summary:
This diff provides multi-selection in the thread list powered by a new ModelList component that implements selection on top of ListTabular (or soon another List component). It includes business logic for single selection, shift selection, command-click selection, etc.

This diff also improves the performance of DatabaseView by assessing whether updates are required based on specific database changes and skipping queries in many scenarios.

WIP

WIP

Move selection into modelView instead of store

WIP

Preparing to convert to ModelList mixin

Make ThreadStore => ThreadListStore

Break the DraftStore in two (new DraftListStore) to avoid keeping all drafts in all windows

Get rid of unread instance variable in favor of getter that falls through to isUnread()

Much smarter logic in DatabaseView to prevent needless queries (especially counts and full invalidation of retained range)

Squashed commit of the following:

commit 486516b540e659735675765ca8b20d8a107ee2a9
Author: Ben Gotow <bengotow@gmail.com>
Date:   Tue Apr 7 17:30:23 2015 -0700

    Invalidate the retained range debounced

commit 7ac80403f52d108696c555f79c4c687d969f0228
Author: Ben Gotow <bengotow@gmail.com>
Date:   Tue Apr 7 17:30:16 2015 -0700

    Wait until after the view updates to move focus

commit 88d66eb19a9710847ff98bea22045bb686f30cc6
Author: Ben Gotow <bengotow@gmail.com>
Date:   Tue Apr 7 17:28:01 2015 -0700

    Bail out early when loading data if a reload has been requested

commit a49bedc44687040f7c675ff298376917a0b5fdcb
Author: Ben Gotow <bengotow@gmail.com>
Date:   Tue Apr 7 16:38:58 2015 -0700

    Log query data when in a query is being logged

commit c64a9e02f9072fd30edb98c45be581d6ac00c48a
Author: Ben Gotow <bengotow@gmail.com>
Date:   Tue Apr 7 16:38:45 2015 -0700

    Mark thread and messages as read in parallel instead of in sequence

commit 4b227100a795e20257cda0d60b00cc75b0000b0f
Author: Ben Gotow <bengotow@gmail.com>
Date:   Tue Apr 7 16:38:32 2015 -0700

    Don't load tags with hardcoded IDs from the database, and load them in parallel instead of in sequence

commit aeb7f1d646786cfa1c247fe78ce5467da07c4446
Author: Ben Gotow <bengotow@gmail.com>
Date:   Tue Apr 7 16:37:54 2015 -0700

    Pass objects instead of ids to thread methods—since we always have the most current thread anyway, this makes things a bit faster

commit e70889d1d05ece81a081b8b3f27b62491429b6f9
Author: Ben Gotow <bengotow@gmail.com>
Date:   Mon Apr 6 16:41:49 2015 -0700

    [icon] Paper airplanes

Restyle account sidebar, optimize tag count queries a bit more

Fix initialization issue with webkit image mask

Can't compare dates with is/isnt

Assets for check boxes

Bug fixes

Wrap ModelList instead of providing props

Verbose mode for database view

Fix existing specs

Six new specs covering invalidateIfItemsInconsistent

Test Plan: Run 40+ new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1410
2015-04-08 19:25:00 -07:00
Ben Gotow 523ed4b316 feat(thread-list): Inifite scrolling, powered by new DatabaseView, InboxSyncWorker
Summary:
NamespaceStore needs to be more careful about triggering unnecessarily

ThreadListParticipants should use minimum set of <span> tags, not one per name

FocusedTagStore triggers only when the tag has actually changed

New InboxSyncWorker is responsible for fetching contacts, calendars, threads

Update the draft list to look like the thread list

ThreadStore now uses a "Database View" to vend items, which will free it up to focus on things like selection soon. The DatabaseView handles pagination and maintains a cache of items in a "retained range" the view needs. It also abstracts the...

..."thread metadata" concept into a general purpose pattern

Thread-list package implements SearchView to match the DatabaseView. Instead of fetching items from the database it uses the search API

Update existing specs

Bug fix

Specs for focused stores

New specs!

Pad search range so we prefetch the next pages

Clear the scroll offset if the view is changed (between tabs)

Test Plan: Run 58 new tests with 110 new assertions!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1398
2015-04-06 11:46:20 -07:00
Ben Gotow 9b3bcac256 feat(report): Message list actions for phoning home bad text content
Summary: Little feature

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1365
2015-03-27 16:38:34 -07:00
Evan Morikawa 286fdcfad9 feat(icons): mac hover state shows icons
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1359
2015-03-27 19:35:15 -04:00
Evan Morikawa 9a0fce22c4 fix(lint): fix linting css errors 2015-03-26 14:49:03 -04:00
Evan Morikawa ee51602b26 feat(selection): by default nothing is selectable.
Summary:
Now all elements by default have selection set to inherit with the root
level body object set to no selection.

This makes everything (except input elements) not selectable by default.

You can explicitly set the css class or use the new `.selectable` class.

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1355
2015-03-26 14:39:42 -04:00
Ben Gotow dff5465931 fix(*) Small visual tweaks and fixes - see summary
Summary:
ThreadStore should be done loading as soon as threads are available

SearchSuggestionStore should use ContactsStore for contact results

Contact Store should not "filter all, take 10" it should only filter until it has 10. It should also check against "Ben Gotow" as well as "Ben" and "Gotow", so I can type "Ben Go"

Sometimes participants are "Ben Gotow <ben@g.com>", "ben@g.com". If we get zero contacts after removing Me, put "Me" back in...

Fix "Update Available" notification, broken reference to `atom.views.getView(atom.workspace)`

A bit more debugging around cursors. Need to handle this case soon.

Only use atomWorkspace if it exists.

Fix for dragging next to / around toolbar window controls

Consolidate the display of Contacts in menus into a single MenuItem subclass

Update Template Popover styling

fetchFromCache should only remove thread loading indicator *IF* it found results in the cache. Doh...

Give the thread list "Name" column a fixed width (mg)

Better styling of message list collapsed mode, rage against user selection and cursor: pointer

Occasionally admin.inboxapp.com returns bogus data

Sebaastian feedback on thread list

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1350
2015-03-25 18:22:52 -07:00
Ben Gotow 8f2211f6a0 feat(threads): List improvements and message collapsing
Summary:
This diff uses the new ?expanded=true threads request to fetch threads and the messages inside them at the same time. The messages from this endpoint don't contain bodies. Message bodies have been moved to a new "secondary attribute" type, which can be optionally requested when making queries. This allows us to 1) quickly fetch messages without worrying about MBs of JSON, 2) update messages without updating their bodies, and 3) avoid calls to /messages?thread_id=123. The new message store fetches just the items it wants to display in expanded mode, and we'll show snippets for the rest.

Fix up forwarded message

Approach: Thread.messageMetadata

join approach WIP

join approach complete

"" || null = null. OMG.

Make spinner a bit smarter, use code delays and not css delays

Search suggestion store should only show first 10 matches

Msg collapsing, refactored msg store that will fetch individual messages that are marked as expanded, set loaded = true when it's all done

Test Plan: Tests coming soon. The query refactoring here broke a lot of tests...

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1345
2015-03-25 12:41:48 -07:00
Evan Morikawa dc5941f3f1 feat(archive): archive now pops back to thread list
Summary:
add spec for message toolbar items

add thread list spec

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1344
2015-03-25 14:17:57 -04:00
Evan Morikawa f2267c8ebd fix(toolbar): fix css lint error 2015-03-24 17:32:11 -04:00
Evan Morikawa e1ec298d4b feat(messages): floating reply area in message-list
Summary:
reply text now scrolls to bottom on new draft

tests for reply type

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1338
2015-03-24 16:57:24 -04:00
Ben Gotow 0669468ec0 fix(*): Small fixes for drafts, interface tweaks
Summary:
Message list can be narrower

Account sidebar is narrower

Never open new windows on single click

Blue send button

Clean up cruft from draft deletion

Render composer empty, setProps when draft populated

Use new `pristine` attribute to discard un-changed new drafts

_addToProxy needs deep equals to prevent "save to = [], cc = []"

Mark as read on click, not afterwards

Allow toolbar / sheet items to style based on the workspace mode

specs covering draft unloading / behavior of cleanup

Always, always reset mode to spec after each test

New tests for destroy draft functionality

Test Plan: Run a handful of new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1335
2015-03-23 16:33:28 -07:00
Evan Morikawa 564ecca8e0 feat(sidebar): add more Salesforce states
Summary:
add more Salesforce states

more salesforce sidebar

extract focused contacts into its own store

fullcontact store fixes

extract thread participants to own module

typo

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1326
2015-03-20 16:31:35 -07:00
Ben Gotow 21e8455ef6 refactor(layout): More configuration into WorkspaceStore, less in packages 2015-03-20 14:52:10 -07:00
Ben Gotow eb6cc11a83 feature(templates): Pick templates, fill variable regions, Draft extensions
Summary:
fix(keymappings): Enter to focus item, logout works now

Minor fix for some problems with activity bar

Fix tabindex = 1 where tabindex should be =-1

Remove idgen that was causing footers to be replaced

WIP

Draft store extension hooks

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1320
2015-03-20 10:23:50 -07:00
Ben Gotow aad21317e5 feat(ui): Updates from March 17th mockups
Summary:
There are two known issues:
- toolbar is not draggable in some areas when in three-pane mode.
- archive button appears over very long subjects. Propose moving this button elsewhere.

WIP

WIP

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1311
2015-03-18 18:21:04 -07:00
Evan Morikawa d283cb432b feat(composer): new composer styles
Summary:
tooltip styling

new styled floating toolbar

move buttons to bottom

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1305
2015-03-17 16:19:40 -07:00
Ben Gotow cce71a38aa fix(buttons): Don't use pointer cursor in title bar, or elsewhere for buttons 2015-03-17 13:53:20 -07:00
Ben Gotow dee14a37b7 fix(message-list): Adds fade-in, fixes jerky scroll offset when viewing messages
Summary:
feat(debugging): Put db query tiemstamps in js timelines

Mark as read *after* you stop looking at a message, to avoid pointless repaint while looking

fix specs :'(

Make focus() do something smart if not provided a field name

Stop doing the partial load / full load from cache. Slower, but also means we can evaluate "correct" scroll offset in one pass

refactor message-list to fade in after load. simplifies scroll logic

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1306
2015-03-17 12:11:34 -07:00
Ben Gotow 6b270734ef feat(title-bar): Custom titlebar in main app window (darwin-only)
Summary: Only applies to the main window. Will be applied to secondary windows like the composer when design decides whether that window will have a toolbar. (white or gray at the top?)

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1298
2015-03-13 17:02:46 -07:00
Ben Gotow c301dcfbb1 feat(mode-switch): New layout designed for small form factors
Summary:
feat(mode-switch): almost working

Remove SheetStore in favor of bigger WorkspaceStore

Back button for mode switching

Test Plan: Tests WIP

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1292
2015-03-13 13:11:24 -07:00
Ben Gotow 34facc920f fix(sheets): Move toolbar, re-introduce :Top region, refactor sheet layout
Summary:
Debounce Component Registry trigger to make app launch much more efficient

Allow arbitrary additional attributes to be set on flexbox, resizable-region

Updates to notification styling

Sheet store maintains an array of sheet types3 instead of sheet elements

Search bar and composer new should be globally visible

Toolbar is now in sheet container instead of individual sheet columns

The sheet container monitors sheet column width and manually positions toolbars

Test Plan: No new tests yet - will see if this design sticks first.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1287
2015-03-12 15:07:38 -07:00
Evan Morikawa 8b2797d3b0 feat(notifications): move to sidebar
Summary: feat(notifications): move to sidebar

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1282
2015-03-11 13:17:11 -07:00
Ben Gotow 69c42115b2 fix(win32): Resize cursors need to be different for win 2015-03-11 13:13:51 -07:00
Evan Morikawa 0fb7e2c101 feat(composer): add popout icon and header styles 2015-03-10 18:14:53 -07:00
Evan Morikawa 7d10a3a00d feat(menus): remove unused menu items 2015-03-10 17:52:30 -07:00
Evan Morikawa fd43c7002d feat(colors): new colors for selection states
Summary: adjust colors

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1273
2015-03-10 11:29:14 -07:00
Evan Morikawa 282cc40e9a feat(message): change long format timestamp
Summary: Minor UI fixes

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1271
2015-03-10 10:08:04 -07:00
Ben Gotow 343e592569 feat(draft-list) Refactor thread-list, create draft-list
Summary: Adds the draft list using a refactored list-tabular class. Also fixes several draft bugs that appeared after allowing editing.

Test Plan: Run tests (need to test new ListTabular component ASAP)

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1272
2015-03-09 18:25:53 -07:00
Ben Gotow 8788962809 fix(buttons): Fix toolbar button sizes to be consistent 2015-03-06 12:31:39 -08:00
Ben Gotow d55aad9ce9 refactor(toolbar): Toolbar items for messages are back! 2015-03-06 12:03:32 -08:00
Ben Gotow 9e447ad501 refactor(toolbar): Better base for building toolbars 2015-03-06 11:05:25 -08:00
Evan Morikawa 7e7f8e5eda Merge branch 'feat-refactor-layout' of github.com:inboxapp/edgehill into feat-refactor-layout
Conflicts:
	src/flux/models/utils.coffee
2015-03-05 19:57:50 -08:00
Ben Gotow 567acfb14b fix(*) minor patches and fixes for specs / ui 2015-03-05 19:09:42 -08:00
Ben Gotow d04951dd61 fix(less): Lint errors preventing successful build 2015-03-05 15:42:38 -08:00
Evan Morikawa 4af00cfaf4 more composer styles 2015-03-05 13:31:11 -08:00
Ben Gotow 6ca63fc01c Merge branch 'feat-refactor-layout' of github.com:inboxapp/edgehill into feat-refactor-layout
Conflicts:
	static/components/tokenizing-text-field.less
2015-03-05 10:59:00 -08:00
Evan Morikawa e7f3e77fde composer fixes 2015-03-04 19:06:39 -08:00
Evan Morikawa 05c6fc9ecf more composer styling 2015-03-04 18:47:48 -08:00
Ben Gotow a5508e46bc New login flow with mobile user agent set 2015-03-04 18:12:50 -08:00
Evan Morikawa ecccf72cd8 composer footer full-width 2015-03-04 15:52:40 -08:00
Ben Gotow 2c1975472b New onboarding 2015-03-04 15:19:51 -08:00
Evan Morikawa 689ca426de styling autocomplete 2015-03-04 14:26:53 -08:00
Evan Morikawa 14a6fa2ab1 participant chip improvements 2015-03-04 12:30:54 -08:00