mirror of https://github.com/zulip/zulip.git
user_topic_popover: Keep reference visible when popover is open.
In recent view and inbox view, we keep the topic visibility icon visible when the topic visibility popover is visible.
This commit is contained in:
parent
9a8ebf3a34
commit
402f589e76
|
@ -25,9 +25,10 @@ export function initialize() {
|
|||
onShow(instance) {
|
||||
popover_menus.popover_instances.change_visibility_policy = instance;
|
||||
popover_menus.on_show_prep(instance);
|
||||
const elt = $(instance.reference).closest(".change_visibility_policy").expectOne()[0];
|
||||
const stream_id = $(elt).attr("data-stream-id");
|
||||
const topic_name = $(elt).attr("data-topic-name");
|
||||
const $elt = $(instance.reference).closest(".change_visibility_policy").expectOne();
|
||||
const stream_id = $elt.attr("data-stream-id");
|
||||
const topic_name = $elt.attr("data-topic-name");
|
||||
$elt.addClass("visibility-policy-popover-visible");
|
||||
|
||||
instance.context =
|
||||
popover_menus_data.get_change_visibility_policy_popover_content_context(
|
||||
|
@ -62,6 +63,10 @@ export function initialize() {
|
|||
});
|
||||
},
|
||||
onHidden(instance) {
|
||||
$(instance.reference)
|
||||
.closest(".change_visibility_policy")
|
||||
.expectOne()
|
||||
.removeClass("visibility-policy-popover-visible");
|
||||
instance.destroy();
|
||||
popover_menus.popover_instances.change_visibility_policy = undefined;
|
||||
},
|
||||
|
|
|
@ -442,6 +442,10 @@
|
|||
|
||||
.inbox-row-visibility-policy-inherit {
|
||||
opacity: 0;
|
||||
|
||||
&.visibility-policy-popover-visible {
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
.inbox-action-button {
|
||||
|
|
|
@ -47,6 +47,12 @@
|
|||
box-shadow: 0 3px 0 var(--color-outline-focus);
|
||||
}
|
||||
|
||||
&.change_visibility_policy.visibility-policy-popover-visible {
|
||||
.zulip-icon-inherit {
|
||||
opacity: 0.4;
|
||||
}
|
||||
}
|
||||
|
||||
&.change_visibility_policy .zulip-icon-inherit {
|
||||
opacity: 0;
|
||||
|
||||
|
|
Loading…
Reference in New Issue