Commit graph

86 commits

Author SHA1 Message Date
Evan Morikawa c65425ab91 fix(composer): pasting into composer sanitizes and preserves whitespace
Summary:
Fixes T1132
Added tests, and an html sanitizer.

Test Plan:
See contenteditable-component-spec.cjsx
edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Subscribers: mg

Maniphest Tasks: T1132

Differential Revision: https://review.inboxapp.com/D1492
2015-05-11 18:07:06 -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
Ben Gotow 753936b294 fix(*): Message list container styles, logout exceptions, composer logic cleanup
Summary:
This diff makes a couple changes:

- New drafts are no longer created in the composer component. Draft creation is back in the draft store where it belongs!
  - This means that the Draft List doesn't *always* contain two extra drafts, which are the unopened hot windows.
- Windows never show until they're loaded, which means windows open slowly vs. opening empty. I think the former is preferable but it's easy to change.
- Login window is now sized *before* it's shown instead of afterwards
- The mailto: behavior is now handled by the DraftStore, which gets rid of the whole draftInitialJSON thing that never made any sense.

fix(login) Make login window show at the correct size

logout from edgehill completely

Fix draft delete issue

Don't show windows, hot or cold, until they've loaded

Move logic for responding to mailto links into the draft store

Always fire `windowPropsChanged` after packages load or the window is shown

Show more error codes in red in activity bar

Make sure DraftStoreProxy doesn't interrupt the rendering of the composer with a new draft

Fix account-sidebar scroll issue, maybe?

Test Plan: Run tests!

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1479
2015-05-07 14:42:39 -07:00
Evan Morikawa 016ea60f3e feat(composer): instant composer
Summary: Fixes to make popout composers load instantly

Test Plan: edgheill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1460
2015-05-01 12:58:51 -04: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
Evan Morikawa e3dfbe59be refactor(react): convert to class-based React components
Summary: Fix react upgrade errors

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1456
2015-04-30 13:08:29 -07:00
Evan Morikawa 57cb02c76a feat(salesforce): associate threads with SF objects
Summary:
#### WIP! ####

This is making it all work with the association endpoint, putting
together the Salesforce Sidebar interfaces, and getting the nested
creators/updaters working.

I still need to do a bunch of UI work and actually debug the whole
workflow still

---

rename SalesforceContactStore to SalesforceSearchStore

rename SalesforceContact to SalesforceSearchResult

salesforce sidebar changes

salesforce association picker

object form store fixes

figuring out newFormItem instigators

Make SalesforceObjectFormStore declarative off SalesforceObjectStore

Make action basd handlers for SalesforceObjectStore

sidebar store create and associate

salesforce sidebar and picker fixes

association works and displays on sidebar

salesforce object form fixes

object form fixes

fix salesforce updating

Test Plan: TODO

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1440
2015-04-30 11:35:38 -07:00
Evan Morikawa 01938c1c78 fix(mailto): dead refernece to displayComposer
Summary: mailto from cold start waits for window to open

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1453
2015-04-29 17:38:16 -07:00
Ben Gotow 8a8cf4b06d fix(*) => bind store classes, consolidate packages, remove ComponentRegistry.Mixin, remove bad findDOMNode() reference 2015-04-28 15:32:15 -07:00
Ben Gotow 7f3816cb67 fix(*) Closes 517,603,608, moves search-playground to edgehill-plugins 2015-04-27 18:26:04 -07:00
Ben Gotow 68343ec472 feat(docs): New docs tasks and React 0.13.2
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
2015-04-24 11:33:10 -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 4d3e5c4938 fix(participants): Paste contacts with names, and lots of specs
Summary:
- You can now paste Ben Imposter (imposter@nilas.com).
- You can now paste an email and we look up a matching name in the Contact Store

Test Plan: Run glorious new specs

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1378
2015-03-31 15:54:16 -07:00
Evan Morikawa 0a7843c6e7 feat(toolbar): long urls make a longer toolbar
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1375
2015-03-30 16:41:01 -07:00
Evan Morikawa 9859e594f2 feat(composer): typing at the end of the composer tracks scrolling
Summary:
When you're typing at the end of the composer, then the composer should
look like it's scrolling along with you.

When you're typing in the middle of the composer, if the footer
inforamtion scrolls past the end of the page, then that's fine.

