Mailspring/internal_packages/inbox-light-ui/stylesheets/ui-variables.less

127 lines
3.4 KiB
Text
Raw Normal View History

fix(drafts): Various improvements and fixes to drafts, draft state management Summary: This diff contains a few major changes: 1. Scribe is no longer used for the text editor. It's just a plain contenteditable region. The toolbar items (bold, italic, underline) still work. Scribe was causing React inconcistency issues in the following scenario: - View thread with draft, edit draft - Move to another thread - Move back to thread with draft - Move to another thread. Notice that one or more messages from thread with draft are still there. There may be a way to fix this, but I tried for hours and there are Github Issues open on it's repository asking for React compatibility, so it may be fixed soon. For now contenteditable is working great. 2. Action.saveDraft() is no longer debounced in the DraftStore. Instead, firing that action causes the save to happen immediately, and the DraftStoreProxy has a new "DraftChangeSet" class which is responsbile for batching saves as the user interacts with the ComposerView. There are a couple big wins here: - In the future, we may want to be able to call Action.saveDraft() in other situations and it should behave like a normal action. We may also want to expose the DraftStoreProxy as an easy way of backing interactive draft UI. - Previously, when you added a contact to To/CC/BCC, this happened: <input> -> Action.saveDraft -> (delay!!) -> Database -> DraftStore -> DraftStoreProxy -> View Updates Increasing the delay to something reasonable like 200msec meant there was 200msec of lag before you saw the new view state. To fix this, I created a new class called DraftChangeSet which is responsible for accumulating changes as they're made and firing Action.saveDraft. "Adding" a change to the change set also causes the Draft provided by the DraftStoreProxy to change immediately (the changes are a temporary layer on top of the database object). This means no delay while changes are being applied. There's a better explanation in the source! This diff includes a few minor fixes as well: 1. Draft.state is gone—use Message.object = draft instead 2. String model attributes should never be null 3. Pre-send checks that can cancel draft send 4. Put the entire curl history and task queue into feedback reports 5. Cache localIds for extra speed 6. Move us up to latest React Test Plan: No new tests - once we lock down this new design I'll write tests for the DraftChangeSet Reviewers: evan Reviewed By: evan Differential Revision: https://review.inboxapp.com/D1125
2015-02-04 08:24:31 +08:00
// Private
//
// Do not use these colors outside of this file.
// You should choose variables based on the role of your
// interface elements. In other themes, @light-blue may
// not be light or blue.
@PANTONE-340-UP: #00ac6f;
@PANTONE-7704-UP: #009ec4;
@PANTONE-7547-UP: #3c505f;
@PANTONE-296-UP: #003c56;
@PANTONE-421-UP: #b4babd;
@PANTONE-Red-032-UP: #f15f4b;
@PANTONE-326-UP: #3bbeb4;
@PANTONE-Process-Black-UP: #231f20;
@PANTONE-Cool-Gray-1-UP: #e1e0dc;
@green: @PANTONE-340-UP;
@light-blue: @PANTONE-7704-UP;
@blue-gray: @PANTONE-7547-UP;
@dark-blue: @PANTONE-296-UP;
@light-gray: @PANTONE-421-UP;
@red: @PANTONE-Red-032-UP;
@teal: @PANTONE-326-UP;
@black: @PANTONE-Process-Black-UP;
@cool-gray: @PANTONE-Cool-Gray-1-UP;
@white: #f1f1f1;
@blue-grey: @blue-gray;
@light-grey: @light-gray;
// Public
//
// Use these variables in your packages. Choose the variable
// that best matches the role of the element you are styling.
// TEXT
@unread-color: @light-blue;
@action-color: @green;
@text-color: @black;
@text-color-highlight: @black;
@text-color-selected: @white;
@text-color-inverse: @white;
@text-color-subtle: fadeout(@text-color, 50%);
@text-color-inverse-subtle: fadeout(@text-color-inverse, 50%);
@text-color-info: @light-blue;
@text-color-link: @light-blue;
@text-color-success: @green;
@text-color-warning: #ff982d;
@text-color-error: @red;
@text-color-destructive: @red;
@progress-bar-fill: @light-blue;
@progress-bar-background: @light-gray;
@background-color: #fff;
@background-color-highlight: darken(@background-color, 2.5%);
@background-color-selected: @light-blue;
@background-color-secondary: darken(@background-color, 5%);
@background-color-accent: @blue-gray;
@background-color-info: @light-blue;
@background-color-success: @green;
@background-color-warning: #ff4800;
@background-color-error: @red;
@base-border-color: darken(@background-color, 15%);
fix(drafts): Various improvements and fixes to drafts, draft state management Summary: This diff contains a few major changes: 1. Scribe is no longer used for the text editor. It's just a plain contenteditable region. The toolbar items (bold, italic, underline) still work. Scribe was causing React inconcistency issues in the following scenario: - View thread with draft, edit draft - Move to another thread - Move back to thread with draft - Move to another thread. Notice that one or more messages from thread with draft are still there. There may be a way to fix this, but I tried for hours and there are Github Issues open on it's repository asking for React compatibility, so it may be fixed soon. For now contenteditable is working great. 2. Action.saveDraft() is no longer debounced in the DraftStore. Instead, firing that action causes the save to happen immediately, and the DraftStoreProxy has a new "DraftChangeSet" class which is responsbile for batching saves as the user interacts with the ComposerView. There are a couple big wins here: - In the future, we may want to be able to call Action.saveDraft() in other situations and it should behave like a normal action. We may also want to expose the DraftStoreProxy as an easy way of backing interactive draft UI. - Previously, when you added a contact to To/CC/BCC, this happened: <input> -> Action.saveDraft -> (delay!!) -> Database -> DraftStore -> DraftStoreProxy -> View Updates Increasing the delay to something reasonable like 200msec meant there was 200msec of lag before you saw the new view state. To fix this, I created a new class called DraftChangeSet which is responsible for accumulating changes as they're made and firing Action.saveDraft. "Adding" a change to the change set also causes the Draft provided by the DraftStoreProxy to change immediately (the changes are a temporary layer on top of the database object). This means no delay while changes are being applied. There's a better explanation in the source! This diff includes a few minor fixes as well: 1. Draft.state is gone—use Message.object = draft instead 2. String model attributes should never be null 3. Pre-send checks that can cancel draft send 4. Put the entire curl history and task queue into feedback reports 5. Cache localIds for extra speed 6. Move us up to latest React Test Plan: No new tests - once we lock down this new design I'll write tests for the DraftChangeSet Reviewers: evan Reviewed By: evan Differential Revision: https://review.inboxapp.com/D1125
2015-02-04 08:24:31 +08:00
@border-color: darken(@background-color, 15%);
@border-color-subtle: darken(@background-color, 8%);
@border-color-divider: darken(@background-color, 12%);
// Inputs
@input-background-color: white;
@input-border-color: fadeout(@border-color, 10%);
@input-border-color-blurred: desaturate(@input-border-color, 100%);
@input-tint-color: fade(@background-color-selected, 10%);
@input-tint-color-hover: fade(@input-tint-color, 30%);
@input-tint-color-blurred: desaturate(@input-tint-color, 100%);
fix(drafts): Various improvements and fixes to drafts, draft state management Summary: This diff contains a few major changes: 1. Scribe is no longer used for the text editor. It's just a plain contenteditable region. The toolbar items (bold, italic, underline) still work. Scribe was causing React inconcistency issues in the following scenario: - View thread with draft, edit draft - Move to another thread - Move back to thread with draft - Move to another thread. Notice that one or more messages from thread with draft are still there. There may be a way to fix this, but I tried for hours and there are Github Issues open on it's repository asking for React compatibility, so it may be fixed soon. For now contenteditable is working great. 2. Action.saveDraft() is no longer debounced in the DraftStore. Instead, firing that action causes the save to happen immediately, and the DraftStoreProxy has a new "DraftChangeSet" class which is responsbile for batching saves as the user interacts with the ComposerView. There are a couple big wins here: - In the future, we may want to be able to call Action.saveDraft() in other situations and it should behave like a normal action. We may also want to expose the DraftStoreProxy as an easy way of backing interactive draft UI. - Previously, when you added a contact to To/CC/BCC, this happened: <input> -> Action.saveDraft -> (delay!!) -> Database -> DraftStore -> DraftStoreProxy -> View Updates Increasing the delay to something reasonable like 200msec meant there was 200msec of lag before you saw the new view state. To fix this, I created a new class called DraftChangeSet which is responsible for accumulating changes as they're made and firing Action.saveDraft. "Adding" a change to the change set also causes the Draft provided by the DraftStoreProxy to change immediately (the changes are a temporary layer on top of the database object). This means no delay while changes are being applied. There's a better explanation in the source! This diff includes a few minor fixes as well: 1. Draft.state is gone—use Message.object = draft instead 2. String model attributes should never be null 3. Pre-send checks that can cancel draft send 4. Put the entire curl history and task queue into feedback reports 5. Cache localIds for extra speed 6. Move us up to latest React Test Plan: No new tests - once we lock down this new design I'll write tests for the DraftChangeSet Reviewers: evan Reviewed By: evan Differential Revision: https://review.inboxapp.com/D1125
2015-02-04 08:24:31 +08:00
@input-accessory-color-hover: @light-blue;
@input-accessory-color: @cool-gray;
// Buttons
@button-background-color: @white;
@button-background-color-hover: white;
@button-background-color-selected: white;
@button-border-color: @border-color;
// Menus
@menu-color: white;
@menu-divider-color: @light-gray;
@menu-item-color-hover: fade(@background-color-selected, 10%);
@menu-item-color-selected: @background-color-selected;
@menu-text-color-selected: @text-color-inverse;
// Sizes
@font-size: 15px;
@minor-font-size: 13px;
@major-font-size: 17px;
@input-font-size: 14px;
@disclosure-arrow-size: 12px;
@component-padding: 10px;
@component-icon-padding: 5px;
@component-icon-size: 16px;
@component-line-height: 25px;
@component-border-radius: 2px;
// Other
@font-family: "Proxima Nova Regular", "Helvetica", 'Lucida Grande', 'Segoe UI', sans-serif;
@font-family-smallcap: "Proxima Nova Regular Small Cap", "sans-serif";
@standard-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.22);
@standard-shadow-up: 0 -1px 2px 0 rgba(0, 0, 0, 0.22);