stream_popover: Reorganize the menu options in the channel popover.

This commit reorganizes the channel actions popover to group related
actions together.

As noted by Alya Abbott in CZO, the logic behind the grouping is as
follows:
* The top section is things you might do as part of your workflow for
  using Zulip.
* The second section is for managing the channel itself.
* "Change color" is kept independently in the last section because of
  how the color picker takes over a big chunk of the menu when opened.

Fixes part of #30529.
This commit is contained in:
Sayam Samal 2024-06-28 14:45:14 +05:30 committed by Tim Abbott
parent c313a85e25
commit b3be4150d9
1 changed files with 14 additions and 12 deletions

View File

@ -9,6 +9,18 @@
<span class="popover-stream-name">{{stream.name}}</span>
</li>
<li role="separator" class="popover-menu-separator"></li>
<li role="none" class="link-item popover-menu-inner-list-item hidden-for-spectators">
<a role="menuitem" class="popover_new_topic_button popover-menu-link" tabindex="0">
<i class="popover-menu-icon zulip-icon zulip-icon-square-plus" aria-hidden="true"></i>
<span class="popover-menu-label">{{t "New topic"}}</span>
</a>
</li>
<li role="none" class="link-item popover-menu-inner-list-item hidden-for-spectators">
<a role="menuitem" class="mark_stream_as_read popover-menu-link" tabindex="0">
<i class="popover-menu-icon zulip-icon zulip-icon-mark-as-read" aria-hidden="true"></i>
<span class="popover-menu-label">{{t "Mark all messages as read"}}</span>
</a>
</li>
{{#if show_go_to_channel_feed}}
<li role="none" class="link-item popover-menu-inner-list-item">
<a role="menuitem" class="stream-popover-go-to-channel-feed popover-menu-link" tabindex="0">
@ -17,6 +29,7 @@
</a>
</li>
{{/if}}
<li role="separator" class="popover-menu-separator"></li>
<li role="none" class="link-item popover-menu-inner-list-item hidden-for-spectators">
<a role="menuitem" class="open_stream_settings popover-menu-link" tabindex="0">
<i class="popover-menu-icon zulip-icon zulip-icon-gear" aria-hidden="true"></i>
@ -34,12 +47,6 @@
{{/if}}
</a>
</li>
<li role="none" class="link-item popover-menu-inner-list-item hidden-for-spectators">
<a role="menuitem" class="mark_stream_as_read popover-menu-link" tabindex="0">
<i class="popover-menu-icon zulip-icon zulip-icon-mark-as-read" aria-hidden="true"></i>
<span class="popover-menu-label">{{t "Mark all messages as read"}}</span>
</a>
</li>
<li role="none" class="link-item popover-menu-inner-list-item hidden-for-spectators">
<a role="menuitem" class="toggle_stream_muted popover-menu-link" tabindex="0">
{{#if stream.is_muted}}
@ -51,18 +58,13 @@
{{/if}}
</a>
</li>
<li role="none" class="link-item popover-menu-inner-list-item hidden-for-spectators">
<a role="menuitem" class="popover_new_topic_button popover-menu-link" tabindex="0">
<i class="popover-menu-icon zulip-icon zulip-icon-square-plus" aria-hidden="true"></i>
<span class="popover-menu-label">{{t "New topic"}}</span>
</a>
</li>
<li role="none" class="link-item popover-menu-inner-list-item hidden-for-spectators">
<a role="menuitem" class="popover_sub_unsub_button popover-menu-link" tabindex="0">
<i class="popover-menu-icon zulip-icon zulip-icon-circle-x" aria-hidden="true"></i>
<span class="popover-menu-label">{{t "Unsubscribe"}}</span>
</a>
</li>
<li role="separator" class="popover-menu-separator"></li>
<li role="none" class="link-item popover-menu-inner-list-item hidden-for-spectators no-auto-hide-left-sidebar-overlay">
<span class="colorpicker-container">
<input stream_id="{{stream.stream_id}}" class="colorpicker" type="text" value="{{stream.color}}" />