Mailspring/internal_packages/ui-darkside
Juan Tejada b8ed562d19 🎨(attachments): DRY and cleanup attachment components code
Summary:
The attachment components were the only React Components which used
inheritance between components, which is an anti-pattern in react. I
deleted these components in favor of new purely functional/dumb
components exposed via the component-kit: Attachment Item and
ImageAttachmentItem. These are defined in the same file to reuse some
smaller components between them, like the progress-bar, etc.

The attachments pacakage still remains, and only registers a single component to
a new are called MessageAttachments. This InjectedComponent role is
shared by the Composer and MessageItem, and is the only reason this
exists as an injected component in a separate package.
MessageAttachments renders all image and non image attachments for a
message or draft, and binds the appropriate actions for removal, downloading, etc.

The composer still used FileUpload and ImageUpload components for rendering
uploads in the Composer (i.e. when you add an attachment (these are
different from files because they aren't saved until the draft is
sent)). These 2 components were pretty much copied and pasted from the
ones in the attachments package, with subtle differences-- I got rid of
these as well in favor of the new AttachmentItem and ImageAttachmentItem

Also convert more coffee to ES6!

Test Plan: Unit tests

Reviewers: bengotow, evan

Reviewed By: evan

Differential Revision: https://phab.nylas.com/D3381
2016-10-31 17:26:20 -07:00
..
styles 🎨(attachments): DRY and cleanup attachment components code 2016-10-31 17:26:20 -07:00
index.less design tweaks, breaking css up into files, update readme (#2858) 2016-09-20 10:20:15 -07:00
LICENSE
package.json design tweaks, breaking css up into files, update readme (#2858) 2016-09-20 10:20:15 -07:00
README.md design tweaks, breaking css up into files, update readme (#2858) 2016-09-20 10:20:15 -07:00

Darkside

An dark sidebar theme for Nylas N1. Created by Jamie Wilson

Activation

Darkside comes pre-installed with N1. To change themes, go to Nylas N1 > Change Theme… in the menu bar, then select Darkside. Learn more at support.nylas.com.

Customization

In order to customize Darkside, you'll need to manually install it.

1. Download the ui-darkside folder.

Download Option 1:
Download just the 'ui-darkside' folder thanks to the service gitzip by @kinolien.

Download Option 2:
Download the entire N1 repo or git clone https://github.com/nylas/N1.git. Then grab the folder from N1/internal_packages/ui-darkside.

2. Manual Install

To manually install a theme, go to Nylas N1 > Install Theme… in the menu bar. Select the ui-darkside folder you just downloaded. This will copy the folder into your N1 packages directory so you can delete the orginal download if you want to.

3. Customize

Open the theme directory
If you're on a Mac, you can find the theme files at ~/.nylas/packages. To get there quickly, use the key command Cmd + Shift + G and enter ~/.nylas/packages.

Change package.json
In order to avoid conflicts between your custom theme and the pre-installed version, change name and displayName in package.json to:

"name": "ui-darkside-custom",
"displayName": "Darkside Custom",

Edit LESS files
Open the darkside-variables.less file. To change colors, just comment out the default @sidebar and @accent variables and uncomment another theme or simply replace with your own colors.

// Default
@sidebar: #313042;
@accent: #F18260;

// Luna
// @sidebar: #202C46;
// @accent: #39DFF8;

// Zond
// @sidebar: #333333;
// @accent: #F6D49C;

// Gemini
// @sidebar: #00203C;
// @accent: #F6B312;

// Mercury
// @sidebar: #555;
// @accent: #999;

// Apollo
// @sidebar: #3A1E15;
// @accent: #F6AA1C;

Feedback

If you have questions or suggestions, please submit an issue. If you need to, you can email me at [jamie@jamiewilson.io](mailto:jamie@jamiewilson?subject=Re: Darkside).