2015-11-12 02:25:11 +08:00
|
|
|
// The ui-variables file is provided by base themes provided by N1.
|
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
|
|
|
@import "ui-variables";
|
|
|
|
@import "ui-mixins";
|
|
|
|
@import "buttons";
|
|
|
|
|
2015-03-06 05:31:11 +08:00
|
|
|
@compose-width: 800px;
|
2015-03-19 09:21:04 +08:00
|
|
|
@compose-min-height: 150px;
|
2015-03-06 05:31:11 +08:00
|
|
|
|
2015-10-22 11:32:33 +08:00
|
|
|
body.platform-win32 {
|
|
|
|
.composer-inner-wrap {
|
|
|
|
.composer-action-bar-wrap {
|
|
|
|
.btn {
|
|
|
|
height: 30px;
|
|
|
|
padding-top: 1px;
|
|
|
|
}
|
|
|
|
}
|
2015-10-24 06:04:15 +08:00
|
|
|
.composer-drop-cover {
|
|
|
|
border-radius: 0;
|
|
|
|
}
|
|
|
|
input, input:focus {
|
|
|
|
border: 0;
|
|
|
|
}
|
|
|
|
}
|
2015-10-22 11:32:33 +08:00
|
|
|
}
|
|
|
|
|
2015-03-06 05:31:11 +08:00
|
|
|
.composer-inner-wrap {
|
|
|
|
position: relative;
|
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
|
|
|
height: 100%;
|
2015-03-07 08:08:34 +08:00
|
|
|
display: flex;
|
|
|
|
flex-direction: column;
|
2015-03-05 07:52:40 +08:00
|
|
|
|
2015-07-16 11:06:11 +08:00
|
|
|
.composer-drop-cover {
|
|
|
|
position: absolute;
|
|
|
|
top: 0; right: 0; bottom: 0; left: 0;
|
|
|
|
z-index: 1000;
|
|
|
|
background: rgba(255,255,255,0.7);
|
|
|
|
border-radius: @border-radius-base;
|
|
|
|
border: 4px dashed lighten(@gray, 30%);
|
|
|
|
text-align: center;
|
|
|
|
line-height:2.3em;
|
|
|
|
|
|
|
|
.centered {
|
|
|
|
position: absolute;
|
|
|
|
left: 50%;
|
|
|
|
top: 50%;
|
|
|
|
transform: translate(-50%, -50%);
|
|
|
|
color: lighten(@gray, 20%);
|
|
|
|
font-weight: 500;
|
|
|
|
font-size:1.1em;
|
|
|
|
img { margin: auto; display:block; margin-bottom:20px; background-color: lighten(@gray, 20%); }
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-06 05:31:11 +08:00
|
|
|
.composer-action-bar-wrap {
|
2015-03-13 05:48:56 +08:00
|
|
|
position: relative;
|
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
|
|
|
width: 100%;
|
2015-03-06 05:31:11 +08:00
|
|
|
background: transparent;
|
|
|
|
border-bottom: 0;
|
2015-03-03 07:33:58 +08:00
|
|
|
|
2015-07-31 05:51:36 +08:00
|
|
|
.btn {
|
|
|
|
// Yes, 4px taller than in the rest of the app: https://phab.nylas.com/T2418
|
|
|
|
height:28px;
|
|
|
|
}
|
2015-03-06 05:31:11 +08:00
|
|
|
.composer-action-bar-content {
|
2015-04-22 09:16:08 +08:00
|
|
|
display:flex;
|
2015-06-06 02:02:44 +08:00
|
|
|
margin: 0 auto;
|
2015-04-22 09:16:08 +08:00
|
|
|
flex-direction:row;
|
2015-06-06 02:02:44 +08:00
|
|
|
max-width: @compose-width;
|
2015-06-18 07:03:50 +08:00
|
|
|
padding: @spacing-standard;
|
2015-03-04 10:09:57 +08:00
|
|
|
|
2015-04-22 09:16:08 +08:00
|
|
|
> * {
|
|
|
|
margin-left: @spacing-standard / 2;
|
|
|
|
margin-right: @spacing-standard / 2;
|
|
|
|
}
|
|
|
|
}
|
2015-03-03 07:33:58 +08:00
|
|
|
}
|
|
|
|
|
2015-03-06 05:31:11 +08:00
|
|
|
.composer-content-wrap {
|
2015-06-18 07:03:50 +08:00
|
|
|
padding: 0;
|
2015-03-07 08:08:34 +08:00
|
|
|
flex: 1;
|
2015-03-06 05:31:11 +08:00
|
|
|
display: flex;
|
2015-06-24 06:21:25 +08:00
|
|
|
position: relative;
|
2015-03-06 05:31:11 +08:00
|
|
|
flex-flow: column;
|
2015-03-03 07:33:58 +08:00
|
|
|
}
|
|
|
|
|
2015-06-24 06:21:25 +08:00
|
|
|
.composer-centered {
|
|
|
|
display:flex;
|
|
|
|
position: relative;
|
|
|
|
flex-direction: column;
|
|
|
|
flex: 1;
|
|
|
|
width: 100%;
|
|
|
|
max-width: @compose-width;
|
|
|
|
margin: 0 auto;
|
2015-09-14 22:37:00 +08:00
|
|
|
padding-top:@spacing-standard;
|
2015-06-24 06:21:25 +08:00
|
|
|
}
|
2015-03-06 05:31:11 +08:00
|
|
|
.text-actions {
|
|
|
|
text-align: right;
|
|
|
|
line-height: 1.4;
|
2015-03-05 07:52:40 +08:00
|
|
|
position: relative;
|
2015-03-06 05:31:11 +08:00
|
|
|
top: -3px;
|
2015-03-05 10:47:48 +08:00
|
|
|
}
|
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
|
|
|
|
2015-03-05 10:47:48 +08:00
|
|
|
.header-action {
|
|
|
|
color: @text-color-very-subtle;
|
2015-06-06 02:40:44 +08:00
|
|
|
img.content-mask { background-color: @text-color-very-subtle; }
|
2015-03-05 10:47:48 +08:00
|
|
|
font-size: @font-size-small;
|
2015-03-06 05:31:11 +08:00
|
|
|
padding-left: 1em;
|
|
|
|
&:hover {
|
|
|
|
color: @text-color-link;
|
2015-08-11 05:47:47 +08:00
|
|
|
img.content-mask { background-color: @text-color-link; }
|
|
|
|
cursor: default;
|
2015-03-06 05:31:11 +08:00
|
|
|
}
|
2015-03-05 10:47:48 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.composer-participant-actions {
|
2015-08-11 05:47:47 +08:00
|
|
|
position: relative;
|
|
|
|
float: right;
|
|
|
|
z-index: 2;
|
|
|
|
cursor: default;
|
|
|
|
padding-right: @spacing-standard + @spacing-half;
|
|
|
|
padding-left: @spacing-standard;
|
|
|
|
padding-top: 12px;
|
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
|
|
|
}
|
|
|
|
|
2015-12-08 07:34:03 +08:00
|
|
|
input, textarea {
|
2015-06-06 02:40:44 +08:00
|
|
|
color: @text-color;
|
2015-03-03 07:33:58 +08:00
|
|
|
position: relative;
|
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
|
|
|
display: block;
|
|
|
|
background: inherit;
|
|
|
|
width: 100%;
|
|
|
|
resize: none;
|
|
|
|
border: none;
|
|
|
|
}
|
|
|
|
|
feat(accounts): Kill namespaces, long live accounts
Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.
This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.
When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.
Search bar doesn't need to do full refresh on clear if it never committed
Allow drafts to be switched to a different account when not in reply to an existing thread
Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal
Show many dots for many accounts in long polling status bar
add/remove accounts from prefs
Spec fixes!
Test Plan: Run tests, none broken!
Reviewers: evan, dillon
Reviewed By: evan, dillon
Differential Revision: https://phab.nylas.com/D1928
2015-08-22 06:29:58 +08:00
|
|
|
.composer-field-label {
|
|
|
|
color: @text-color-very-subtle;
|
|
|
|
float: left;
|
|
|
|
padding-top: 6px;
|
|
|
|
display: block;
|
|
|
|
}
|
|
|
|
|
2015-09-14 22:37:00 +08:00
|
|
|
.collapsed-composer-participants {
|
|
|
|
position: relative;
|
|
|
|
margin: 0 23px;
|
|
|
|
border-bottom: 1px solid @border-color-divider;
|
|
|
|
flex-shrink:0;
|
|
|
|
color: @text-color-very-subtle;
|
|
|
|
padding: 16px 0 10px 0;
|
|
|
|
|
|
|
|
.collapsed-contact {
|
|
|
|
padding-right: 0.25em;
|
2015-10-01 05:36:00 +08:00
|
|
|
color: @text-color;
|
2015-09-14 22:37:00 +08:00
|
|
|
&:after {
|
|
|
|
content: ","
|
|
|
|
}
|
|
|
|
&:last-child:after {
|
|
|
|
content: ""
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
.num-remaining.token {
|
|
|
|
color: @text-color;
|
|
|
|
padding-right: 12px;
|
|
|
|
margin-left: 0;
|
|
|
|
padding-top: 6px;
|
|
|
|
padding-bottom: 6px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.num-remaining-wrap {
|
|
|
|
position: absolute;
|
|
|
|
right: 0;
|
|
|
|
z-index: 2;
|
|
|
|
top: 9px;
|
|
|
|
.show-more-fade {
|
|
|
|
position: absolute;
|
|
|
|
width: 220px;
|
|
|
|
height: 37px;
|
|
|
|
right: 0;
|
|
|
|
top: 0;
|
|
|
|
background: linear-gradient(to right, fade(@background-primary, 0%) 0%, fade(@background-primary, 100%) 40%);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-06 05:31:11 +08:00
|
|
|
.compose-subject-wrap {
|
2015-03-05 06:26:53 +08:00
|
|
|
position: relative;
|
2015-06-18 07:03:50 +08:00
|
|
|
margin: 0 23px;
|
2015-03-05 07:52:40 +08:00
|
|
|
border-bottom: 1px solid @border-color-divider;
|
feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows
Summary:
Features:
- ThreadListParticipants ignores drafts when computing participants, renders "Draft" label, pending design
- Put the WorkspaceStore in every window—means they all get toolbars and custom gumdrop icons on Mac OS X
Bug Fixes:
- Never display notifications for email the user just sent
- Fix obscure issue with DatabaseView trying to update metadata on items it froze. This resolves issue with names remaining bold after marking as read, drafts not appearing in message list immediately.
- When you pop out a draft, save it first and *wait* for the commit() promise to succeed.
- If you scroll very fast, you node.contentWindow can be null in eventedIframe
Other:
Make it OK to re-register the same component
Make it possible to unregister a hot window
Break the Sheet Toolbar out into it's own file to make things manageable
Replace `package.windowPropsReceived` with a store-style model where anyone can listen for changes to `windowProps`
When I put the WorkspaceStore in every window, I ran into a problem because the package was no longer rendering an instance of the Composer, it was declaring a root sheet with a composer in it. This meant that it was actually a React component that needed to listen to window props, not the package itself.
`atom` is already an event emitter, so I added a `onWindowPropsReceived` hook so that components can listen to window props as if they were listening to a store. I think this might be more flexible than only broadcasting the props change event to packages.
Test Plan: Run tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1592
2015-06-04 07:02:19 +08:00
|
|
|
flex-shrink:0;
|
2015-06-06 02:02:44 +08:00
|
|
|
|
2015-08-04 08:05:31 +08:00
|
|
|
input {
|
2015-03-05 07:52:40 +08:00
|
|
|
display: inline-block;
|
2015-08-04 08:05:31 +08:00
|
|
|
padding: 13px 0 9px 0;
|
2015-03-05 07:52:40 +08:00
|
|
|
min-width: 5em;
|
|
|
|
background-color: transparent;
|
|
|
|
border: none;
|
2015-12-24 14:04:24 +08:00
|
|
|
margin: 0;
|
2015-03-20 07:57:41 +08:00
|
|
|
&::-webkit-input-placeholder {
|
|
|
|
color: @text-color-very-subtle;
|
|
|
|
}
|
2015-12-24 14:04:24 +08:00
|
|
|
&:focus {
|
|
|
|
box-shadow: none;
|
|
|
|
}
|
2015-03-20 07:57:41 +08:00
|
|
|
}
|
2015-03-05 07:52:40 +08:00
|
|
|
}
|
|
|
|
|
2015-06-24 06:21:25 +08:00
|
|
|
.compose-body-scroll {
|
|
|
|
position:initial;
|
2015-09-14 22:37:00 +08:00
|
|
|
.scroll-region-content .scroll-region-content-inner {
|
|
|
|
min-height: 100%;
|
|
|
|
display: flex;
|
|
|
|
}
|
2015-06-24 06:21:25 +08:00
|
|
|
}
|
|
|
|
|
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
|
|
|
.compose-body {
|
|
|
|
flex: 1;
|
|
|
|
cursor: text;
|
|
|
|
overflow: auto;
|
2015-02-19 06:24:16 +08:00
|
|
|
position: relative;
|
feat(offline-mode, undo-redo): Tasks handle network errors better and retry, undo/redo based on tasks
Summary:
This diff does a couple things:
- Undo redo with a new undo/redo store that maintains it's own queue of undo/redo tasks. This queue is separate from the TaskQueue because not all tasks should be considered for undo history! Right now just the AddRemoveTagsTask is undoable.
- NylasAPI.makeRequest now returns a promise which resolves with the result or rejects with an error. For things that still need them, there's still `success` and `error` callbacks. I also added `started:(req) ->` which allows you to get the underlying request.
- Aborting a NylasAPI request now makes it call it's error callback / promise reject.
- You can now run code after perform local has completed using this syntax:
```
task = new AddRemoveTagsTask(focused, ['archive'], ['inbox'])
task.waitForPerformLocal().then ->
Actions.setFocus(collection: 'thread', item: nextFocus)
Actions.setCursorPosition(collection: 'thread', item: nextKeyboard)
Actions.queueTask(task)
```
- In specs, you can now use `advanceClock` to get through a Promise.then/catch/finally. Turns out it was using something low level and not using setTimeout(0).
- The TaskQueue uses promises better and defers a lot of the complexity around queueState for performLocal/performRemote to a task subclass called APITask. APITask implements "perform" and breaks it into "performLocal" and "performRemote".
- All tasks either resolve or reject. They're always removed from the queue, unless they resolve with Task.Status.Retry, which means they internally did a .catch (err) => Promise.resolve(Task.Status.Retry) and they want to be run again later.
- API tasks retry until they succeed or receive a NylasAPI.PermanentErrorCode (400,404,500), in which case they revert and finish.
- The AddRemoveTags Task can now take more than one thread! This is super cool because you can undo/redo a bulk action and also because we'll probably have a bulk tag modification API endpoint soon.
Getting undo / redo working revealed that the thread versioning system we built isn't working because the server was incrementing things by more than 1 at a time. Now we count the number of unresolved "optimistic" changes we've made to a given model, and only accept the server's version of it once the number of optimistic changes is back at zero.
Known Issues:
- AddRemoveTagsTasks aren't dependent on each other, so if you (undo/redo x lots) and then come back online, all the tasks try to add / remove all the tags at the same time. To fix this we can either allow the tasks to be merged together into a minimal set or make them block on each other.
- When Offline, you still get errors in the console for GET requests. Need to catch these and display an offline status bar.
- The metadata tasks haven't been updated yet to the new API. Wanted to get it reviewed first!
Test Plan: All the tests still pass!
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1694
2015-07-08 01:38:53 +08:00
|
|
|
margin: 0 8px;
|
2015-02-19 06:24:16 +08:00
|
|
|
|
2015-03-03 07:33:58 +08:00
|
|
|
.quoted-text-control {
|
2015-07-16 04:15:55 +08:00
|
|
|
margin: @spacing-standard;
|
|
|
|
margin-top:0;
|
2015-02-19 06:24:16 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
div[contenteditable] {
|
2015-03-14 07:32:09 +08:00
|
|
|
min-height: @compose-min-height;
|
2015-06-12 02:52:49 +08:00
|
|
|
margin-bottom: 30px;
|
2015-12-01 03:48:24 +08:00
|
|
|
padding: 20px @spacing-standard 0 @spacing-standard;
|
2015-09-03 04:20:01 +08:00
|
|
|
}
|
2015-06-12 02:52:49 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.composer-footer-region {
|
|
|
|
cursor: default;
|
|
|
|
&:hover {
|
|
|
|
cursor: default;
|
2015-02-19 06:24:16 +08:00
|
|
|
}
|
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
|
|
|
}
|
|
|
|
|
|
|
|
// TODO FIXME DRY From stylesheets/message-list.less
|
|
|
|
.attachments-area {
|
2015-06-18 07:03:50 +08:00
|
|
|
padding: 0;
|
2015-07-16 04:15:05 +08:00
|
|
|
margin: 0;
|
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
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-03-06 05:31:11 +08:00
|
|
|
// Overrides for the full-window popout composer
|
|
|
|
.composer-full-window {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
|
|
|
|
.composer-outer-wrap {
|
|
|
|
width: 100%;
|
|
|
|
height: 100%;
|
|
|
|
}
|
|
|
|
|
|
|
|
.composer-inner-wrap {
|
|
|
|
|
|
|
|
.composer-action-bar-wrap {
|
2015-11-24 10:28:30 +08:00
|
|
|
background: darken(@background-primary, 1%);
|
|
|
|
border-top: 1px solid darken(@background-primary, 8%);
|
2015-06-18 11:43:14 +08:00
|
|
|
box-shadow: inset 0 1px 2px rgba(0,0,0,0.03);
|
2015-03-06 05:31:11 +08:00
|
|
|
}
|
|
|
|
|
2015-06-18 07:03:50 +08:00
|
|
|
.composer-action-bar-content {
|
|
|
|
padding: 8px 0.5px;
|
|
|
|
}
|
|
|
|
|
2015-03-06 05:31:11 +08:00
|
|
|
.compose-body {
|
|
|
|
margin-bottom: 0;
|
|
|
|
position: relative;
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
2015-06-18 07:03:50 +08:00
|
|
|
|
|
|
|
.compose-body {
|
|
|
|
div[contenteditable] {
|
|
|
|
min-height: @line-height-computed;
|
2015-12-01 03:48:24 +08:00
|
|
|
margin-bottom: 30px;
|
|
|
|
padding: 20px @spacing-standard 0 @spacing-standard;
|
2015-06-18 07:03:50 +08:00
|
|
|
}
|
|
|
|
}
|
2015-08-29 08:35:43 +08:00
|
|
|
|
|
|
|
.from-picker {
|
|
|
|
&:hover {
|
|
|
|
cursor: default;
|
|
|
|
}
|
|
|
|
}
|
2015-03-06 05:31:11 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// Overrides for the composer in a message-list
|
|
|
|
#message-list {
|
2015-08-06 08:38:44 +08:00
|
|
|
.message-item-wrap {
|
2015-08-15 06:40:11 +08:00
|
|
|
.message-item-white-wrap.composer-outer-wrap {
|
|
|
|
background: mix(@background-primary, #ffbb00, 96%);
|
|
|
|
}
|
2015-08-06 08:38:44 +08:00
|
|
|
.message-item-white-wrap.composer-outer-wrap.focused {
|
|
|
|
box-shadow: 0 0 0.5px rgba(0, 0, 0, 0.28), 0 1px 1.5px rgba(0, 0, 0, 0.08), 0 0 3px @accent-primary;
|
2015-08-15 06:40:11 +08:00
|
|
|
background-color: @background-primary;
|
2015-08-06 08:38:44 +08:00
|
|
|
}
|
2015-03-06 05:31:11 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
//////////////////////////////////
|
|
|
|
// participants-text-field.cjsx //
|
|
|
|
//////////////////////////////////
|
feat(accounts): Kill namespaces, long live accounts
Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.
This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.
When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.
Search bar doesn't need to do full refresh on clear if it never committed
Allow drafts to be switched to a different account when not in reply to an existing thread
Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal
Show many dots for many accounts in long polling status bar
add/remove accounts from prefs
Spec fixes!
Test Plan: Run tests, none broken!
Reviewers: evan, dillon
Reviewed By: evan, dillon
Differential Revision: https://phab.nylas.com/D1928
2015-08-22 06:29:58 +08:00
|
|
|
.composer-participant-field {
|
2015-03-06 05:31:11 +08:00
|
|
|
position: relative;
|
2015-12-10 04:35:40 +08:00
|
|
|
padding: 8px 0 0 0;
|
feat(accounts): Kill namespaces, long live accounts
Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.
This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.
When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.
Search bar doesn't need to do full refresh on clear if it never committed
Allow drafts to be switched to a different account when not in reply to an existing thread
Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal
Show many dots for many accounts in long polling status bar
add/remove accounts from prefs
Spec fixes!
Test Plan: Run tests, none broken!
Reviewers: evan, dillon
Reviewed By: evan, dillon
Differential Revision: https://phab.nylas.com/D1928
2015-08-22 06:29:58 +08:00
|
|
|
margin: 0 8+@spacing-standard;
|
feat(*): draft icon, misc fixes, and WorkspaceStore / custom toolbar in secondary windows
Summary:
Features:
- ThreadListParticipants ignores drafts when computing participants, renders "Draft" label, pending design
- Put the WorkspaceStore in every window—means they all get toolbars and custom gumdrop icons on Mac OS X
Bug Fixes:
- Never display notifications for email the user just sent
- Fix obscure issue with DatabaseView trying to update metadata on items it froze. This resolves issue with names remaining bold after marking as read, drafts not appearing in message list immediately.
- When you pop out a draft, save it first and *wait* for the commit() promise to succeed.
- If you scroll very fast, you node.contentWindow can be null in eventedIframe
Other:
Make it OK to re-register the same component
Make it possible to unregister a hot window
Break the Sheet Toolbar out into it's own file to make things manageable
Replace `package.windowPropsReceived` with a store-style model where anyone can listen for changes to `windowProps`
When I put the WorkspaceStore in every window, I ran into a problem because the package was no longer rendering an instance of the Composer, it was declaring a root sheet with a composer in it. This meant that it was actually a React component that needed to listen to window props, not the package itself.
`atom` is already an event emitter, so I added a `onWindowPropsReceived` hook so that components can listen to window props as if they were listening to a store. I think this might be more flexible than only broadcasting the props change event to packages.
Test Plan: Run tests
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1592
2015-06-04 07:02:19 +08:00
|
|
|
flex-shrink: 0;
|
feat(accounts): Kill namespaces, long live accounts
Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.
This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.
When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.
Search bar doesn't need to do full refresh on clear if it never committed
Allow drafts to be switched to a different account when not in reply to an existing thread
Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal
Show many dots for many accounts in long polling status bar
add/remove accounts from prefs
Spec fixes!
Test Plan: Run tests, none broken!
Reviewers: evan, dillon
Reviewed By: evan, dillon
Differential Revision: https://phab.nylas.com/D1928
2015-08-22 06:29:58 +08:00
|
|
|
border-bottom: 1px solid @border-color-divider;
|
2015-09-14 22:37:00 +08:00
|
|
|
min-height: 49px;
|
2015-12-08 07:34:03 +08:00
|
|
|
color: @text-color;
|
feat(accounts): Kill namespaces, long live accounts
Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.
This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.
When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.
Search bar doesn't need to do full refresh on clear if it never committed
Allow drafts to be switched to a different account when not in reply to an existing thread
Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal
Show many dots for many accounts in long polling status bar
add/remove accounts from prefs
Spec fixes!
Test Plan: Run tests, none broken!
Reviewers: evan, dillon
Reviewed By: evan, dillon
Differential Revision: https://phab.nylas.com/D1928
2015-08-22 06:29:58 +08:00
|
|
|
|
|
|
|
.button-dropdown {
|
|
|
|
margin-left: 10px;
|
2015-12-10 04:35:40 +08:00
|
|
|
&:hover {
|
|
|
|
.primary-item,
|
|
|
|
.only-item {
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.secondary-items {
|
|
|
|
border-radius: 4px;
|
|
|
|
}
|
feat(accounts): Kill namespaces, long live accounts
Summary:
This diff replaces the Namespace object with the Account object, and changes all references to namespace_id => account_id, etc. The endpoints are now `/threads` instead of `/n/<id>/threads`.
This diff also adds preliminary support for multiple accounts. When you log in, we now log you in to all the attached accounts on edgehill server. From the preferences panel, you can auth with / unlink additional accounts. Shockingly, this all seems to pretty much work.
When replying to a thread, you cannot switch from addresses. However, when creating a new message in a popout composer, you can change the from address and the SaveDraftTask will delete/re-root the draft on the new account.
Search bar doesn't need to do full refresh on clear if it never committed
Allow drafts to be switched to a different account when not in reply to an existing thread
Fix edge case where ChangeMailTask throws exception if no models are modified during performLocal
Show many dots for many accounts in long polling status bar
add/remove accounts from prefs
Spec fixes!
Test Plan: Run tests, none broken!
Reviewers: evan, dillon
Reviewed By: evan, dillon
Differential Revision: https://phab.nylas.com/D1928
2015-08-22 06:29:58 +08:00
|
|
|
}
|
2015-03-06 05:31:11 +08:00
|
|
|
|
|
|
|
.participant {
|
|
|
|
white-space: nowrap;
|
|
|
|
text-overflow: ellipsis;
|
2015-04-21 06:59:43 +08:00
|
|
|
overflow: hidden;
|
|
|
|
|
2015-03-06 05:31:11 +08:00
|
|
|
.participant-primary {
|
|
|
|
font-weight: @font-weight-semi-bold;
|
|
|
|
}
|
|
|
|
.participant-secondary {
|
|
|
|
color: @text-color-very-subtle;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|