From e68b9b80ad6c47d05702c162c9e25780da898a3d Mon Sep 17 00:00:00 2001 From: abaevbog Date: Mon, 29 Jan 2024 02:40:09 -0500 Subject: [PATCH] opened tabs menu visibility improvements (#3620) - Added tooltip to display the entire title of the tab on hover - Ellipsize the text of the tab title to display as much of the last word as possible Fixes: #3609 --- chrome/content/zotero/tabs.js | 1 + scss/components/_tabsMenu.scss | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/chrome/content/zotero/tabs.js b/chrome/content/zotero/tabs.js index 6d3907d9b4..6e81c0fdca 100644 --- a/chrome/content/zotero/tabs.js +++ b/chrome/content/zotero/tabs.js @@ -845,6 +845,7 @@ var Zotero_Tabs = new function () { tabName.setAttribute('class', 'zotero-tabs-menu-entry title'); tabName.setAttribute('tabindex', `${index++}`); tabName.setAttribute('aria-label', tab.title); + tabName.setAttribute('tooltiptext', tab.title); // Cross button to close a tab let closeButton = document.createXULElement('toolbarbutton'); diff --git a/scss/components/_tabsMenu.scss b/scss/components/_tabsMenu.scss index ebdebc9fe8..7a279a7180 100644 --- a/scss/components/_tabsMenu.scss +++ b/scss/components/_tabsMenu.scss @@ -44,6 +44,10 @@ // override default description margins margin-bottom: 0; margin-block-start: 0; + // show as much of the description as possible + white-space: nowrap; + min-width: 280px; + text-overflow: ellipsis; } .tab-icon { width: 16px;