feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:
- The preferences package has a new tab which allows you to edit
mail filters. Filters are saved in a new core store, and a new
stock component (ScenarioEditor) renders the editor. The editor
takes a set of templates that define a value space, and outputs
a valid set of values.
- A new MailFilterProcessor takes messages and creates tasks to
apply the actions from the MailFiltersStore.
- The worker-sync package now uses the MailFilterProcessor to
apply filters /before/ it calls didPassivelyReceiveNewModels,
so filtrs are applied before any notifications are created.
- A new task, ReprocessMailFiltersTask allows you to run filters
on all of your existing mail. It leverages the existing TaskQueue
architecture to: a) resume where it left off if you quit midway,
b) be queryable (for status) from all windows and c) cancelable.
The TaskQueue is a bit strange because it runs performLocal and
performRemote very differently, and I had to use `performRemote`.
(todo refactor soon.)
This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.
Test Plan: Run tests, only for actual filter processing atm.
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2379
2015-12-23 15:19:32 +08:00
|
|
|
@import "ui-variables";
|
|
|
|
|
|
|
|
.container-mail-rules {
|
2016-04-07 04:08:37 +08:00
|
|
|
max-width: 800px;
|
2016-04-01 06:52:03 +08:00
|
|
|
margin: 0 auto;
|
|
|
|
|
|
|
|
.empty-list {
|
|
|
|
height: 376px;
|
|
|
|
width: inherit;
|
|
|
|
background-color: @background-secondary;
|
|
|
|
border: 1px solid @border-color-divider;
|
|
|
|
text-align: center;
|
|
|
|
|
|
|
|
.icon-mail-rules {
|
|
|
|
margin-top: 80px;
|
|
|
|
}
|
|
|
|
|
|
|
|
h2 {
|
|
|
|
color: @text-color-very-subtle;
|
|
|
|
}
|
|
|
|
|
|
|
|
.btn {
|
|
|
|
margin-top: 10px;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:
- The preferences package has a new tab which allows you to edit
mail filters. Filters are saved in a new core store, and a new
stock component (ScenarioEditor) renders the editor. The editor
takes a set of templates that define a value space, and outputs
a valid set of values.
- A new MailFilterProcessor takes messages and creates tasks to
apply the actions from the MailFiltersStore.
- The worker-sync package now uses the MailFilterProcessor to
apply filters /before/ it calls didPassivelyReceiveNewModels,
so filtrs are applied before any notifications are created.
- A new task, ReprocessMailFiltersTask allows you to run filters
on all of your existing mail. It leverages the existing TaskQueue
architecture to: a) resume where it left off if you quit midway,
b) be queryable (for status) from all windows and c) cancelable.
The TaskQueue is a bit strange because it runs performLocal and
performRemote very differently, and I had to use `performRemote`.
(todo refactor soon.)
This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.
Test Plan: Run tests, only for actual filter processing atm.
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2379
2015-12-23 15:19:32 +08:00
|
|
|
.rule-list {
|
|
|
|
position: relative;
|
|
|
|
height: inherit;
|
|
|
|
width: inherit;
|
|
|
|
|
|
|
|
.items-wrapper {
|
|
|
|
min-width:200px;
|
|
|
|
height: 350px;
|
|
|
|
}
|
2015-12-29 10:10:17 +08:00
|
|
|
.item-rule-disabled {
|
2016-03-16 01:57:43 +08:00
|
|
|
color: @color-error;
|
2015-12-29 10:10:17 +08:00
|
|
|
padding: 4px 10px;
|
|
|
|
border-bottom: 1px solid @border-color-divider;
|
|
|
|
}
|
|
|
|
.selected .item-rule-disabled {
|
|
|
|
color: @component-active-bg;
|
|
|
|
}
|
feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:
- The preferences package has a new tab which allows you to edit
mail filters. Filters are saved in a new core store, and a new
stock component (ScenarioEditor) renders the editor. The editor
takes a set of templates that define a value space, and outputs
a valid set of values.
- A new MailFilterProcessor takes messages and creates tasks to
apply the actions from the MailFiltersStore.
- The worker-sync package now uses the MailFilterProcessor to
apply filters /before/ it calls didPassivelyReceiveNewModels,
so filtrs are applied before any notifications are created.
- A new task, ReprocessMailFiltersTask allows you to run filters
on all of your existing mail. It leverages the existing TaskQueue
architecture to: a) resume where it left off if you quit midway,
b) be queryable (for status) from all windows and c) cancelable.
The TaskQueue is a bit strange because it runs performLocal and
performRemote very differently, and I had to use `performRemote`.
(todo refactor soon.)
This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.
Test Plan: Run tests, only for actual filter processing atm.
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2379
2015-12-23 15:19:32 +08:00
|
|
|
}
|
|
|
|
.rule-detail {
|
|
|
|
flex: 1;
|
|
|
|
cursor: default;
|
|
|
|
background-color: @background-secondary;
|
|
|
|
border: 1px solid @border-color-divider;
|
|
|
|
border-left: 0;
|
|
|
|
|
2015-12-29 10:10:17 +08:00
|
|
|
.disabled-reason {
|
|
|
|
padding: @padding-base-vertical * 2 @padding-base-vertical * 2;
|
|
|
|
background-color: fade(@background-color-error, 30%);
|
|
|
|
border-bottom: 1px solid @background-color-error;
|
|
|
|
margin-bottom: @padding-base-vertical;
|
|
|
|
.btn {
|
|
|
|
margin-left:@padding-base-horizontal * 2;
|
|
|
|
float:right;
|
|
|
|
}
|
|
|
|
}
|
feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:
- The preferences package has a new tab which allows you to edit
mail filters. Filters are saved in a new core store, and a new
stock component (ScenarioEditor) renders the editor. The editor
takes a set of templates that define a value space, and outputs
a valid set of values.
- A new MailFilterProcessor takes messages and creates tasks to
apply the actions from the MailFiltersStore.
- The worker-sync package now uses the MailFilterProcessor to
apply filters /before/ it calls didPassivelyReceiveNewModels,
so filtrs are applied before any notifications are created.
- A new task, ReprocessMailFiltersTask allows you to run filters
on all of your existing mail. It leverages the existing TaskQueue
architecture to: a) resume where it left off if you quit midway,
b) be queryable (for status) from all windows and c) cancelable.
The TaskQueue is a bit strange because it runs performLocal and
performRemote very differently, and I had to use `performRemote`.
(todo refactor soon.)
This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.
Test Plan: Run tests, only for actual filter processing atm.
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2379
2015-12-23 15:19:32 +08:00
|
|
|
.inner {
|
|
|
|
padding: @padding-base-vertical @padding-base-horizontal;
|
|
|
|
}
|
|
|
|
.no-selection {
|
|
|
|
color: @text-color-very-subtle;
|
|
|
|
text-align: center;
|
|
|
|
padding:100px;
|
|
|
|
}
|
|
|
|
|
|
|
|
.well {
|
|
|
|
background-color: @background-primary;
|
|
|
|
border: 1px solid @border-color-divider;
|
|
|
|
margin: @padding-base-vertical 0;
|
|
|
|
font-size:0.9em;
|
|
|
|
|
|
|
|
.well-row {
|
|
|
|
padding: @padding-base-vertical @padding-base-horizontal;
|
|
|
|
border-bottom: 1px solid @border-color-divider;
|
|
|
|
select, input {
|
|
|
|
margin:@padding-base-vertical / 4 @padding-base-horizontal / 2;
|
|
|
|
&:first-child {
|
|
|
|
margin-left: 0;
|
|
|
|
}
|
|
|
|
&:last-child {
|
|
|
|
margin-right: 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
select {
|
|
|
|
max-width:170px;
|
|
|
|
}
|
|
|
|
input {
|
|
|
|
width:200px;
|
|
|
|
}
|
|
|
|
.actions {
|
|
|
|
white-space: nowrap;
|
|
|
|
vertical-align: middle;
|
|
|
|
.btn {
|
2016-01-16 03:01:59 +08:00
|
|
|
padding: 0;
|
feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:
- The preferences package has a new tab which allows you to edit
mail filters. Filters are saved in a new core store, and a new
stock component (ScenarioEditor) renders the editor. The editor
takes a set of templates that define a value space, and outputs
a valid set of values.
- A new MailFilterProcessor takes messages and creates tasks to
apply the actions from the MailFiltersStore.
- The worker-sync package now uses the MailFilterProcessor to
apply filters /before/ it calls didPassivelyReceiveNewModels,
so filtrs are applied before any notifications are created.
- A new task, ReprocessMailFiltersTask allows you to run filters
on all of your existing mail. It leverages the existing TaskQueue
architecture to: a) resume where it left off if you quit midway,
b) be queryable (for status) from all windows and c) cancelable.
The TaskQueue is a bit strange because it runs performLocal and
performRemote very differently, and I had to use `performRemote`.
(todo refactor soon.)
This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.
Test Plan: Run tests, only for actual filter processing atm.
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2379
2015-12-23 15:19:32 +08:00
|
|
|
border-radius: 100%;
|
|
|
|
text-align: center;
|
|
|
|
margin-left:10px;
|
|
|
|
margin-top:1px;
|
|
|
|
width:24px;
|
2016-02-10 11:45:24 +08:00
|
|
|
line-height: 24px;
|
|
|
|
height: 24px;
|
feat(mail-rules): Per-account mail rules filter incoming, existing mail
Summary:
Originally, this was going to be a totally independent package, but
I wasn't able to isolate the functionality and get it tied in to
the delta-stream consumption. Here's how it currently works:
- The preferences package has a new tab which allows you to edit
mail filters. Filters are saved in a new core store, and a new
stock component (ScenarioEditor) renders the editor. The editor
takes a set of templates that define a value space, and outputs
a valid set of values.
- A new MailFilterProcessor takes messages and creates tasks to
apply the actions from the MailFiltersStore.
- The worker-sync package now uses the MailFilterProcessor to
apply filters /before/ it calls didPassivelyReceiveNewModels,
so filtrs are applied before any notifications are created.
- A new task, ReprocessMailFiltersTask allows you to run filters
on all of your existing mail. It leverages the existing TaskQueue
architecture to: a) resume where it left off if you quit midway,
b) be queryable (for status) from all windows and c) cancelable.
The TaskQueue is a bit strange because it runs performLocal and
performRemote very differently, and I had to use `performRemote`.
(todo refactor soon.)
This diff also changes the EditableList a bit to behave like a
controlled component and render focused / unfocused states.
Test Plan: Run tests, only for actual filter processing atm.
Reviewers: juan, evan
Reviewed By: evan
Differential Revision: https://phab.nylas.com/D2379
2015-12-23 15:19:32 +08:00
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.well-row:last-child {
|
|
|
|
border-bottom: none;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
.footer {
|
|
|
|
border-top:1px solid @border-color-divider;
|
|
|
|
background-color: @background-secondary;
|
|
|
|
padding: @padding-base-vertical*3 @padding-base-horizontal;
|
|
|
|
.btn {
|
|
|
|
margin-right: @padding-base-horizontal;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|