Renamed toggle_topic_mute function to toggle_topic_visibility_policy.
In toggle_topic_visibility_policy function if topic is either muted or
unmuted it will set the topic's visibility_policy to Inherit else, if
stream is muted or unmuted topic's visibility_policy will be set to
unmuted and muted respectively.
Updated set_user_topic_visibility_policy to only show feedback widget
in case of muting topics with hotkey.
Fixes#25125
This commit refactors the topic_menu visible check and hide logic,
since we have already migrated the popover from stream_popover.js.
This last bit of code related to topic_menu is also migrated to
popover_menus.js, and the code is refactored to use the new logic,
which is more common for the popover_menus.js system.
To hide the popover, one possible solution could be to use the
hideAll method from TippyJS. However, this could lead to
unintentional behavior for all the popovers. To prevent this, the
hide method is used for the topic_menu only.
This lets us simplify the long-ish ‘../../static/js’ paths, and will
remove the need for the ‘zrequire’ wrapper.
Signed-off-by: Anders Kaseorg <anders@zulip.com>