Commit graph

321 commits

Author SHA1 Message Date
Evan Morikawa 1d1c4a6e3a fix(db): fix database setup 2015-06-26 11:23:37 -07:00
Ben Gotow 00d6a11512 fix(assets): New toolbar icons, shadows to achieve less heavy edges on messages
Summary: Just visual changes

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1695
2015-06-26 10:38:07 -07:00
Evan Morikawa e8d24ea1b5 refactor(DB): promisify database
Summary:
WIP. The app launches and works for me. I still need to fix the tests
just the DB ones though :D

I changed the `DatabaseProxy` into a `DatabaseConnection` object. It will
request a fully instantiated databse from the backend Browser.

If we're already setup, it'll connect straight to the existing DB.

If we're not setup, then it'll create a new database and run the inital
schema migration on it. The `_createNewDatabase` promise won't resolve
until the migration has run.

Until we add in a more sophisticated migration system and get rid of the
stupid `modelClassMap` that's shoved in `Utils`, I'm passing in a series
of `_setupQueries()` to get everything started.

The `DatabaseConnection` is also the one responsible for queuing up
queries until the DB is fully populated and ready to go.

We actually get a lot of queries before we're setup because a lot of
Stores will make DB requests on `require` in their `constructor` or `init`
methods. (remember all the times we call `_populateStore` in `init`).

Now those queries are aggregated by the `DatabaseConnection` and then
executed sequentially.

Our methods like `persistModel` now resolve only after both the queries
have completed AND their corresponding `triggerLater` has completed as
well.

Test Plan: in progress

Reviewers: bengotow

Reviewed By: bengotow

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

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1877, T1905

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

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

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2085

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

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

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1683
2015-06-25 10:33:26 -07:00
Robert McQueen 6e94f38ada Adding ATag component which prevents <a> tags from taking over edgehill when clicked.
Summary: Applying the new ATag to the admin sidebar per the bug T2075

Test Plan: Tested locally. I'm unsure how to test how an ATag can open a browser window, so I forego'd a unit test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2075

Differential Revision: https://phab.nylas.com/D1686
2015-06-25 10:28:31 -07:00
Robert McQueen a81b794046 Include unnamed files as attachements and rename to 'Unnamed Attachement'
Summary: Fixes T2024 and renames unnamed files to Unnamed Attachment before appending the attachement component to message list

Test Plan: Added a test to ensure file without filename is renamed to Unnamed Attachment

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T2024

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

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

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1990

Differential Revision: https://phab.nylas.com/D1665
2015-06-23 15:21:25 -07:00
Evan Morikawa 6363bed89b fix(build): fix tello issue and less linter issue 2015-06-22 17:12:26 -07:00
Evan Morikawa 7739f08e84 feat(message): New Message List UI
Summary:
Initial message list collapsing

messages can be expanded explicitly

styling message items

composer UI and collapsing

expanding and collapsing headers

style new reply area

adding in message controls

Add message actions dropdown

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

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

fix developer bar colors

fix critical bug with files

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

Test Plan: No new tests

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1661
2015-06-19 11:31:27 -07:00
Ben Gotow 0e96dd3372 fix(mailto): Use paste logic to parse fields in mailto links, support poorly encoded URLs
Summary:
Fixes T1927

- Allow email addresses to contain `_`
- Centralize logic for parsing string into Contact objects into ContactStore
- Always decode and then encode mailto links to ensure spaces, special characters are properly encoded and that the URL is valid
- Add specs for mailto:// behavior

Test Plan: Run wonderful new tests covering mailto://

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1927

Differential Revision: https://phab.nylas.com/D1657
2015-06-18 11:58:07 -07:00
Evan Morikawa bf11cf31cd fix(search): remove red search x 2015-06-18 09:43:18 -07:00
Ben Gotow 4848d3c4d8 fix(thread-list-narrow): Missing flex caused items to not be full-width 2015-06-17 22:38:55 -07:00
Evan Morikawa 1fa8e2d5fa fix(lint): fix minor style errors 2015-06-17 20:43:14 -07:00
Evan Morikawa c78ff03e60 feat(salesforce): new UI for Salesforce
Summary:
style opportunity picker and placeholder on tokenizing text fields

UI for synced opportunities

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

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

fix minor bug in error-reporter

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

Developer bar ignores state changes unless it's open

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fix specs and add 6 more for new database store functionality

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

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1651
2015-06-17 20:12:48 -07:00
Ben Gotow fd9e8166ae fix(selection): Thread mulit-selection should appear with focused style in split mode
Fixes T1983

Summary: Give classes handler nomenclature

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

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

more styles for composer overflow

style composer toolbar

toolbar styling

Fixes to inline composer

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

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

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

login page fixes

add old fixes to container view

finish extracting pages

fix onboarding flow

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

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

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

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1642
2015-06-17 13:14:45 -07:00
Ben Gotow 672354260e fix(nylas-api): Globally handle 401s and notify user they need to sign in
Summary: Fixes T1843

Test Plan: No tests for this file yet

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1843

Differential Revision: https://phab.nylas.com/D1641
2015-06-17 12:29:49 -07:00
Ben Gotow e1af893510 fix(focus): Wait for cc/bcc to exist before trying to focus them
Summary:
It was hard to notice this regression because the `?` in `@refs[field]?.focus?()` meant `focus('textFieldCc')` failed silently.

Now we catch that the field we're asked to focus doesn't exist, and try again after the next render.

Fixes T1982

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1982

