From fa63fa952b818793b24fb66436920c1c9c3c0bcc Mon Sep 17 00:00:00 2001
From: Niloth-p <20315308+Niloth-p@users.noreply.github.com>
Date: Fri, 7 Jun 2024 05:09:35 +0530
Subject: [PATCH 1/3] keys: Add new help category to group narrowing commands.
Hotkeys document regenerated.
---
docs/hotkeys.md | 12 ++++++++----
zulipterminal/config/keys.py | 21 +++++++++++----------
2 files changed, 19 insertions(+), 14 deletions(-)
diff --git a/docs/hotkeys.md b/docs/hotkeys.md
index e9846948d9..4f9c8cf59c 100644
--- a/docs/hotkeys.md
+++ b/docs/hotkeys.md
@@ -26,6 +26,14 @@
|Scroll down|PgDn / J|
|Go to bottom / Last message|End / G|
|Trigger the selected entry|Enter / Space|
+
+## Switching Messages View
+|Command|Key Combination|
+| :--- | :---: |
+|Narrow to the stream of the current message|s|
+|Narrow to the topic of the current message|S|
+|Narrow to compose box message recipient|Meta + .|
+|Narrow to a topic/direct-chat, or stream/all-direct-messages|z|
|Narrow to all messages|a / Esc|
|Narrow to all direct messages|P|
|Narrow to all starred messages|f|
@@ -49,9 +57,6 @@
| :--- | :---: |
|Edit message's content or topic|e|
|Show/hide emoji picker for current message|:|
-|Narrow to the stream of the current message|s|
-|Narrow to the topic of the current message|S|
-|Narrow to a topic/direct-chat, or stream/all-direct-messages|z|
|Toggle first emoji reaction on selected message|=|
|Toggle thumbs-up reaction to the current message|+|
|Toggle star status of the current message|Ctrl + s / *|
@@ -90,7 +95,6 @@
|Save current message as a draft|Meta + s|
|Autocomplete @mentions, #stream_names, :emoji: and topics|Ctrl + f|
|Cycle through autocomplete suggestions in reverse|Ctrl + r|
-|Narrow to compose box message recipient|Meta + .|
|Exit message compose box|Esc|
|Insert new line|Enter|
diff --git a/zulipterminal/config/keys.py b/zulipterminal/config/keys.py
index f2111c2c79..5457e626d8 100644
--- a/zulipterminal/config/keys.py
+++ b/zulipterminal/config/keys.py
@@ -170,17 +170,17 @@ class KeyBinding(TypedDict):
'STREAM_NARROW': {
'keys': ['s'],
'help_text': 'Narrow to the stream of the current message',
- 'key_category': 'msg_actions',
+ 'key_category': 'narrowing',
},
'TOPIC_NARROW': {
'keys': ['S'],
'help_text': 'Narrow to the topic of the current message',
- 'key_category': 'msg_actions',
+ 'key_category': 'narrowing',
},
'NARROW_MESSAGE_RECIPIENT': {
'keys': ['meta .'],
'help_text': 'Narrow to compose box message recipient',
- 'key_category': 'compose_box',
+ 'key_category': 'narrowing',
},
'EXIT_COMPOSE': {
'keys': ['esc'],
@@ -191,7 +191,7 @@ class KeyBinding(TypedDict):
'keys': ['z'],
'help_text':
'Narrow to a topic/direct-chat, or stream/all-direct-messages',
- 'key_category': 'msg_actions',
+ 'key_category': 'narrowing',
},
'REACTION_AGREEMENT': {
'keys': ['='],
@@ -206,32 +206,32 @@ class KeyBinding(TypedDict):
'ALL_MESSAGES': {
'keys': ['a', 'esc'],
'help_text': 'Narrow to all messages',
- 'key_category': 'navigation',
+ 'key_category': 'narrowing',
},
'ALL_PM': {
'keys': ['P'],
'help_text': 'Narrow to all direct messages',
- 'key_category': 'navigation',
+ 'key_category': 'narrowing',
},
'ALL_STARRED': {
'keys': ['f'],
'help_text': 'Narrow to all starred messages',
- 'key_category': 'navigation',
+ 'key_category': 'narrowing',
},
'ALL_MENTIONS': {
'keys': ['#'],
'help_text': "Narrow to messages in which you're mentioned",
- 'key_category': 'navigation',
+ 'key_category': 'narrowing',
},
'NEXT_UNREAD_TOPIC': {
'keys': ['n'],
'help_text': 'Next unread topic',
- 'key_category': 'navigation',
+ 'key_category': 'narrowing',
},
'NEXT_UNREAD_PM': {
'keys': ['p'],
'help_text': 'Next unread direct message',
- 'key_category': 'navigation',
+ 'key_category': 'narrowing',
},
'SEARCH_PEOPLE': {
'keys': ['w'],
@@ -449,6 +449,7 @@ class KeyBinding(TypedDict):
HELP_CATEGORIES = {
"general": "General",
"navigation": "Navigation",
+ "narrowing": "Switching Messages View",
"searching": "Searching",
"msg_actions": "Message actions",
"stream_list": "Stream list actions",
From fbaa177cc2b0127b5c9c051671a5e71d47fc739e Mon Sep 17 00:00:00 2001
From: Niloth-p <20315308+Niloth-p@users.noreply.github.com>
Date: Sun, 7 Jul 2024 18:43:40 +0530
Subject: [PATCH 2/3] keys: Re-order the 'narrowing' key bindings.
To make the 'z' hotkey be listed immediately after the related 's' and
'S' hotkeys in the help menu.
---
docs/hotkeys.md | 2 +-
zulipterminal/config/keys.py | 12 ++++++------
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/docs/hotkeys.md b/docs/hotkeys.md
index 4f9c8cf59c..a3fc1abffb 100644
--- a/docs/hotkeys.md
+++ b/docs/hotkeys.md
@@ -32,8 +32,8 @@
| :--- | :---: |
|Narrow to the stream of the current message|s|
|Narrow to the topic of the current message|S|
-|Narrow to compose box message recipient|Meta + .|
|Narrow to a topic/direct-chat, or stream/all-direct-messages|z|
+|Narrow to compose box message recipient|Meta + .|
|Narrow to all messages|a / Esc|
|Narrow to all direct messages|P|
|Narrow to all starred messages|f|
diff --git a/zulipterminal/config/keys.py b/zulipterminal/config/keys.py
index 5457e626d8..02f13b03f2 100644
--- a/zulipterminal/config/keys.py
+++ b/zulipterminal/config/keys.py
@@ -177,6 +177,12 @@ class KeyBinding(TypedDict):
'help_text': 'Narrow to the topic of the current message',
'key_category': 'narrowing',
},
+ 'TOGGLE_NARROW': {
+ 'keys': ['z'],
+ 'help_text':
+ 'Narrow to a topic/direct-chat, or stream/all-direct-messages',
+ 'key_category': 'narrowing',
+ },
'NARROW_MESSAGE_RECIPIENT': {
'keys': ['meta .'],
'help_text': 'Narrow to compose box message recipient',
@@ -187,12 +193,6 @@ class KeyBinding(TypedDict):
'help_text': 'Exit message compose box',
'key_category': 'compose_box',
},
- 'TOGGLE_NARROW': {
- 'keys': ['z'],
- 'help_text':
- 'Narrow to a topic/direct-chat, or stream/all-direct-messages',
- 'key_category': 'narrowing',
- },
'REACTION_AGREEMENT': {
'keys': ['='],
'help_text': 'Toggle first emoji reaction on selected message',
From 70032a56e2bd2ca2414110e387f482b591feabc5 Mon Sep 17 00:00:00 2001
From: Niloth-p <20315308+Niloth-p@users.noreply.github.com>
Date: Fri, 7 Jun 2024 06:40:58 +0530
Subject: [PATCH 3/3] keys: Improve descriptions of hotkeys that switch
narrows.
Replace "Narrow to":
- Use "View" instead of "Narrow to"
- Use "View all" for those corresponding to narrow buttons
- Use "Switch message view" for the compose box message recipient
Rephrasing help texts:
- Use "zoom in/out" to simplify and shorten the longest description,
while also being clear on the choice of key being 'z'
- "compose box message recipient" -> "compose box target" reduces length
and user-friendliness, while retaining clarity
Hotkeys document regenerated.
---
docs/hotkeys.md | 16 ++++++++--------
zulipterminal/config/keys.py | 16 ++++++++--------
2 files changed, 16 insertions(+), 16 deletions(-)
diff --git a/docs/hotkeys.md b/docs/hotkeys.md
index a3fc1abffb..9454ccc538 100644
--- a/docs/hotkeys.md
+++ b/docs/hotkeys.md
@@ -30,14 +30,14 @@
## Switching Messages View
|Command|Key Combination|
| :--- | :---: |
-|Narrow to the stream of the current message|s|
-|Narrow to the topic of the current message|S|
-|Narrow to a topic/direct-chat, or stream/all-direct-messages|z|
-|Narrow to compose box message recipient|Meta + .|
-|Narrow to all messages|a / Esc|
-|Narrow to all direct messages|P|
-|Narrow to all starred messages|f|
-|Narrow to messages in which you're mentioned|#|
+|View the stream of the current message|s|
+|View the topic of the current message|S|
+|Zoom in/out the message's conversation context|z|
+|Switch message view to the compose box target|Meta + .|
+|View all messages|a / Esc|
+|View all direct messages|P|
+|View all starred messages|f|
+|View all messages in which you're mentioned|#|
|Next unread topic|n|
|Next unread direct message|p|
diff --git a/zulipterminal/config/keys.py b/zulipterminal/config/keys.py
index 02f13b03f2..6f84bf2369 100644
--- a/zulipterminal/config/keys.py
+++ b/zulipterminal/config/keys.py
@@ -169,23 +169,23 @@ class KeyBinding(TypedDict):
},
'STREAM_NARROW': {
'keys': ['s'],
- 'help_text': 'Narrow to the stream of the current message',
+ 'help_text': 'View the stream of the current message',
'key_category': 'narrowing',
},
'TOPIC_NARROW': {
'keys': ['S'],
- 'help_text': 'Narrow to the topic of the current message',
+ 'help_text': 'View the topic of the current message',
'key_category': 'narrowing',
},
'TOGGLE_NARROW': {
'keys': ['z'],
'help_text':
- 'Narrow to a topic/direct-chat, or stream/all-direct-messages',
+ "Zoom in/out the message's conversation context",
'key_category': 'narrowing',
},
'NARROW_MESSAGE_RECIPIENT': {
'keys': ['meta .'],
- 'help_text': 'Narrow to compose box message recipient',
+ 'help_text': 'Switch message view to the compose box target',
'key_category': 'narrowing',
},
'EXIT_COMPOSE': {
@@ -205,22 +205,22 @@ class KeyBinding(TypedDict):
},
'ALL_MESSAGES': {
'keys': ['a', 'esc'],
- 'help_text': 'Narrow to all messages',
+ 'help_text': 'View all messages',
'key_category': 'narrowing',
},
'ALL_PM': {
'keys': ['P'],
- 'help_text': 'Narrow to all direct messages',
+ 'help_text': 'View all direct messages',
'key_category': 'narrowing',
},
'ALL_STARRED': {
'keys': ['f'],
- 'help_text': 'Narrow to all starred messages',
+ 'help_text': 'View all starred messages',
'key_category': 'narrowing',
},
'ALL_MENTIONS': {
'keys': ['#'],
- 'help_text': "Narrow to messages in which you're mentioned",
+ 'help_text': "View all messages in which you're mentioned",
'key_category': 'narrowing',
},
'NEXT_UNREAD_TOPIC': {