2015-02-05 10:31:41 +08:00
|
|
|
# Email-specific core key-mappings
|
|
|
|
#
|
2015-03-06 10:49:26 +08:00
|
|
|
# There are additional mappings in <platform>.cson files that bind
|
|
|
|
# menu items. In the future, we should break these into files like:
|
|
|
|
# darwin-gmail.cson, darwin-macmail.cson, win32-gmail.cson...
|
2015-02-05 10:31:41 +08:00
|
|
|
|
2015-03-06 10:49:26 +08:00
|
|
|
'body':
|
|
|
|
'c' : 'application:new-message' # Gmail
|
2015-03-13 09:47:01 +08:00
|
|
|
'/' : 'application:focus-search' # Gmail
|
|
|
|
|
2015-02-05 10:31:41 +08:00
|
|
|
'r' : 'application:reply' # Gmail
|
2015-03-26 02:17:57 +08:00
|
|
|
'R' : 'application:reply-all' # Edgehill
|
2015-02-05 10:31:41 +08:00
|
|
|
'a' : 'application:reply-all' # Gmail
|
|
|
|
'f' : 'application:forward' # Gmail
|
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-14 04:11:24 +08:00
|
|
|
'escape': 'application:pop-sheet'
|
2015-04-09 10:25:00 +08:00
|
|
|
'u' : 'application:pop-sheet' # Gmail
|
|
|
|
|
|
|
|
'k' : 'core:previous-item' # Gmail
|
|
|
|
'up' : 'core:previous-item' # Mac mail
|
|
|
|
'j' : 'core:next-item' # Gmail
|
|
|
|
'down' : 'core:next-item' # Mac mail
|
|
|
|
']' : 'core:remove-and-previous' # Gmail
|
|
|
|
'[' : 'core:remove-and-next' # Gmail
|
|
|
|
'e' : 'core:remove-item' # Gmail
|
|
|
|
'delete' : 'core:remove-item' # Mac mail
|
|
|
|
'backspace': 'core:remove-item' # Outlook
|
|
|
|
'enter' : 'core:focus-item'
|
|
|
|
'x' : 'core:select-item'
|
2015-03-14 04:11:24 +08:00
|
|
|
|
|
|
|
# Default cross-platform core behaviors
|
2015-02-05 10:31:41 +08:00
|
|
|
'left': 'core:move-left'
|
|
|
|
'right': 'core:move-right'
|
|
|
|
'shift-up': 'core:select-up'
|
|
|
|
'shift-down': 'core:select-down'
|
|
|
|
'shift-left': 'core:select-left'
|
|
|
|
'shift-right': 'core:select-right'
|
|
|
|
'shift-pageup': 'core:select-page-up'
|
|
|
|
'shift-pagedown': 'core:select-page-down'
|
|
|
|
'delete': 'core:delete'
|
|
|
|
'shift-delete': 'core:cut'
|
|
|
|
|
|
|
|
# Inputs are native by default.
|
2015-03-05 10:12:50 +08:00
|
|
|
# Also make sure not to catch anything intended for a webview
|
|
|
|
'body input, body textarea, body *[contenteditable], body webview':
|
2015-02-05 10:31:41 +08:00
|
|
|
'up': 'native!'
|
|
|
|
'left': 'native!'
|
|
|
|
'down': 'native!'
|
|
|
|
'right': 'native!'
|
|
|
|
'cmd-up': 'native!'
|
|
|
|
'cmd-left': 'native!'
|
|
|
|
'cmd-down': 'native!'
|
|
|
|
'cmd-right': 'native!'
|
|
|
|
'ctrl-up': 'native!'
|
|
|
|
'ctrl-left': 'native!'
|
|
|
|
'ctrl-down': 'native!'
|
|
|
|
'ctrl-right': 'native!'
|
2015-02-07 07:57:03 +08:00
|
|
|
'shift-up': 'native!'
|
|
|
|
'shift-left': 'native!'
|
|
|
|
'shift-down': 'native!'
|
|
|
|
'shift-right': 'native!'
|
2015-02-07 07:55:37 +08:00
|
|
|
'escape': 'native!'
|
|
|
|
'pageup': 'native!'
|
|
|
|
'pagedown': 'native!'
|
|
|
|
'shift-pageup': 'native!'
|
|
|
|
'shift-pagedown': 'native!'
|
2015-02-05 10:31:41 +08:00
|
|
|
'enter': 'native!'
|
2015-02-07 07:55:37 +08:00
|
|
|
'cmd-enter': 'native!'
|
|
|
|
'ctrl-enter': 'native!'
|
|
|
|
'shift-enter': 'native!'
|
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
|
|
|
'backspace': 'native!'
|
|
|
|
'shift-backspace': 'native!'
|
|
|
|
'delete': 'native!'
|
2015-02-07 07:55:37 +08:00
|
|
|
'shift-delete': 'native!'
|
2015-03-03 07:33:58 +08:00
|
|
|
'cmd-y': 'native!'
|
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
|
|
|
'cmd-z': 'native!'
|
|
|
|
'cmd-Z': 'native!'
|
|
|
|
'cmd-x': 'native!'
|
|
|
|
'cmd-X': 'native!'
|
|
|
|
'cmd-c': 'native!'
|
|
|
|
'cmd-C': 'native!'
|
|
|
|
'cmd-v': 'native!'
|
|
|
|
'cmd-V': 'native!'
|
|
|
|
'cmd-a': 'native!'
|
|
|
|
'cmd-A': 'native!'
|
2015-03-03 07:33:58 +08:00
|
|
|
'cmd-b': 'native!'
|
|
|
|
'cmd-i': 'native!'
|
|
|
|
'cmd-u': 'native!'
|
|
|
|
'ctrl-y': 'native!'
|
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
|
|
|
'ctrl-z': 'native!'
|
|
|
|
'ctrl-Z': 'native!'
|
|
|
|
'ctrl-x': 'native!'
|
|
|
|
'ctrl-X': 'native!'
|
|
|
|
'ctrl-c': 'native!'
|
|
|
|
'ctrl-C': 'native!'
|
|
|
|
'ctrl-v': 'native!'
|
|
|
|
'ctrl-V': 'native!'
|
|
|
|
'ctrl-a': 'native!'
|
|
|
|
'ctrl-A': 'native!'
|
2015-03-03 07:33:58 +08:00
|
|
|
'ctrl-b': 'native!'
|
|
|
|
'ctrl-i': 'native!'
|
|
|
|
'ctrl-u': 'native!'
|
2015-02-05 10:31:41 +08:00
|
|
|
'a': 'native!'
|
|
|
|
'b': 'native!'
|
|
|
|
'c': 'native!'
|
|
|
|
'd': 'native!'
|
|
|
|
'e': 'native!'
|
|
|
|
'f': 'native!'
|
|
|
|
'g': 'native!'
|
|
|
|
'h': 'native!'
|
|
|
|
'i': 'native!'
|
|
|
|
'j': 'native!'
|
|
|
|
'k': 'native!'
|
|
|
|
'l': 'native!'
|
|
|
|
'm': 'native!'
|
|
|
|
'n': 'native!'
|
|
|
|
'o': 'native!'
|
|
|
|
'p': 'native!'
|
|
|
|
'q': 'native!'
|
|
|
|
'r': 'native!'
|
|
|
|
's': 'native!'
|
|
|
|
't': 'native!'
|
|
|
|
'u': 'native!'
|
|
|
|
'v': 'native!'
|
|
|
|
'w': 'native!'
|
|
|
|
'x': 'native!'
|
|
|
|
'y': 'native!'
|
|
|
|
'z': 'native!'
|
|
|
|
'A': 'native!'
|
|
|
|
'B': 'native!'
|
|
|
|
'C': 'native!'
|
|
|
|
'D': 'native!'
|
|
|
|
'E': 'native!'
|
|
|
|
'F': 'native!'
|
|
|
|
'G': 'native!'
|
|
|
|
'H': 'native!'
|
|
|
|
'I': 'native!'
|
|
|
|
'J': 'native!'
|
|
|
|
'K': 'native!'
|
|
|
|
'L': 'native!'
|
|
|
|
'M': 'native!'
|
|
|
|
'N': 'native!'
|
|
|
|
'O': 'native!'
|
|
|
|
'P': 'native!'
|
|
|
|
'Q': 'native!'
|
|
|
|
'R': 'native!'
|
|
|
|
'S': 'native!'
|
|
|
|
'T': 'native!'
|
|
|
|
'U': 'native!'
|
|
|
|
'V': 'native!'
|
|
|
|
'W': 'native!'
|
|
|
|
'X': 'native!'
|
|
|
|
'Y': 'native!'
|
|
|
|
'Z': 'native!'
|
|
|
|
'1': 'native!'
|
|
|
|
'2': 'native!'
|
|
|
|
'3': 'native!'
|
|
|
|
'4': 'native!'
|
|
|
|
'5': 'native!'
|
|
|
|
'6': 'native!'
|
|
|
|
'7': 'native!'
|
|
|
|
'8': 'native!'
|
|
|
|
'9': 'native!'
|
|
|
|
'0': 'native!'
|
|
|
|
'~': 'native!'
|
|
|
|
'!': 'native!'
|
|
|
|
'@': 'native!'
|
|
|
|
'#': 'native!'
|
|
|
|
'$': 'native!'
|
|
|
|
'%': 'native!'
|
|
|
|
'^': 'native!'
|
|
|
|
'&': 'native!'
|
|
|
|
'*': 'native!'
|
|
|
|
'(': 'native!'
|
|
|
|
')': 'native!'
|
|
|
|
'-': 'native!'
|
|
|
|
'_': 'native!'
|
|
|
|
'=': 'native!'
|
|
|
|
'+': 'native!'
|
|
|
|
'[': 'native!'
|
|
|
|
'{': 'native!'
|
|
|
|
']': 'native!'
|
|
|
|
'}': 'native!'
|
|
|
|
'\\': 'native!'
|
|
|
|
'|': 'native!'
|
|
|
|
';': 'native!'
|
|
|
|
':': 'native!'
|
|
|
|
'\'': 'native!'
|
|
|
|
'"': 'native!'
|
|
|
|
'<': 'native!'
|
|
|
|
',': 'native!'
|
|
|
|
'>': 'native!'
|
|
|
|
'.': 'native!'
|
|
|
|
'?': 'native!'
|
|
|
|
'/': 'native!'
|
2015-02-07 06:46:30 +08:00
|
|
|
|
2015-03-05 10:12:50 +08:00
|
|
|
'body input, body textarea, body *[contenteditable]':
|
|
|
|
'tab': 'core:focus-next'
|
|
|
|
'shift-tab': 'core:focus-previous'
|
|
|
|
|
|
|
|
'body webview':
|
|
|
|
'tab': 'native!'
|
|
|
|
'shift-tab': 'native!'
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-07 07:09:51 +08:00
|
|
|
# For menus
|
|
|
|
'body .menu, body .menu, body .menu input':
|
|
|
|
'up': 'menu:move-up'
|
|
|
|
'down': 'menu:move-down'
|
|
|
|
'enter': 'menu:enter'
|
|
|
|
|
|
|
|
# For Popover Component
|
2015-02-07 06:46:30 +08:00
|
|
|
'body .popover-container':
|
|
|
|
'escape': 'popover:close'
|
|
|
|
|
|
|
|
# Tokenizing Text fields
|
|
|
|
|
|
|
|
# The default state. There's no input in the text field and there are no
|
|
|
|
# autocomplete suggestions
|
2015-02-07 07:09:51 +08:00
|
|
|
'.tokenizing-field input':
|
2015-02-07 06:46:30 +08:00
|
|
|
'backspace': 'native!'
|
2015-04-25 00:36:19 +08:00
|
|
|
'delete': 'native!'
|
2015-02-07 06:46:30 +08:00
|
|
|
'tab': 'native!'
|
|
|
|
',': 'native!'
|
|
|
|
|
2015-02-07 07:09:51 +08:00
|
|
|
'.tokenizing-field.empty input':
|
2015-02-07 06:46:30 +08:00
|
|
|
'backspace': 'tokenizing-field:remove'
|
2015-04-25 00:36:19 +08:00
|
|
|
'delete': 'tokenizing-field:remove'
|
2015-02-07 06:46:30 +08:00
|
|
|
|
|
|
|
# When we found a name to suggest
|
2015-02-07 07:09:51 +08:00
|
|
|
'.tokenizing-field.has-suggestions input':
|
2015-02-07 06:46:30 +08:00
|
|
|
',': 'tokenizing-field:add-suggestion'
|
|
|
|
'tab': 'tokenizing-field:add-suggestion'
|
|
|
|
'enter': 'tokenizing-field:add-suggestion'
|
|
|
|
'escape': 'tokenizing-field:cancel'
|
|
|
|
|
|
|
|
# When there is some text in the input field, but we have no suggestion
|
2015-02-07 07:09:51 +08:00
|
|
|
'.tokenizing-field:not(.has-suggestions) input':
|
2015-02-07 06:46:30 +08:00
|
|
|
'tab': 'native!'
|
|
|
|
',': 'tokenizing-field:add-input-value'
|
|
|
|
'enter': 'tokenizing-field:add-input-value'
|
|
|
|
'escape': 'tokenizing-field:cancel'
|