compose_mobile_button: Use tippyjs for popover.

There are several benefits of using tippyjs here:
* Removes dependency on bootstrap.
* We don't have to manually handle show/hide of popover.
* There cannot be any memory leak since we don't store
  the instance.
This commit is contained in:
Aman Agrawal
2021-06-16 10:37:51 +00:00
committed by Tim Abbott
parent f171b436f3
commit 563f8aba1e
4 changed files with 48 additions and 62 deletions

View File

@@ -6,7 +6,6 @@ import * as message_lists from "./message_lists";
import * as message_store from "./message_store";
import * as narrow_state from "./narrow_state";
import * as people from "./people";
import * as popovers from "./popovers";
import * as recent_topics_util from "./recent_topics_util";
function update_stream_button(btn_text, title) {
@@ -113,22 +112,10 @@ export function initialize() {
// Click handlers for buttons in the compose compose box.
$("body").on("click", ".compose_stream_button", () => {
popovers.hide_mobile_message_buttons_popover();
compose_actions.start("stream", {trigger: "new topic button"});
});
$("body").on("click", ".compose_private_button", () => {
popovers.hide_mobile_message_buttons_popover();
compose_actions.start("private");
});
$("body").on("click", ".compose_mobile_stream_button", () => {
popovers.hide_mobile_message_buttons_popover();
compose_actions.start("stream", {trigger: "new topic button"});
});
$("body").on("click", ".compose_mobile_private_button", () => {
popovers.hide_mobile_message_buttons_popover();
compose_actions.start("private");
});