Commit graph

102 commits

Author SHA1 Message Date
Ben Gotow 31037dfa1b 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 e2fa53f45d 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 e44a7e28b6 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 1d464453d8 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 cd6bd995f6 fix(source-list-icons): Updated artwork courtesy of @sdw 2015-06-16 12:07:25 -07:00
Ben Gotow 912cb4634e fix(style): Minor styling adjustments (floating toolbar, token carats) 2015-06-11 18:46:30 -07:00
Evan Morikawa 81f1b5538e 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 2aa24bcd66 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 d5e1816d88 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 449e11cdda 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 fd2a197cc1 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 53cf64000a fix(build): CSS lint error breaking mac build 2015-06-08 17:24:55 -07:00
Ben Gotow 79f0405148 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 df13b06c2a 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 5fbd881304 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 e303705b45 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 40c3de5590 fix(fakt): Switch to otf fonts with correct baseline, remove hacky styles 2015-06-03 11:07:59 -07:00
Ben Gotow f82e6da9c0 add(specs): +101 specs and 403 assertions from Atom 2015-06-02 19:51:00 -07:00
Ben Gotow a3b45cf33a 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 b194d7fb37 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 9378f4480c 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 e15066d5f0 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 96ead235ff 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 214c8b2aaa 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 5b7ae0ad54 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 db687e584e 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