Differential Revision: https://phab.nylas.com/D1643
2015-06-17 12:29:32 -07:00
Ben Gotow fc796dc7aa fix(send-warnings): One character is valid body (T1929) and attachment is valid body (T1881)
Summary: This fixes T1881 and fixes T1929 and adds two additional test cases

Test Plan: Run 2 new tests

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1929, T1881

Differential Revision: https://phab.nylas.com/D1645
2015-06-17 12:29:21 -07:00
Evan Morikawa d5fc102f8a feat(attachment): improved downloading and draggable images
Summary:
Fixes T1975
Fixes T1900
Fixes T1899
Fixes T1979

Attachments downloading update progress

downloads will restart if the file on disk isn't complete

can drag images onto drive

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1900, T1899, T1975, T1979

Differential Revision: https://phab.nylas.com/D1638
2015-06-15 18:48:17 -07:00
Evan Morikawa 304c34f918 fix(specs): silence noisy specs and fix warnings
Summary:
Silence buffered process spec

Clean up error reporter and spec bootup

fix errors in draft store spec

package manager spec and theme spec fixes

Fix memory leak in draft store

Test Plan: mmmmmm tests. Run all those green passing tests :)

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1628
2015-06-15 18:29:59 -07:00
Ben Gotow f6b5b7ea30 fix(T1251) When a returnsModel request returns a 404, unpersist the object
Summary:
Give DatabaseStore trigger payload a 'type' so that you can handle the deletion of objects (clear focus if the object is focused, know to remove it from database view)

Fix specs and add one for new DatabaseView => unpersist handler

Test Plan: Run new test case

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1639
2015-06-15 18:23:58 -07:00
Ben Gotow e090dd428a feat(subject-search): Use basic LIKE query and date ordering to find likely emails
Summary: Begins to fix T1866, but for now only doing a LIKE instead of FTS4, because there are many, many other things to think about there.

Test Plan: No new tests. I still want to rewrite the whole search bar.

Reviewers: evan

Reviewed By: evan

Maniphest Tasks: T1866

Differential Revision: https://phab.nylas.com/D1634
2015-06-15 18:22:41 -07:00
Ben Gotow 6f16659a30 fix(T1758): Handle initial focus properly if draft is not yet ready 2015-06-15 14:48:54 -07:00
Ben Gotow 42819e4d71 upgrade(electron): 0.28.1. Improvements to webview, clipboard on linux 2015-06-15 11:22:42 -07:00
Evan Morikawa 7b9f89bc5d fix(keymap): add ctrl-enter to send email 2015-06-12 17:47:59 -07:00
Evan Morikawa 3e30e18236 fix(thread-list): narrow mode isn't hidden 2015-06-12 13:31:30 -07:00
Evan Morikawa fed1076d04 Fixes T1928: don't lose focus on cc and bcc fields
Summary: Fixes T1928

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1928

Differential Revision: https://phab.nylas.com/D1622
2015-06-11 18:48:55 -07:00
Ben Gotow f887e4e55a fix(style): Minor styling adjustments (floating toolbar, token carats) 2015-06-11 18:46:30 -07:00
Evan Morikawa 6f4f0c0ad0 Fixes T1868: tokenizing inputs resize properly
Summary:
Fixes T1868
The hidden sizing window was not getting whitespace properly and the width
was different because of different paddings

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Maniphest Tasks: T1868

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

Test Plan: Run tests

Reviewers: evan

Reviewed By: evan

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

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

Test Plan: Run new specs (WIP)

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1619
2015-06-11 18:00:40 -07:00
Evan Morikawa d7f12873b3 feat(update): autoupdater adds an updateLevel param
Summary:
There's now an `updateLevel` that can be set in the config file.

It has the valid values of "major", "minor", "patch", and "commit". By
default it upgrades on the "patch" level.

If you want to be on the bleeding edge, manually change the config file to
add `updateLevel: 'commit'`

Test Plan: A new `auto-update-manager-spec` :)

Reviewers: bengotow

Reviewed By: bengotow

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

More file uploading UI

fix race condition in draft saving

attachments and uploads interweaved

Test Plan: edgehill --test

Reviewers: bengotow

Reviewed By: bengotow

Differential Revision: https://phab.nylas.com/D1610
2015-06-11 12:04:52 -07:00
Ben Gotow 7a62f5ce7d fix(icon-type): Star / unread status should work even when we can't compute "forwarded / replied" icons 2015-06-09 10:35:21 -07:00
Ben Gotow 6221bf1311 fix(fakt): Rename fakt, never try to use the locally installed version (with potentially incorrect baseline) 2015-06-08 17:48:59 -07:00
Ben Gotow 336b9f2c76 fix(composer): Border appearing in inline composer 2015-06-08 17:27:09 -07:00
Ben Gotow 256813208f feat(starring): Star and unstar threads in the thread list
Summary:
When two or more buttons are grouped together, cut the padding off one interior edge so they're spaced more appropriately

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

Starred in the sidebar

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

Test Plan: No new tests yet

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1607
2015-06-08 17:02:50 -07:00
Ben Gotow 43924e2918 feat(paste): Add files by pasting them into the composer
Summary: You can now add file attachments by pasting them.

Test Plan: Run 3 new specs! We only had specs for sanitization so I added some for the paste event handler as well.

Reviewers: evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D1604
2015-06-08 12:41:31 -07:00
Ben Gotow 92e366653e punt(files): Temporarily disable the files package 2015-06-08 11:22:37 -07:00
Ben Gotow b6730864be fix(test): function execution order seems different on CI server? 2015-06-05 19:25:42 -07:00