Skip to content

Commit f668dea

Browse files
committed
refactor: Change STREAM_DESC to STREAM_INFO.
Similar popups/sections, we have one in the message-actions section (MSG_INFO in msg_actions), one in stream list actions section (STREAM_DESC in stream_list), but also user information in general (USER_INFO in general). Therefore, changing to STREAM_INFO to maintain uniformity.
1 parent 83e4377 commit f668dea

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

tests/ui_tools/test_popups.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -1377,7 +1377,7 @@ def test_footlinks(
13771377
assert footlinks_width == expected_footlinks_width
13781378

13791379
@pytest.mark.parametrize(
1380-
"key", {*keys_for_command("GO_BACK"), *keys_for_command("STREAM_DESC")}
1380+
"key", {*keys_for_command("GO_BACK"), *keys_for_command("STREAM_INFO")}
13811381
)
13821382
def test_keypress_exit_popup(
13831383
self, key: str, widget_size: Callable[[Widget], urwid_Size]

zulipterminal/config/keys.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -278,7 +278,7 @@ class KeyBinding(TypedDict):
278278
'excluded_from_random_tips': True,
279279
'key_category': 'msg_actions',
280280
}),
281-
('STREAM_DESC', {
281+
('STREAM_INFO', {
282282
'keys': ['i'],
283283
'help_text': 'Show/hide stream information & modify settings',
284284
'key_category': 'stream_list',

zulipterminal/ui_tools/buttons.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -242,7 +242,7 @@ def keypress(self, size: urwid_Size, key: str) -> Optional[str]:
242242
self.controller.stream_muting_confirmation_popup(
243243
self.stream_id, self.stream_name
244244
)
245-
elif is_command_key("STREAM_DESC", key):
245+
elif is_command_key("STREAM_INFO", key):
246246
self.model.controller.show_stream_info(self.stream_id)
247247
return super().keypress(size, key)
248248

zulipterminal/ui_tools/views.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -1461,7 +1461,7 @@ def __init__(self, controller: Any, stream_id: int) -> None:
14611461
self.widgets.append(muted_setting)
14621462
self.widgets.append(pinned_setting)
14631463
self.widgets.extend(visual_notification_setting)
1464-
super().__init__(controller, self.widgets, "STREAM_DESC", popup_width, title)
1464+
super().__init__(controller, self.widgets, "STREAM_INFO", popup_width, title)
14651465

14661466
def toggle_mute_status(self, button: Any, new_state: bool) -> None:
14671467
self.controller.model.toggle_stream_muted_status(self.stream_id)
@@ -1498,7 +1498,7 @@ def __init__(self, controller: Any, stream_id: int) -> None:
14981498
)
14991499
widgets = self.make_table_with_categories(stream_users_content, column_width)
15001500

1501-
super().__init__(controller, widgets, "STREAM_DESC", popup_width, title)
1501+
super().__init__(controller, widgets, "STREAM_INFO", popup_width, title)
15021502

15031503
def keypress(self, size: urwid_Size, key: str) -> str:
15041504
if is_command_key("GO_BACK", key) or is_command_key("STREAM_MEMBERS", key):

0 commit comments

Comments
 (0)