Zulip server and web application. Open-source team chat that helps teams stay productive and focused.
settings: Use tippy tooltip instead of title attribute for group name.
Sahil Batra6137be232b0e
diff --git a/web/src/tippyjs.ts b/web/src/tippyjs.tsindex 71ebbe8bb73..94292080158 100644--- a/web/src/tippyjs.ts+++ b/web/src/tippyjs.ts@@ -186,17 +186,17 @@ export function initialize(): void {});tippy.delegate("body", {- target: "#subscription_overlay .subscription_settings .sub-stream-name",+ target: "#subscription_overlay .subscription_settings .sub-stream-name, #groups_overlay .user_group_settings_wrapper .group-name",delay: LONG_HOVER_DELAY,appendTo: () => document.body,placement: "top",onShow(instance) {- const stream_name_element = instance.reference;- assert(stream_name_element instanceof HTMLElement);- // Only show tooltip if the stream name is truncated.+ const name_element = instance.reference;+ assert(name_element instanceof HTMLElement);+ // Only show tooltip if the stream or group name is truncated.// See https://stackoverflow.com/questions/21064101/understanding-offsetwidth-clientwidth-scrollwidth-and-height-respectively// for more details.- if (stream_name_element.offsetWidth >= stream_name_element.scrollWidth) {+ if (name_element.offsetWidth >= name_element.scrollWidth) {return false;}diff --git a/web/templates/user_group_settings/user_group_settings.hbs b/web/templates/user_group_settings/user_group_settings.hbsindex 3b03ef23ba1..2b58c5e6dbb 100644--- a/web/templates/user_group_settings/user_group_settings.hbs+++ b/web/templates/user_group_settings/user_group_settings.hbs@@ -24,7 +24,7 @@<div class="group-banner"></div><div class="group-header"><div class="group-name-wrapper">- <span class="group-name" title="{{group.name}}">{{group.name}}</span>+ <span class="group-name" data-tippy-content="{{group.name}}">{{group.name}}</span></div><div class="group_change_property_info alert-notification"></div><div class="button-group">