When the selection changes, the contenteditable component now caches
whether or not the selection is at the end of the content. It has to do it
at this point, otherwise the cloned, cached DOM nodes of the saved
selection are not the same nodes that will show up in the future.

Whether the cursor is at the end is queried by the composer on a body
change. If it is, then the composer expects a callback from its parent
(the message list), to call to update the scroll position.

The message list immediately updates the scroll position to move the
bottom of the composer to the bottom of the message-wrap window.

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1366
2015-03-27 19:35:27 -04:00
Evan Morikawa 59d378781b fix(composer): better html paste regex 2015-03-27 13:33:20 -04:00
Ben Gotow a0d2cc1785 feat(spellcheck): Turn on atom spellchecker, new contextual menu
Summary:
Pending issues:
- As you're typing, Atom Shell says the word you're currently typing is misspelled until you finish it. I will need to patch Atom Shell to fix this.

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://review.inboxapp.com/D1358
2015-03-27 10:12:56 -07:00
Evan Morikawa 1c56e5c15b fix(composer): get rid of extra blank lines on paste
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1357
2015-03-26 22:07:13 -04:00
Ben Gotow 7e6d5b64d8 fix(logs): Minor tweaks to prevent react logging 2015-03-26 18:25:21 -07: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 dd9309c626 feat(draft): escape deletes pristine drafts
Summary:
quoted text add and remove at filter level

fix double space quoted text issue when replying to message

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1341
2015-03-25 14:18:07 -04:00
Evan Morikawa 25792f0c90 fix(composer): don't show tooltip until double-click & drag is done
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1334
2015-03-24 10:40:48 -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
Kartik Talwar fe72c75dc5 Composer now focuses on cc and bbc field onclick
Summary: Refactored focus delays to focus function

Test Plan: none

Reviewers: bengotow, evan

Reviewed By: evan

Subscribers: evan

Differential Revision: https://review.inboxapp.com/D1329
2015-03-23 18:57:19 -04:00
Ben Gotow e1edb2a220 fix(speed): Remove explicit .cjsx extensions from requires 2015-03-20 17:53:11 -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
Evan Morikawa 1d99a18bf6 feat(composer): floating toolbar now fades in
Summary: tooltip fades in now

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1317
2015-03-19 17:16:38 -07:00
Evan Morikawa 891f86ebce feat(composer): subject label is a placeholder 2015-03-19 16:59:21 -07:00
Evan Morikawa 753a342dae fix(composer): fix backwards typing text 2015-03-18 20:00:37 -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 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
Evan Morikawa e5ec9c16af fix(participants): make remove menu option work 2015-03-16 15:55:31 -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
Evan Morikawa 02439f3a28 feat(composer): show quoted text when forwarding messages
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1291
2015-03-13 16:17:18 -04:00
Evan Morikawa 7c9797c706 feat(composer): don't prompt for attachment if in quoted text
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1290
2015-03-13 15:55:52 -04:00
Evan Morikawa 033008e036 feat(tooltip): add informational tooltip component
Summary: Add tooltip. To use just add a data-tooltip="plain string"

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1288
2015-03-12 18:09:10 -04: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 6a03c6a034 feat(composer): blocks multiple sending & lots of tests
Summary: fix in composer sending

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1286
2015-03-12 17:48:56 -04:00
Evan Morikawa bd2cdd876b feat(composer): focus on to field for forwarded message 2015-03-10 18:44:33 -07:00
Evan Morikawa 984b8fb303 feat(composer): shows subject if forwarded message 2015-03-10 18:27:10 -07:00
Evan Morikawa 0fb7e2c101 feat(composer): add popout icon and header styles 2015-03-10 18:14:53 -07:00
Evan Morikawa 961680ef34 feat(sending): close immediately and reopen if error
Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://review.inboxapp.com/D1276
2015-03-10 14:32:35 -07:00
Ben Gotow 6af864e3bd fix(*): remove unnecessary code from last commit 2015-03-10 12:11:55 -07:00
Ben Gotow 46a6e229eb fix(fields): paste multiple emails at a time, even with garbage 2015-03-10 12:06:52 -07:00
Ben Gotow c4c6f7c65a fix(dnd): You can now drag and drop attachments onto drafts 2015-03-10 11:23:31 -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