Skip to content

armgit / zulip

Public Imported from GitHub
0

Zulip server and web application. Open-source team chat that helps teams stay productive and focused.

hotkey: Change inbox hotkey from `shift + t` to `shift + i`.

Aman Agrawalf16273c488ce
diff --git a/web/src/hotkey.js b/web/src/hotkey.js
index d8516c46032..9b0d58eef60 100644
--- a/web/src/hotkey.js
+++ b/web/src/hotkey.js
@@ -144,6 +144,7 @@ const keypress_mappings = {
67: {name: "C_deprecated", message_view_only: true}, // 'C'
68: {name: "stream_cycle_forward", message_view_only: true}, // 'D'
71: {name: "G_end", message_view_only: true}, // 'G'
+ 73: {name: "open_inbox", message_view_only: true}, // 'I'
74: {name: "vim_page_down", message_view_only: true}, // 'J'
75: {name: "vim_page_up", message_view_only: true}, // 'K'
77: {name: "toggle_topic_visibility_policy", message_view_only: true}, // 'M'
@@ -151,7 +152,6 @@ const keypress_mappings = {
82: {name: "respond_to_author", message_view_only: true}, // 'R'
83: {name: "toggle_stream_subscription", message_view_only: true}, // 'S'
85: {name: "mark_unread", message_view_only: true}, // 'U'
- 84: {name: "open_inbox", message_view_only: true}, // 'T'
86: {name: "view_selected_stream", message_view_only: false}, // 'V'
97: {name: "all_messages", message_view_only: true}, // 'a'
99: {name: "compose", message_view_only: true}, // 'c'
diff --git a/web/templates/left_sidebar.hbs b/web/templates/left_sidebar.hbs
index 60d379bb710..69a646b09ad 100644
--- a/web/templates/left_sidebar.hbs
+++ b/web/templates/left_sidebar.hbs
@@ -14,8 +14,8 @@
<span class="arrow all-messages-sidebar-menu-icon hidden-for-spectators"><i class="zulip-icon zulip-icon-more-vertical" aria-hidden="true"></i></span>
</li>
{{#if development_environment}}
- <li class="top_left_inbox top_left_row hidden-for-spectators" title="{{t 'Inbox' }} (t)">
- <a href="#inbox">
+ <li class="top_left_inbox top_left_row hidden-for-spectators">
+ <a href="#inbox" class="tippy-left-sidebar-tooltip global-filter-container" data-tooltip-template-id="inbox-tooltip-template">
<span class="filter-icon">
<i class="zulip-icon zulip-icon-inbox" aria-hidden="true"></i>
</span>
diff --git a/web/templates/tooltip_templates.hbs b/web/templates/tooltip_templates.hbs
index 30e1c3c7542..dfaafec9249 100644
--- a/web/templates/tooltip_templates.hbs
+++ b/web/templates/tooltip_templates.hbs
@@ -79,6 +79,10 @@
{{t 'Recent conversations' }}
{{tooltip_hotkey_hints "T"}}
</template>
+<template id="inbox-tooltip-template">
+ {{t 'Inbox' }}
+ {{tooltip_hotkey_hints "Shift" "I"}}
+</template>
<template id="drafts-tooltip-template">
{{t 'Drafts' }}
{{tooltip_hotkey_hints "D"}}
diff --git a/web/tests/hotkey.test.js b/web/tests/hotkey.test.js
index 39fcac98fa5..afc002a1d51 100644
--- a/web/tests/hotkey.test.js
+++ b/web/tests/hotkey.test.js
@@ -273,7 +273,7 @@ run_test("allow normal typing when processing text", ({override, override_rewire
// Unmapped keys should immediately return false, without
// calling any functions outside of hotkey.js.
assert_unmapped("bfoyz");
- assert_unmapped("BEFHILNOQWXYZ");
+ assert_unmapped("BEFHLNOQTWXYZ");
// All letters should return false if we are composing text.
override_rewire(hotkey, "processing_text", () => true);