Skip to content

Commit e71e6fb

Browse files
committed
core/ui: Add UI elements to markdown help view on toggling.
This commit adds: * member function show_markdown_help() to trigger the popup. * keypress event in `ui.py` to trigger the popup. Fixes zulip#623.
1 parent e0556f5 commit e71e6fb

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

zulipterminal/core.py

+5
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@
2727
FullRawMsgView,
2828
FullRenderedMsgView,
2929
HelpView,
30+
MarkdownHelpView,
3031
MsgInfoView,
3132
NoticeView,
3233
PopUpConfirmationView,
@@ -242,6 +243,10 @@ def show_help(self) -> None:
242243
help_view = HelpView(self, "Help Menu (up/down scrolls)")
243244
self.show_pop_up(help_view, "area:help")
244245

246+
def show_markdown_help(self) -> None:
247+
markdown_view = MarkdownHelpView(self, "Markdown Help Menu (up/down scrolls)")
248+
self.show_pop_up(markdown_view, "area:help")
249+
245250
def show_topic_edit_mode(self, button: Any) -> None:
246251
self.show_pop_up(EditModeView(self, button), "area:msg")
247252

zulipterminal/ui.py

+3
Original file line numberDiff line numberDiff line change
@@ -275,6 +275,9 @@ def keypress(self, size: urwid_Box, key: str) -> Optional[str]:
275275
# Show help menu
276276
self.controller.show_help()
277277
return key
278+
elif is_command_key("MARKDOWN_HELP", key):
279+
self.controller.show_markdown_help()
280+
return key
278281
# replace alternate keys with arrow/functional keys
279282
# This is needed for navigating in widgets
280283
# other than message_view.

0 commit comments

Comments
 (0)