Commit graph

15 commits

Author SHA1 Message Date
Ben Gotow 452cbf1fa7 fix(ui-dark): Small color adjustments, resolves #299, #148 2015-11-09 18:52:24 -08:00
Evan Morikawa b76fd0e578 feat(windows): improve UI for Windows
Remove rounded corners and gradients
2015-10-21 20:32:33 -07:00
Evan Morikawa 2c638afd30 fix(attachments): set attachment min-width
Fixes T3459
2015-08-31 15:03:17 -07:00
Ben Gotow 371a2a4b08 fix(uploads): Animate upload bars, throttle FileUploadStore updates triggered by progress changes 2015-07-17 18:28:18 -07:00
Ben Gotow 4fe54c3d1e feat(attachments): Tons of tiny fixes to attachments, drag-and-drop attachments to other apps
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
2015-07-15 13:15:05 -07:00
Ben Gotow 7ff724493c fix(attachment-css): Tiny style tweaks 2015-06-29 17:25:00 -07:00
Evan Morikawa cd9ccd85e2 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
Ben Gotow 90c6f12b65 fix(attachments): Wrong padding on image attachments 2015-06-19 19:29:59 -07:00
Ben Gotow c404b19b33 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
Evan Morikawa e2fa53f45d 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 a48fc2dd34 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 48f1cc80d6 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 449e11cdda 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
Evan Morikawa b63aad83f1 more UI variable improvements 2015-03-03 12:24:48 -08:00
Evan Morikawa a31c2808a9 fix(composer): make uploading attachments work
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
2015-02-06 17:41:59 -05:00