Summary:
This diff fixes T3389 and makes it possible to define mail views which are not based on a category and focus them in the app.
I think that we need to create a new index on the starred attribute to make sure the query runs fast.
More tests WIP
Test Plan: Run tests, more coming soon!
Reviewers: dillon, evan
Reviewed By: evan
Maniphest Tasks: T3389
Differential Revision: https://phab.nylas.com/D1979
Summary: NOTE: this ticket and this diff do not address turning the 'Important' label into a more user-friendly chevron. I created T3477 for that.
Test Plan: added more tests. however, seems like somebody merged some tests which are failing.
Reviewers: bengotow, evan
Reviewed By: evan
Maniphest Tasks: T3454
Differential Revision: https://phab.nylas.com/D1963
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
Summary:
Fix edge cases where _getRangeInScope is null, fix logic errors
fix(1932) Edge case where we can't find a container for the message Id we're asked to scroll to
Check view exists before trying to perform actions. Will be fixed once keybindings are a React container
Test Plan: Run specs
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1906
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
Summary: Threads are now sorted using the thread's receivedrecentdate instead of recentdate
Test Plan: Tested Manually
Reviewers: bengotow
Reviewed By: bengotow
Subscribers: mg
Differential Revision: https://phab.nylas.com/D1812
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
Summary:
There are now two objects, Folders & Labels. These inherit from `Category`
(that's what Eben said they were using on the backend).
There are two separate tasks.
1. MoveToFolderTask
2. ApplyLabelsTask
It turns out that the semantics between the two are quite different.
The reverse operation for moving to a folder is a bit tricky.
As of 7-8-15, the Tasks are pretty much complete. I need to write tests
for them still and do some manual testing in the client.
Test Plan: Writing specs
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D1724
Summary:
Adding spec for message list star. Fixing multi-select in 3-pane starring
I didn't write a spec for thread-list because the thread-list-spec appears to be broken (returns immedietly at the top). I spent ~15 minutes attempting to fix but didn't make much progress
Test Plan: Added spec to message list
Reviewers: bengotow
Reviewed By: bengotow
Maniphest Tasks: T1957
Differential Revision: https://phab.nylas.com/D1697
- 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
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
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
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
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
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
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
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
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
Summary:
Fixes: T1334
remove final InboxApp references
move out all underscore-plus methods
Mass find and replace of underscore-plus
sed -i '' -- 's/underscore-plus/underscore/g' **/*.coffee
sed -i '' -- 's/underscore-plus/underscore/g' **/*.cjsx
Test Plan: edgehill --test
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://phab.nylas.com/D1534
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
Summary:
This diff moves us up to React 0.13.2 and transitions some of the core React components to the new
syntax based on plain Javascript objects. `setInitialState` is now just code in the constructor,
`getDOMNode(@)` is now `React.findDOMNode(@)`, and `isMounted` is no longer necessary or available.
This diff also adds `RegisteredComponent` to match `RegisteredRegion`. In another diff,
I think we should change the names of these to be `DynamicComponent` and `DynamicComponentSet`.
This diff also includes preliminary API Reference docs for Menu.cjsx and Popover.cjsx. You can build the docs
using `grunt docs` from the build folder. It produces a simple html format now, but it's easy
to customize.
Also we now ignore "Unnecessary fat arrow"
Test Plan: Run tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1437
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
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
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
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
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
Summary:
ThreadStore is now in the thread-list package.
Account sidebar no longer has random stuff dealing with search, no longer maintains selection apart from FocusedTagStore
Thread nav buttons are in the thread package
Account sidebar pulls selection from FocusedTagStore, no longer fires an Action to select Inbox, which was weird
Thread store is in thread-list package. No longer has any selection concept -> moved to FocusedThreadStore. Also looks at database changes to do "shallow" updates when only threads and not messages have changed, or when only messages of a few...
...threads have changed.
WorkspaceStore now handles both pushing AND popping the thread sheet. So all sheet behavior is here.
ThreadStore => FocusedThreadStore, selectThreadId => selectThread
Include all models in inbox-exports
It actually takes a long time to call Promise.reject because Bluebird generates stack traces. Resolve with false instead (100msec faster!)
Cache the model class map. All the requires take ~20msec per call to this method
ThreadList looks at FocusedThreadStore for selection
FocusedThreadStore, FocusedTagStore
Updated specs
Test Plan: Run tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1384
Summary:
Freeze threads on their way out of the ThreadStore
Don't add an unread attribute to contacts by accident...
Don't pass inline functions as props that are looked at by _isEqual
Test Plan: Run tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://review.inboxapp.com/D1367
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