Skip to content

Commit 345a5ae

Browse files
Niloth-pneiljp
authored andcommitted
refactor: core: Use a common scroll prompt in popup headers.
1 parent 36d3cc3 commit 345a5ae

File tree

1 file changed

+13
-8
lines changed

1 file changed

+13
-8
lines changed

zulipterminal/core.py

Lines changed: 13 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@
5151

5252
ExceptionInfo = Tuple[Type[BaseException], BaseException, TracebackType]
5353

54+
SCROLL_PROMPT = "(up/down scrolls)"
55+
5456

5557
class Controller:
5658
"""
@@ -246,11 +248,11 @@ def exit_popup(self) -> None:
246248
self.loop.widget = self.view
247249

248250
def show_help(self) -> None:
249-
help_view = HelpView(self, "Help Menu (up/down scrolls)")
251+
help_view = HelpView(self, f"Help Menu {SCROLL_PROMPT}")
250252
self.show_pop_up(help_view, "area:help")
251253

252254
def show_markdown_help(self) -> None:
253-
markdown_view = MarkdownHelpView(self, "Markdown Help Menu (up/down scrolls)")
255+
markdown_view = MarkdownHelpView(self, f"Markdown Help Menu {SCROLL_PROMPT}")
254256
self.show_pop_up(markdown_view, "area:help")
255257

256258
def show_topic_edit_mode(self, button: Any) -> None:
@@ -266,7 +268,7 @@ def show_msg_info(
266268
msg_info_view = MsgInfoView(
267269
self,
268270
msg,
269-
"Message Information (up/down scrolls)",
271+
f"Message Information {SCROLL_PROMPT}",
270272
topic_links,
271273
message_links,
272274
time_mentions,
@@ -315,7 +317,10 @@ def show_about(self) -> None:
315317
def show_user_info(self, user_id: int) -> None:
316318
self.show_pop_up(
317319
UserInfoView(
318-
self, user_id, "User Information (up/down scrolls)", "USER_INFO"
320+
self,
321+
user_id,
322+
f"User Information {SCROLL_PROMPT}",
323+
"USER_INFO",
319324
),
320325
"area:user",
321326
)
@@ -325,7 +330,7 @@ def show_msg_sender_info(self, user_id: int) -> None:
325330
UserInfoView(
326331
self,
327332
user_id,
328-
"Message Sender Information (up/down scrolls)",
333+
f"Message Sender Information {SCROLL_PROMPT}",
329334
"MSG_SENDER_INFO",
330335
),
331336
"area:user",
@@ -345,7 +350,7 @@ def show_full_rendered_message(
345350
topic_links,
346351
message_links,
347352
time_mentions,
348-
"Full rendered message (up/down scrolls)",
353+
f"Full rendered message {SCROLL_PROMPT}",
349354
),
350355
"area:msg",
351356
)
@@ -364,7 +369,7 @@ def show_full_raw_message(
364369
topic_links,
365370
message_links,
366371
time_mentions,
367-
"Full raw message (up/down scrolls)",
372+
f"Full raw message {SCROLL_PROMPT}",
368373
),
369374
"area:msg",
370375
)
@@ -383,7 +388,7 @@ def show_edit_history(
383388
topic_links,
384389
message_links,
385390
time_mentions,
386-
"Edit History (up/down scrolls)",
391+
f"Edit History {SCROLL_PROMPT}",
387392
),
388393
"area:msg",
389394
)

0 commit comments

Comments
 (0)