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";
|
|
|
|
|
2015-06-18 10:59:18 +08:00
|
|
|
// MIXINS
|
|
|
|
|
|
|
|
.inverseContent() {
|
2015-06-20 07:07:24 +08:00
|
|
|
// Note: these styles are also applied below
|
2015-06-18 10:59:18 +08:00
|
|
|
// subpixel antialiasing looks awful against dark background colors
|
|
|
|
-webkit-font-smoothing: antialiased;
|
|
|
|
|
|
|
|
.participants {
|
|
|
|
color: @text-color-inverse;
|
|
|
|
.unread-true {
|
|
|
|
font-weight: @font-weight-normal;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.subject {
|
|
|
|
color: @text-color-inverse;
|
|
|
|
font-weight: @font-weight-normal;
|
|
|
|
}
|
|
|
|
.snippet, .timestamp {
|
|
|
|
color: @text-color-inverse-subtle;
|
|
|
|
}
|
|
|
|
|
|
|
|
.thread-icon, .draft-icon {
|
|
|
|
-webkit-filter: brightness(600%) grayscale(100%);
|
|
|
|
}
|
2015-07-22 04:52:59 +08:00
|
|
|
|
|
|
|
.mail-label {
|
|
|
|
// Note - these !important styles override values set by a style tag
|
|
|
|
// since the color of the label is detemined programatically.
|
|
|
|
background: none !important;
|
|
|
|
box-shadow: 0 0.5px 0 @text-color-inverse, 0 -0.5px 0 @text-color-inverse, 0.5px 0 0 @text-color-inverse, -0.5px 0 0 @text-color-inverse !important;
|
|
|
|
-webkit-filter: brightness(600%) grayscale(100%);
|
|
|
|
}
|
|
|
|
|
2015-06-18 10:59:18 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
// STYLES
|
|
|
|
|
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
|
|
|
*:focus, input:focus {
|
|
|
|
outline:none;
|
|
|
|
}
|
|
|
|
|
2015-05-16 04:16:34 +08:00
|
|
|
.thread-list, .draft-list {
|
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
|
|
|
order: 3;
|
|
|
|
flex: 1;
|
2015-06-06 02:50:55 +08:00
|
|
|
position:absolute;
|
|
|
|
width:100%;
|
|
|
|
height:100%;
|
2015-03-26 09:22:52 +08:00
|
|
|
-webkit-font-smoothing: subpixel-antialiased;
|
2015-03-04 04:00:04 +08:00
|
|
|
|
2015-03-26 03:41:48 +08:00
|
|
|
.list-item {
|
2015-06-09 08:02:50 +08:00
|
|
|
background-color: darken(@background-primary, 2%);
|
2015-03-26 09:22:52 +08:00
|
|
|
}
|
2015-04-09 10:25:00 +08:00
|
|
|
|
2015-03-26 09:22:52 +08:00
|
|
|
.list-column {
|
|
|
|
border-bottom: 1px solid fade(@list-border, 60%);
|
2015-03-26 03:41:48 +08:00
|
|
|
}
|
|
|
|
|
2015-03-04 04:00:04 +08:00
|
|
|
.message-count {
|
|
|
|
color: @text-color-inverse;
|
|
|
|
background: @background-tertiary;
|
2015-03-04 10:09:57 +08:00
|
|
|
padding: 4px 6px 2px 6px;
|
|
|
|
margin-left: 1em;
|
|
|
|
}
|
|
|
|
|
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
|
|
|
.draft-icon {
|
|
|
|
margin-top:8px;
|
|
|
|
margin-left:10px;
|
|
|
|
flex-shrink: 0;
|
|
|
|
object-fit: contain;
|
|
|
|
}
|
|
|
|
|
2015-03-04 10:09:57 +08:00
|
|
|
.participants {
|
2015-03-26 03:41:48 +08:00
|
|
|
font-size: @font-size-small;
|
2015-03-10 09:25:53 +08:00
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
2015-03-26 03:41:48 +08:00
|
|
|
position: relative;
|
|
|
|
top:2px;
|
2015-03-04 10:09:57 +08:00
|
|
|
}
|
2015-03-10 09:25:53 +08:00
|
|
|
|
2015-03-26 03:41:48 +08:00
|
|
|
.details {
|
|
|
|
display:flex;
|
|
|
|
.subject {
|
|
|
|
font-size: @font-size-small;
|
|
|
|
font-weight: @font-weight-normal;
|
|
|
|
padding-right: @padding-base-horizontal;
|
|
|
|
position: relative;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
top:2px;
|
2015-07-18 07:34:48 +08:00
|
|
|
|
|
|
|
// Shrink, but only after snippet has shrunk
|
|
|
|
flex-shrink:0.1;
|
2015-03-26 03:41:48 +08:00
|
|
|
}
|
|
|
|
.snippet {
|
|
|
|
font-size: @font-size-small;
|
|
|
|
font-weight: @font-weight-normal;
|
|
|
|
color: @text-color-very-subtle;
|
|
|
|
position: relative;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
overflow: hidden;
|
|
|
|
top:2px;
|
2015-07-18 07:34:48 +08:00
|
|
|
flex: 1;
|
2015-03-26 03:41:48 +08:00
|
|
|
}
|
|
|
|
.thread-icon {
|
|
|
|
flex-shrink:0;
|
|
|
|
margin-right:@padding-base-horizontal;
|
|
|
|
margin-left:@padding-base-horizontal;
|
|
|
|
}
|
2015-03-04 10:09:57 +08:00
|
|
|
}
|
2015-03-26 03:41:48 +08:00
|
|
|
|
|
|
|
.timestamp {
|
2015-03-04 10:09:57 +08:00
|
|
|
font-size: @font-size-small;
|
|
|
|
font-weight: @font-weight-normal;
|
2015-03-26 03:41:48 +08:00
|
|
|
color: @text-color-very-subtle;
|
|
|
|
position: relative;
|
|
|
|
top:2px;
|
2015-07-31 07:43:44 +08:00
|
|
|
text-align: right;
|
|
|
|
min-width:70px;
|
|
|
|
display:inline-block;
|
2015-03-04 10:09:57 +08:00
|
|
|
}
|
2015-03-10 09:25:53 +08:00
|
|
|
|
2015-04-09 10:25:00 +08:00
|
|
|
.unread:not(.focused):not(.selected) {
|
2015-03-26 09:22:52 +08:00
|
|
|
background-color: @background-primary;
|
|
|
|
&:hover {
|
|
|
|
background: darken(@background-primary, 2%);
|
|
|
|
}
|
|
|
|
.list-column {
|
|
|
|
border-bottom: 1px solid @list-border;
|
|
|
|
}
|
2015-04-09 10:25:00 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
.unread:not(.focused) {
|
|
|
|
// Never show any unread styles when the thread is focused.
|
|
|
|
// It will be marked as read and the delay from focus=>read
|
|
|
|
// is noticeable.
|
2015-03-10 09:25:53 +08:00
|
|
|
.subject {
|
2015-03-26 03:41:48 +08:00
|
|
|
font-weight: @font-weight-semi-bold;
|
2015-03-10 09:25:53 +08:00
|
|
|
}
|
2015-03-26 09:22:52 +08:00
|
|
|
.snippet {
|
|
|
|
color: @text-color-subtle;
|
|
|
|
}
|
2015-08-15 04:47:25 +08:00
|
|
|
.participants {
|
|
|
|
.unread-true {
|
|
|
|
font-weight: @font-weight-semi-bold;
|
|
|
|
}
|
|
|
|
}
|
2015-03-10 09:25:53 +08:00
|
|
|
}
|
|
|
|
|
2015-04-09 10:25:00 +08:00
|
|
|
.focused {
|
2015-06-18 10:59:18 +08:00
|
|
|
.inverseContent;
|
2015-03-04 04:00:04 +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-26 03:41:48 +08:00
|
|
|
.thread-icon {
|
|
|
|
width:15px;
|
|
|
|
height:15px;
|
2015-06-09 08:02:50 +08:00
|
|
|
background-size: 15px;
|
2015-03-26 03:41:48 +08:00
|
|
|
background-repeat: no-repeat;
|
2015-06-09 08:02:50 +08:00
|
|
|
background-position:center;
|
|
|
|
padding:12px;
|
2015-07-31 07:43:44 +08:00
|
|
|
|
|
|
|
&.thread-icon-attachment {
|
|
|
|
background-image:url(../static/images/thread-list/icon-attachment-@2x.png);
|
|
|
|
margin-right:0;
|
|
|
|
margin-left:0;
|
|
|
|
}
|
|
|
|
&.thread-icon-unread {
|
|
|
|
background-image:url(../static/images/thread-list/icon-unread-@2x.png);
|
|
|
|
}
|
|
|
|
&.thread-icon-replied {
|
|
|
|
background-image:url(../static/images/thread-list/icon-replied-@2x.png);
|
|
|
|
}
|
|
|
|
&.thread-icon-forwarded {
|
|
|
|
background-image:url(../static/images/thread-list/icon-forwarded-@2x.png);
|
|
|
|
}
|
|
|
|
&.thread-icon-star {
|
|
|
|
background-size: 16px;
|
|
|
|
background-image:url(../static/images/thread-list/icon-star-@2x.png);
|
|
|
|
}
|
2015-06-09 08:02:50 +08:00
|
|
|
}
|
2015-02-05 10:22:23 +08:00
|
|
|
.star-button {
|
|
|
|
font-size: 16px;
|
|
|
|
.fa-star {
|
|
|
|
color: rgb(239, 209, 0);
|
|
|
|
&:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
color: rgb(220,220,220);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.fa-star-o {
|
|
|
|
color: rgb(220,220,220);
|
|
|
|
&:hover {
|
|
|
|
cursor: pointer;
|
|
|
|
color: rgb(239, 209, 0);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
2015-06-09 08:02:50 +08:00
|
|
|
|
|
|
|
|
2015-06-12 09:38:57 +08:00
|
|
|
// quick actions
|
|
|
|
|
2015-06-13 04:30:49 +08:00
|
|
|
.thread-list .list-item .list-column-HoverActions {
|
2015-06-12 09:38:57 +08:00
|
|
|
display:none;
|
|
|
|
.action {
|
|
|
|
display:inline-block;
|
perf(thread-list): Tailored SQLite indexes, ListTabular / ScrollRegion optimizations galore
Summary:
Allow Database models to create indexes, but don't autocreate bad ones
fix minor bug in error-reporter
Fix index on message list to make thread list lookups use proper index
Developer bar ignores state changes unless it's open
DatabaseView now asks for metadata for a set of items rather than calling a function for every item. Promise.props was cute but we really needed to make a single database query for all message metadata.
New "in" matcher so you can say `thread_id IN (1,2,3)`
Add .scroll-region-content-inner which is larger than the viewport by 1 page size, and uses transform(0,0,0) trick
ScrollRegion exposes `onScrollEnd` so listTabular, et al don't need to re-implement it with more timers. Also removing requestAnimationFrame which was causing us to request scrollTop when it was not ready, and caching the values of...
...clientHeight/scrollHeight while scrolling is in-flight
Updating rendered content 10 rows at a time (RangeChunkSize) was a bad idea. Instead, add every row in a render: pass as it comes in (less work all the time vs more work intermittently). Also remove bad requestAnimationFrame, and prevent calls to...
...updateRangeState from triggering additional calls to updateRangeState by removing `componentDidUpdate => updateRangeState `
Turning off hover (pointer-events:none) is now standard in ScrollRegion
Loading text in the scroll tooltip, instead of random date shown
Handle query parse errors by catching error and throwing a better more explanatory error
Replace "quick action" retina images with background images to make React render easier
Replace hasTagId with a faster implementation which doesn't call functions and doesn't build a temporary array
Print query durations when printing to console instead of only in metadata
Remove headers from support from ListTabular, we'll never use it
Making columns part of state was a good idea but changing the array causes the entire ListTabular to re-render. To avoid this, be smarter about updating columns. This logic could potentially go in `componentDidReceiveProps` too.
Fix specs and add 6 more for new database store functionality
Test Plan: Run 6 new specs. More in the works?
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1651
2015-06-18 11:12:48 +08:00
|
|
|
background-size: 100%;
|
|
|
|
zoom:0.5;
|
2015-07-22 04:52:59 +08:00
|
|
|
width:42px;
|
|
|
|
height:42px;
|
perf(thread-list): Tailored SQLite indexes, ListTabular / ScrollRegion optimizations galore
Summary:
Allow Database models to create indexes, but don't autocreate bad ones
fix minor bug in error-reporter
Fix index on message list to make thread list lookups use proper index
Developer bar ignores state changes unless it's open
DatabaseView now asks for metadata for a set of items rather than calling a function for every item. Promise.props was cute but we really needed to make a single database query for all message metadata.
New "in" matcher so you can say `thread_id IN (1,2,3)`
Add .scroll-region-content-inner which is larger than the viewport by 1 page size, and uses transform(0,0,0) trick
ScrollRegion exposes `onScrollEnd` so listTabular, et al don't need to re-implement it with more timers. Also removing requestAnimationFrame which was causing us to request scrollTop when it was not ready, and caching the values of...
...clientHeight/scrollHeight while scrolling is in-flight
Updating rendered content 10 rows at a time (RangeChunkSize) was a bad idea. Instead, add every row in a render: pass as it comes in (less work all the time vs more work intermittently). Also remove bad requestAnimationFrame, and prevent calls to...
...updateRangeState from triggering additional calls to updateRangeState by removing `componentDidUpdate => updateRangeState `
Turning off hover (pointer-events:none) is now standard in ScrollRegion
Loading text in the scroll tooltip, instead of random date shown
Handle query parse errors by catching error and throwing a better more explanatory error
Replace "quick action" retina images with background images to make React render easier
Replace hasTagId with a faster implementation which doesn't call functions and doesn't build a temporary array
Print query durations when printing to console instead of only in metadata
Remove headers from support from ListTabular, we'll never use it
Making columns part of state was a good idea but changing the array causes the entire ListTabular to re-render. To avoid this, be smarter about updating columns. This logic could potentially go in `componentDidReceiveProps` too.
Fix specs and add 6 more for new database store functionality
Test Plan: Run 6 new specs. More in the works?
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1651
2015-06-18 11:12:48 +08:00
|
|
|
margin:16px;
|
2015-06-12 09:38:57 +08:00
|
|
|
}
|
|
|
|
.action:last-child {
|
perf(thread-list): Tailored SQLite indexes, ListTabular / ScrollRegion optimizations galore
Summary:
Allow Database models to create indexes, but don't autocreate bad ones
fix minor bug in error-reporter
Fix index on message list to make thread list lookups use proper index
Developer bar ignores state changes unless it's open
DatabaseView now asks for metadata for a set of items rather than calling a function for every item. Promise.props was cute but we really needed to make a single database query for all message metadata.
New "in" matcher so you can say `thread_id IN (1,2,3)`
Add .scroll-region-content-inner which is larger than the viewport by 1 page size, and uses transform(0,0,0) trick
ScrollRegion exposes `onScrollEnd` so listTabular, et al don't need to re-implement it with more timers. Also removing requestAnimationFrame which was causing us to request scrollTop when it was not ready, and caching the values of...
...clientHeight/scrollHeight while scrolling is in-flight
Updating rendered content 10 rows at a time (RangeChunkSize) was a bad idea. Instead, add every row in a render: pass as it comes in (less work all the time vs more work intermittently). Also remove bad requestAnimationFrame, and prevent calls to...
...updateRangeState from triggering additional calls to updateRangeState by removing `componentDidUpdate => updateRangeState `
Turning off hover (pointer-events:none) is now standard in ScrollRegion
Loading text in the scroll tooltip, instead of random date shown
Handle query parse errors by catching error and throwing a better more explanatory error
Replace "quick action" retina images with background images to make React render easier
Replace hasTagId with a faster implementation which doesn't call functions and doesn't build a temporary array
Print query durations when printing to console instead of only in metadata
Remove headers from support from ListTabular, we'll never use it
Making columns part of state was a good idea but changing the array causes the entire ListTabular to re-render. To avoid this, be smarter about updating columns. This logic could potentially go in `componentDidReceiveProps` too.
Fix specs and add 6 more for new database store functionality
Test Plan: Run 6 new specs. More in the works?
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1651
2015-06-18 11:12:48 +08:00
|
|
|
margin-right:40px;
|
|
|
|
}
|
|
|
|
.action.action-reply {
|
2015-07-22 04:52:59 +08:00
|
|
|
background: url(../static/images/thread-list-quick-actions/ic-quick-button-reply@2x.png) top left no-repeat;
|
perf(thread-list): Tailored SQLite indexes, ListTabular / ScrollRegion optimizations galore
Summary:
Allow Database models to create indexes, but don't autocreate bad ones
fix minor bug in error-reporter
Fix index on message list to make thread list lookups use proper index
Developer bar ignores state changes unless it's open
DatabaseView now asks for metadata for a set of items rather than calling a function for every item. Promise.props was cute but we really needed to make a single database query for all message metadata.
New "in" matcher so you can say `thread_id IN (1,2,3)`
Add .scroll-region-content-inner which is larger than the viewport by 1 page size, and uses transform(0,0,0) trick
ScrollRegion exposes `onScrollEnd` so listTabular, et al don't need to re-implement it with more timers. Also removing requestAnimationFrame which was causing us to request scrollTop when it was not ready, and caching the values of...
...clientHeight/scrollHeight while scrolling is in-flight
Updating rendered content 10 rows at a time (RangeChunkSize) was a bad idea. Instead, add every row in a render: pass as it comes in (less work all the time vs more work intermittently). Also remove bad requestAnimationFrame, and prevent calls to...
...updateRangeState from triggering additional calls to updateRangeState by removing `componentDidUpdate => updateRangeState `
Turning off hover (pointer-events:none) is now standard in ScrollRegion
Loading text in the scroll tooltip, instead of random date shown
Handle query parse errors by catching error and throwing a better more explanatory error
Replace "quick action" retina images with background images to make React render easier
Replace hasTagId with a faster implementation which doesn't call functions and doesn't build a temporary array
Print query durations when printing to console instead of only in metadata
Remove headers from support from ListTabular, we'll never use it
Making columns part of state was a good idea but changing the array causes the entire ListTabular to re-render. To avoid this, be smarter about updating columns. This logic could potentially go in `componentDidReceiveProps` too.
Fix specs and add 6 more for new database store functionality
Test Plan: Run 6 new specs. More in the works?
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1651
2015-06-18 11:12:48 +08:00
|
|
|
}
|
|
|
|
.action.action-forward {
|
2015-07-22 04:52:59 +08:00
|
|
|
background: url(../static/images/thread-list-quick-actions/ic-quick-button-forward@2x.png) top left no-repeat;
|
perf(thread-list): Tailored SQLite indexes, ListTabular / ScrollRegion optimizations galore
Summary:
Allow Database models to create indexes, but don't autocreate bad ones
fix minor bug in error-reporter
Fix index on message list to make thread list lookups use proper index
Developer bar ignores state changes unless it's open
DatabaseView now asks for metadata for a set of items rather than calling a function for every item. Promise.props was cute but we really needed to make a single database query for all message metadata.
New "in" matcher so you can say `thread_id IN (1,2,3)`
Add .scroll-region-content-inner which is larger than the viewport by 1 page size, and uses transform(0,0,0) trick
ScrollRegion exposes `onScrollEnd` so listTabular, et al don't need to re-implement it with more timers. Also removing requestAnimationFrame which was causing us to request scrollTop when it was not ready, and caching the values of...
...clientHeight/scrollHeight while scrolling is in-flight
Updating rendered content 10 rows at a time (RangeChunkSize) was a bad idea. Instead, add every row in a render: pass as it comes in (less work all the time vs more work intermittently). Also remove bad requestAnimationFrame, and prevent calls to...
...updateRangeState from triggering additional calls to updateRangeState by removing `componentDidUpdate => updateRangeState `
Turning off hover (pointer-events:none) is now standard in ScrollRegion
Loading text in the scroll tooltip, instead of random date shown
Handle query parse errors by catching error and throwing a better more explanatory error
Replace "quick action" retina images with background images to make React render easier
Replace hasTagId with a faster implementation which doesn't call functions and doesn't build a temporary array
Print query durations when printing to console instead of only in metadata
Remove headers from support from ListTabular, we'll never use it
Making columns part of state was a good idea but changing the array causes the entire ListTabular to re-render. To avoid this, be smarter about updating columns. This logic could potentially go in `componentDidReceiveProps` too.
Fix specs and add 6 more for new database store functionality
Test Plan: Run 6 new specs. More in the works?
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1651
2015-06-18 11:12:48 +08:00
|
|
|
}
|
|
|
|
.action.action-archive {
|
2015-07-22 04:52:59 +08:00
|
|
|
background: url(../static/images/thread-list-quick-actions/ic-quick-button-archive@2x.png) top left no-repeat;
|
2015-06-12 09:38:57 +08:00
|
|
|
}
|
2015-08-14 05:56:22 +08:00
|
|
|
.action.action-trash {
|
|
|
|
background: url(../static/images/thread-list-quick-actions/ic-quick-button-trash@2x.png) top left no-repeat;
|
|
|
|
}
|
2015-06-12 09:38:57 +08:00
|
|
|
}
|
2015-06-13 04:30:49 +08:00
|
|
|
.thread-list .list-item:hover .list-column-HoverActions {
|
2015-06-12 09:38:57 +08:00
|
|
|
width: 0;
|
|
|
|
padding: 0;
|
|
|
|
display:block;
|
|
|
|
overflow: visible;
|
|
|
|
height:100%;
|
|
|
|
|
|
|
|
.inner {
|
|
|
|
position:relative;
|
|
|
|
width:300px;
|
|
|
|
height:100%;
|
|
|
|
left: -300px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2015-06-13 04:30:49 +08:00
|
|
|
.thread-list .list-item:hover .list-column-HoverActions .inner {
|
2015-06-12 09:38:57 +08:00
|
|
|
background-image: -webkit-linear-gradient(left, fade(darken(@list-bg, 5%), 0%) 0%, darken(@list-bg, 5%) 50%, darken(@list-bg, 5%) 100%);
|
|
|
|
}
|
|
|
|
|
2015-06-13 04:30:49 +08:00
|
|
|
.thread-list .list-item.selected:hover .list-column-HoverActions .inner {
|
2015-06-12 09:38:57 +08:00
|
|
|
background-image: -webkit-linear-gradient(left, fade(@list-selected-bg, 0%) 0%, @list-selected-bg 50%, @list-selected-bg 100%);
|
|
|
|
}
|
|
|
|
|
2015-06-13 04:30:49 +08:00
|
|
|
.thread-list .list-item.focused:hover .list-column-HoverActions .inner {
|
2015-06-12 09:38:57 +08:00
|
|
|
background-image: -webkit-linear-gradient(left, fade(@list-focused-bg, 0%) 0%, @list-focused-bg 50%, @list-focused-bg 100%);
|
2015-06-20 07:07:24 +08:00
|
|
|
.action {
|
|
|
|
-webkit-filter: invert(100%) brightness(300%);
|
|
|
|
}
|
2015-06-12 09:38:57 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// stars
|
|
|
|
|
2015-06-09 08:02:50 +08:00
|
|
|
.thread-list .list-item:hover .thread-icon-star-on-hover:hover {
|
2015-06-20 07:07:24 +08:00
|
|
|
background-image:url(../static/images/thread-list/icon-star-action-hover-@2x.png);
|
2015-06-09 08:02:50 +08:00
|
|
|
background-size: 16px;
|
|
|
|
}
|
2015-06-20 07:07:24 +08:00
|
|
|
.thread-icon-star-on-hover:hover,
|
2015-06-09 08:02:50 +08:00
|
|
|
.thread-list .list-item:hover .thread-icon-star-on-hover {
|
|
|
|
background-image:url(../static/images/thread-list/icon-star-hover-@2x.png);
|
|
|
|
background-size: 16px;
|
|
|
|
}
|
2015-06-12 09:00:40 +08:00
|
|
|
|
|
|
|
.thread-list-narrow {
|
|
|
|
.timestamp {
|
|
|
|
order: 100;
|
|
|
|
}
|
|
|
|
.participants {
|
|
|
|
font-size: @font-size-base;
|
|
|
|
}
|
|
|
|
.thread-icon {
|
|
|
|
margin-right:6px;
|
|
|
|
}
|
|
|
|
.subject {
|
|
|
|
font-size: @font-size-base;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
text-align: left;
|
|
|
|
padding-top:2px;
|
|
|
|
padding-bottom:2px;
|
|
|
|
margin-left:30px;
|
|
|
|
}
|
|
|
|
.snippet {
|
|
|
|
font-size: @font-size-small;
|
|
|
|
overflow: hidden;
|
|
|
|
text-overflow: ellipsis;
|
|
|
|
opacity: 0.7;
|
|
|
|
text-align: left;
|
|
|
|
margin-left:30px;
|
|
|
|
}
|
|
|
|
}
|
2015-06-18 10:59:18 +08:00
|
|
|
|
2015-06-20 07:07:24 +08:00
|
|
|
// selection looks like focus in split mode
|
|
|
|
|
2015-06-18 10:59:18 +08:00
|
|
|
.thread-list.handler-split {
|
|
|
|
.list-item {
|
|
|
|
&.selected {
|
|
|
|
background: @list-focused-bg;
|
|
|
|
color: @list-focused-color;
|
|
|
|
.inverseContent;
|
|
|
|
}
|
|
|
|
}
|
2015-06-20 07:07:24 +08:00
|
|
|
.list-item.selected:hover .list-column-HoverActions .inner {
|
|
|
|
background-image: -webkit-linear-gradient(left, fade(@list-focused-bg, 0%) 0%, @list-focused-bg 50%, @list-focused-bg 100%);
|
|
|
|
.action {
|
|
|
|
-webkit-filter: invert(100%) brightness(300%);
|
|
|
|
}
|
|
|
|
}
|
perf(thread-list): Tailored SQLite indexes, ListTabular / ScrollRegion optimizations galore
Summary:
Allow Database models to create indexes, but don't autocreate bad ones
fix minor bug in error-reporter
Fix index on message list to make thread list lookups use proper index
Developer bar ignores state changes unless it's open
DatabaseView now asks for metadata for a set of items rather than calling a function for every item. Promise.props was cute but we really needed to make a single database query for all message metadata.
New "in" matcher so you can say `thread_id IN (1,2,3)`
Add .scroll-region-content-inner which is larger than the viewport by 1 page size, and uses transform(0,0,0) trick
ScrollRegion exposes `onScrollEnd` so listTabular, et al don't need to re-implement it with more timers. Also removing requestAnimationFrame which was causing us to request scrollTop when it was not ready, and caching the values of...
...clientHeight/scrollHeight while scrolling is in-flight
Updating rendered content 10 rows at a time (RangeChunkSize) was a bad idea. Instead, add every row in a render: pass as it comes in (less work all the time vs more work intermittently). Also remove bad requestAnimationFrame, and prevent calls to...
...updateRangeState from triggering additional calls to updateRangeState by removing `componentDidUpdate => updateRangeState `
Turning off hover (pointer-events:none) is now standard in ScrollRegion
Loading text in the scroll tooltip, instead of random date shown
Handle query parse errors by catching error and throwing a better more explanatory error
Replace "quick action" retina images with background images to make React render easier
Replace hasTagId with a faster implementation which doesn't call functions and doesn't build a temporary array
Print query durations when printing to console instead of only in metadata
Remove headers from support from ListTabular, we'll never use it
Making columns part of state was a good idea but changing the array causes the entire ListTabular to re-render. To avoid this, be smarter about updating columns. This logic could potentially go in `componentDidReceiveProps` too.
Fix specs and add 6 more for new database store functionality
Test Plan: Run 6 new specs. More in the works?
Reviewers: evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D1651
2015-06-18 11:12:48 +08:00
|
|
|
}
|