mirror of
https://github.com/zulip/zulip.git
synced 2025-11-13 18:36:36 +00:00
tippy: Use namespace import for tippy.js.
Names like “delegate”, “Instance”, “Placement”, “Props”, and “ReferenceElement” are much too generic to make sense as named imports. The downside is that we now need to write tippy.default(…) instead of tippy(…) (because ES module namespace objects cannot be callable), but that cost is worthwhile. Signed-off-by: Anders Kaseorg <anders@zulip.com>
This commit is contained in:
committed by
Tim Abbott
parent
87d36d24c9
commit
9b711cda20
@@ -1,6 +1,6 @@
|
||||
import $ from "jquery";
|
||||
import assert from "minimalistic-assert";
|
||||
import tippy from "tippy.js";
|
||||
import * as tippy from "tippy.js";
|
||||
|
||||
import render_section_header from "../templates/buddy_list/section_header.hbs";
|
||||
import render_view_all_subscribers from "../templates/buddy_list/view_all_subscribers.hbs";
|
||||
@@ -166,7 +166,7 @@ export class BuddyList extends BuddyListConf {
|
||||
// This will default to "bottom" placement for this tooltip.
|
||||
placement = "auto";
|
||||
}
|
||||
tippy($elem[0], {
|
||||
tippy.default($elem[0], {
|
||||
// Because the buddy list subheadings are potential click targets
|
||||
// for purposes having nothing to do with the subscriber count
|
||||
// (collapsing/expanding), we delay showing the tooltip until the
|
||||
|
||||
Reference in New Issue
Block a user