Commit graph

75 commits

Author SHA1 Message Date
dillon 638843ebba fix(category-picker): add scrollbar to category picker
Summary:
fixes T3564

the problem was that the user couldn't tell that the folder & label lists contained more folders & labels than was shown. so i added a scrollbar to make it clearer.

Test Plan: tested manually. all tests still green.

Reviewers: evan, bengotow

Reviewed By: bengotow

Maniphest Tasks: T3564

Differential Revision: https://phab.nylas.com/D2029
2015-09-17 12:59:01 -07:00
Ben Gotow 229c5578f7 fix(thread-list): Depressed+active state needs to be different for immediate click feedback 2015-09-09 14:05:03 -07:00
Ben Gotow 3f3ec441ae 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 cea27cc8ce 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 67c0ebf4b6 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
dillon 9c5281d11d 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 a099e677e0 fix(button-dropdown): Broken styles on reply/reply-all button dropdown 2015-08-24 17:31:03 -07:00
Ben Gotow 607ca3bf10 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
Ben Gotow 183c552520 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 b5ef2fa883 fix(contact-chips): Remove left/right margin from input to align properly
Fixes T2878
2015-08-06 12:27:49 -07:00
Ben Gotow e68a139f4d 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 b7e314ac62 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
Evan Morikawa 9eb36f5813 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 1c5f9b74e9 fix(multiselect-bar): Do not render components inside action bar when it's hidden 2015-07-23 14:12:14 -07:00
Evan Morikawa 348d60ea0c 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 a559e3f89f 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
Ben Gotow ffcb609194 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 3aa7801d89 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 9ff6e75c30 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
Ben Gotow 343bb3163b 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 b738770379 fix(button-dropdown): merge causing style conflicts 2015-06-26 18:03:28 -07:00
EthanBlackburn 067834839c 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 8d60325ee0 fix(reply-dropdown): Improved assets and dropdown styles, hit regions 2015-06-26 15:03:13 -07:00
Evan Morikawa 70a83a648d 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
Ben Gotow 8c764ca75d 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 012c610009 fix(less): import for build script 2015-06-22 16:28:25 -07:00
Evan Morikawa 4671bf885f 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
Evan Morikawa 2e9a2ac167 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 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
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 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
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 40c3de5590 fix(fakt): Switch to otf fonts with correct baseline, remove hacky styles 2015-06-03 11:07:59 -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 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
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 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 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