Electron 0.35.1 includes the tray fixes we contributed last week but also includes API restructuring and improvements. Most importantly, modules from electron are now imported via `require('electron')`
Summary: Simplify the default window size, restore window size when the main window is loaded, fix serialization of packages in beforeunload.
Test Plan: Run tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2061
Summary:
Move sync workers and Edgehill token checks to work window
Move the task queue and database setup to the work window
Move ContactStore background refresh to work window
Store the task queue in the database
WIP
The TaskQueue now puts tasks in the database instead of in a file, which also means it can be observed
Move all delta sync and initial sync to a package, make NylasSyncStore which exposes read-only sync state
DraftStore no longer reads task status. Once you set the "sending" bit on a draft, it never gets unset. But that's fine actually.
If your package lists windowTypes, you *only* get loaded in those windowTypes. If you specify no windowTypes, you get loaded in the root window.
This means that onboarding, worker-ui, worker-sync, etc. no longer get loaded into the main window
ActivitySidebar has a special little store that observes the task queue since it's no longer in the window
Move "toggle component regions" / "toggle react remote" to the Developer menu
Move sync worker specs, update draft store specs to not rely on TaskQueue at all
Test Plan: Run existing tests, all pass
Reviewers: dillon, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1936
Summary:
fix misc spec failure by making event store fetch immediately on setup
add specs for displayExtension, displayName
Test Plan: Run new tests
Reviewers: evan
Maniphest Tasks: T2387
Differential Revision: https://phab.nylas.com/D1821
Summary:
- You cannot drag an attachmentComponent unless it represents a fully downloaded file on disk.
- You cannot drag and drop an item from a composer onto the same composer.
- Attachments on expanded messages start downloading as soon as it's viewed (necessary for drag and dropping attachments, also probably best. Previously was just images.)
- You can now cancel an attachment download. Was really broken.
Test Plan: Run many new specs!
Reviewers: evan
Reviewed By: evan
Maniphest Tasks: T1196
Differential Revision: https://phab.nylas.com/D1764
React-dnd is a nice library but it assumes it's going to be the only thing managing your drag and drop in the entire app. It also hides the underlying dataTransfer object so it's difficult to implement native drag and drop behaviors other than for Files and Urls, which they special-case.
Implementing it manually really isn't hard, and we can do things like attach a text/plain version of contact data to the contact drag.
Fixes T2054
Summary:
consolidate all the "untitled" stuff into a convenience method on the File itself. Previously it'd show "Unnamed Attachment", download as "Untitled" and open as "<file.id>". Now it's consistent everywhere and chooses names based on the contenttype (Event.ics).
Rewrite CSS rules for uploads and attachments to be simpler
- remove container divs and classnames from things that have no CSS
- switch to using Flexbox so it's not necesary to have so many containers
- remove zIndex hacks, apply overflow rules to name div only, so long filenames don't make action button unclickable
- consolidate CSS classnames for uploads/attachments
-
Other style fixes
- cursor "default" instead of text insertion on image attachments
- cursor "default" on action buttons
- image uplaods / attachments with long filenames truncate with ellpsis
- attachments are not indented by an extra 15px in message bodies
Prevent progress bar overflow (was ending above 100%, 100.12315%...)
Update FileDownloadStore so it never creates Download objects when file is downloaded already
- Previously, the download itself decided if it would be a no-op, but this meant the download was around for a split second and you'd see progress indicators flash for a moment when opening/saving an attachment.
Upgrade FileDownloadStore use of promises
Restore Image attachment drag and drop - was broken because the name gradient thing was covering the entire drag region.
Allow file attachments to be drag and dropped to the finder and other applications 😍😍😍
Test Plan: Tests still pass
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1745
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
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
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
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
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:
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
Summary:
There were several issues causing uploading to not work:
# The file upload response came back as a string instead of an Object. Needed to detect and `JSON.parse`
# The `MessageAttachment` component was not available as a package on the popout composer (since it used to be inside of `MessageList`)
# The `message.draft` bit was not set properly causing the DB changes to be ignored
# The actions notifying of `uploadStateChanged` were only being broadcasted in the main window (where the `TaskStore` is) and never making it to the popout composer.
Also keybindings for close window and up & down arrows were fixed.
Test Plan: edgehill --test
Reviewers: bengotow
Reviewed By: bengotow
Differential Revision: https://review.inboxapp.com/D1157