Repository: zulip/zulip-terminal

Issue:
Show user popup for sender of message on `u` hotkey 
This would match the behavior in the web app.

Look for the way in which this popup is opened from the user list, and apply the same approach but using the sender of message (only if one is selected).

Note that this is not `U`, which will be a key we use for marking unread, assuming we keep the same shortcut as in the web app.

Comments:

Patch:
diff --git a/docs/hotkeys.md b/docs/hotkeys.md
index db49720..c9677e8 100644
--- a/docs/hotkeys.md
+++ b/docs/hotkeys.md
@@ -58,6 +58,7 @@
 |Add/remove thumbs-up reaction to the current message|<kbd>+</kbd>|
 |Add/remove star status of the current message|<kbd>ctrl</kbd> + <kbd>s</kbd> / <kbd>*</kbd>|
 |Show/hide message information|<kbd>i</kbd>|
+|Show/hide message sender information|<kbd>u</kbd>|
 |Show/hide edit history (from message information)|<kbd>e</kbd>|
 |View current message in browser (from message information)|<kbd>v</kbd>|
 |Show/hide full rendered message (from message information)|<kbd>f</kbd>|
diff --git a/zulipterminal/config/keys.py b/zulipterminal/config/keys.py
index 453b319..27c9f35 100644
--- a/zulipterminal/config/keys.py
+++ b/zulipterminal/config/keys.py
@@ -264,6 +264,11 @@ KEY_BINDINGS: Dict[str, KeyBinding] = {
         'help_text': 'Show/hide message information',
         'key_category': 'msg_actions',
     },
+    'MSG_SENDER_INFO': {
+        'keys': ['u'],
+        'help_text': 'Show/hide message sender information',
+        'key_category': 'msg_actions',
+    },
     'EDIT_HISTORY': {
         'keys': ['e'],
         'help_text': 'Show/hide edit history (from message information)',
diff --git a/zulipterminal/core.py b/zulipterminal/core.py
index 572efd1..b72b1f8 100644
--- a/zulipterminal/core.py
+++ b/zulipterminal/core.py
@@ -314,7 +314,20 @@ class Controller:
 
     def show_user_info(self, user_id: int) -> None:
         self.show_pop_up(
-            UserInfoView(self, user_id, "User Information (up/down scrolls)"),
+            UserInfoView(
+                self, user_id, "User Information (up/down scrolls)", "USER_INFO"
+            ),
+            "area:user",
+        )
+
+    def show_msg_sender_info(self, user_id: int) -> None:
+        self.show_pop_up(
+            UserInfoView(
+                self,
+                user_id,
+                "Message Sender Information (up/down scrolls)",
+                "MSG_SENDER_INFO",
+            ),
             "area:user",
         )
 
diff --git a/zulipterminal/ui_tools/messages.py b/zulipterminal/ui_tools/messages.py
index 021f435..fa35985 100644
--- a/zulipterminal/ui_tools/messages.py
+++ b/zulipterminal/ui_tools/messages.py
@@ -1110,4 +1110,6 @@ class MessageBox(urwid.Pile):
             )
         elif is_command_key("ADD_REACTION", key):
             self.model.controller.show_emoji_picker(self.message)
+        elif is_command_key("MSG_SENDER_INFO", key):
+            self.model.controller.show_msg_sender_info(self.message["sender_id"])
         return key
diff --git a/zulipterminal/ui_tools/views.py b/zulipterminal/ui_tools/views.py
index e27500a..4f63396 100644
--- a/zulipterminal/ui_tools/views.py
+++ b/zulipterminal/ui_tools/views.py
@@ -1083,7 +1083,7 @@ class AboutView(PopUpView):
 
 
 class UserInfoView(PopUpView):
-    def __init__(self, controller: Any, user_id: int, title: str) -> None:
+    def __init__(self, controller: Any, user_id: int, title: str, command: str) -> None:
         display_data = self._fetch_user_data(controller, user_id)
 
         user_details = [
@@ -1096,7 +1096,7 @@ class UserInfoView(PopUpView):
         )
         widgets = self.make_table_with_categories(user_view_content, column_widths)
 
-        super().__init__(controller, widgets, "USER_INFO", popup_width, title)
+        super().__init__(controller, widgets, command, popup_width, title)
 
     @staticmethod
     def _fetch_user_data(controller: Any, user_id: int) -> Dict[str, Any]:


Test patch:
diff --git a/tests/ui_tools/test_popups.py b/tests/ui_tools/test_popups.py
index 3205a13..194888b 100644
--- a/tests/ui_tools/test_popups.py
+++ b/tests/ui_tools/test_popups.py
@@ -272,7 +272,7 @@ class TestUserInfoView:
         )
 
         self.user_info_view = UserInfoView(
-            self.controller, 10000, "User Info (up/down scrolls)"
+            self.controller, 10000, "User Info (up/down scrolls)", "USER_INFO"
         )
 
     @pytest.mark.parametrize(