Mailspring/keymaps/base.cson

244 lines
5.6 KiB
Text
Raw Normal View History

# Email-specific core key-mappings
#
# 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...
'body':
'c' : 'application:new-message' # Gmail
'/' : 'application:focus-search' # Gmail
'r' : 'application:reply' # Gmail
'R' : 'application:reply-all' # Edgehill
'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
'escape': 'application:pop-sheet'
feat(thread-list): Multiple selection, bulk actions, refactoring Summary: This diff provides multi-selection in the thread list powered by a new ModelList component that implements selection on top of ListTabular (or soon another List component). It includes business logic for single selection, shift selection, command-click selection, etc. This diff also improves the performance of DatabaseView by assessing whether updates are required based on specific database changes and skipping queries in many scenarios. WIP WIP Move selection into modelView instead of store WIP Preparing to convert to ModelList mixin Make ThreadStore => ThreadListStore Break the DraftStore in two (new DraftListStore) to avoid keeping all drafts in all windows Get rid of unread instance variable in favor of getter that falls through to isUnread() Much smarter logic in DatabaseView to prevent needless queries (especially counts and full invalidation of retained range) Squashed commit of the following: commit 486516b540e659735675765ca8b20d8a107ee2a9 Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 17:30:23 2015 -0700 Invalidate the retained range debounced commit 7ac80403f52d108696c555f79c4c687d969f0228 Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 17:30:16 2015 -0700 Wait until after the view updates to move focus commit 88d66eb19a9710847ff98bea22045bb686f30cc6 Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 17:28:01 2015 -0700 Bail out early when loading data if a reload has been requested commit a49bedc44687040f7c675ff298376917a0b5fdcb Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 16:38:58 2015 -0700 Log query data when in a query is being logged commit c64a9e02f9072fd30edb98c45be581d6ac00c48a Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 16:38:45 2015 -0700 Mark thread and messages as read in parallel instead of in sequence commit 4b227100a795e20257cda0d60b00cc75b0000b0f Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 16:38:32 2015 -0700 Don't load tags with hardcoded IDs from the database, and load them in parallel instead of in sequence commit aeb7f1d646786cfa1c247fe78ce5467da07c4446 Author: Ben Gotow <bengotow@gmail.com> Date: Tue Apr 7 16:37:54 2015 -0700 Pass objects instead of ids to thread methods—since we always have the most current thread anyway, this makes things a bit faster commit e70889d1d05ece81a081b8b3f27b62491429b6f9 Author: Ben Gotow <bengotow@gmail.com> Date: Mon Apr 6 16:41:49 2015 -0700 [icon] Paper airplanes Restyle account sidebar, optimize tag count queries a bit more Fix initialization issue with webkit image mask Can't compare dates with is/isnt Assets for check boxes Bug fixes Wrap ModelList instead of providing props Verbose mode for database view Fix existing specs Six new specs covering invalidateIfItemsInconsistent Test Plan: Run 40+ new tests Reviewers: evan Reviewed By: evan Differential Revision: https://review.inboxapp.com/D1410
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'
# Default cross-platform core behaviors
'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.
# Also make sure not to catch anything intended for a webview
'body input, body textarea, body *[contenteditable], body webview':
'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!'
'escape': 'native!'
'pageup': 'native!'
'pagedown': 'native!'
'shift-pageup': 'native!'
'shift-pagedown': 'native!'
'enter': 'native!'
'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!'
'shift-delete': 'native!'
'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!'
'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!'
'ctrl-b': 'native!'
'ctrl-i': 'native!'
'ctrl-u': '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!'
'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!'
'body input, body textarea, body *[contenteditable]':
'tab': 'core:focus-next'
'shift-tab': 'core:focus-previous'
'body webview':
'tab': 'native!'
'shift-tab': 'native!'
# For menus
'body .menu, body .menu, body .menu input':
'up': 'menu:move-up'
'down': 'menu:move-down'
'enter': 'menu:enter'
# For Popover Component
'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
'.tokenizing-field input':
'backspace': 'native!'
feat(salesforce): add Salesforce creator Summary: tests on the schemas build input elements form builder pulls data grouping by row salesforce object store salesforce api logic successfully pulling salesforce objects into db object store saving to db refactoring tokenizing text field full documented tokenizing text field with specs linking in object picker component converting generated form to a controlled input form change handlers for controlled inputs Salesforce object creator store new way of opening windows removed atom.state.mode create new salesforce object creator in new window form creator loading in popup with generated form generated form renders select and multiselcet and textarea add checkbox creating related objects windnows know when others close remove debugger statements form submission converting data for salesforce posting hot window loading new hot window registration hot loading windows actions for listening to salesforce objects created generated form errors error handling for salesforce object creator rename saleforce object form store display errors to form submitting state passed through properly posts objects to Salesforce change name to salesforce object form add deep clone use formItemEach styling for Salesforce form creator salesforce required fields come back and populate form generated form loads related objects into fields remove console logs and fix sales schema adapter test fix task queue and formbuilder specs fix action bridge spec fix tokenizing text field spec fix draft store and tokenizing proptypes fix linter issues fix tokenizing text field bug rename to refresh window props remove console.log Test Plan: edgehill --test Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://review.inboxapp.com/D1425
2015-04-25 00:36:19 +08:00
'delete': 'native!'
'tab': 'native!'
',': 'native!'
'.tokenizing-field.empty input':
'backspace': 'tokenizing-field:remove'
feat(salesforce): add Salesforce creator Summary: tests on the schemas build input elements form builder pulls data grouping by row salesforce object store salesforce api logic successfully pulling salesforce objects into db object store saving to db refactoring tokenizing text field full documented tokenizing text field with specs linking in object picker component converting generated form to a controlled input form change handlers for controlled inputs Salesforce object creator store new way of opening windows removed atom.state.mode create new salesforce object creator in new window form creator loading in popup with generated form generated form renders select and multiselcet and textarea add checkbox creating related objects windnows know when others close remove debugger statements form submission converting data for salesforce posting hot window loading new hot window registration hot loading windows actions for listening to salesforce objects created generated form errors error handling for salesforce object creator rename saleforce object form store display errors to form submitting state passed through properly posts objects to Salesforce change name to salesforce object form add deep clone use formItemEach styling for Salesforce form creator salesforce required fields come back and populate form generated form loads related objects into fields remove console logs and fix sales schema adapter test fix task queue and formbuilder specs fix action bridge spec fix tokenizing text field spec fix draft store and tokenizing proptypes fix linter issues fix tokenizing text field bug rename to refresh window props remove console.log Test Plan: edgehill --test Reviewers: bengotow Reviewed By: bengotow Differential Revision: https://review.inboxapp.com/D1425
2015-04-25 00:36:19 +08:00
'delete': 'tokenizing-field:remove'
# When we found a name to suggest
'.tokenizing-field.has-suggestions input':
',': '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
'.tokenizing-field:not(.has-suggestions) input':
'tab': 'native!'
',': 'tokenizing-field:add-input-value'
'enter': 'tokenizing-field:add-input-value'
'escape': 'tokenizing-field:cancel'