From 53c3deda16b4167a790ce494a64ab558b1a1e595 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristijan=20Ribari=C4=87?= Date: Thu, 28 Nov 2024 10:38:38 +0100 Subject: [PATCH] Updated styles for workspace selector. --- .../places/content/editBookmark-js.patch | 34 ++++++----- .../content/editBookmarkPanel-inc-xhtml.patch | 35 ++++++----- .../shared/places/editBookmark-css.patch | 59 +++++++------------ 3 files changed, 62 insertions(+), 66 deletions(-) diff --git a/src/browser/components/places/content/editBookmark-js.patch b/src/browser/components/places/content/editBookmark-js.patch index 4bb55c00a..9eb664b74 100644 --- a/src/browser/components/places/content/editBookmark-js.patch +++ b/src/browser/components/places/content/editBookmark-js.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/places/content/editBookmark.js b/browser/components/places/content/editBookmark.js -index 9f17174fdd9cc1eaefb4330da1e10f40eeda2f31..cbafb150524af4947218fb6d3ebdadbb05711bc5 100644 +index 9f17174fdd9cc1eaefb4330da1e10f40eeda2f31..e2c38872ee3a5c45d2e288e67d33f9ce24cab2b9 100644 --- a/browser/components/places/content/editBookmark.js +++ b/browser/components/places/content/editBookmark.js @@ -370,6 +370,10 @@ var gEditItemOverlay = { @@ -21,7 +21,7 @@ index 9f17174fdd9cc1eaefb4330da1e10f40eeda2f31..cbafb150524af4947218fb6d3ebdadbb } if (this._paneInfo.bulkTagging) { -@@ -1232,6 +1237,142 @@ var gEditItemOverlay = { +@@ -1232,6 +1237,148 @@ var gEditItemOverlay = { get bookmarkState() { return this._bookmarkState; }, @@ -79,17 +79,26 @@ index 9f17174fdd9cc1eaefb4330da1e10f40eeda2f31..cbafb150524af4947218fb6d3ebdadbb + // Update summary text + this._workspaceSummary.textContent = selectedNames.length + ? selectedNames.join(", ") -+ : "Choose Workspaces"; ++ : "-"; + }, + -+ onWorkspaceDropdownToggle(event) { ++ onWorkspaceDropdownToggle() { + if(document.documentElement.getAttribute("windowtype") === "Places:Organizer") { + return; + } -+ const details = this._workspaceDropdown; -+ const summary = this._workspaceSummary; + -+ if (!details.open) { ++ // Toggle active class on the container ++ const dropdown = this._workspaceList; ++ const button = this._workspaceSummary; ++ ++ dropdown.hidden = !dropdown.hidden; ++ ++ var expander = this._element("workspacesSelectorExpander"); ++ expander.classList.toggle("expander-up", !dropdown.hidden); ++ expander.classList.toggle("expander-down", dropdown.hidden); ++ ++ // Only update summary text when closing the dropdown ++ if (dropdown.hidden) { + const checkboxes = this._workspaceList.querySelectorAll("input[type='checkbox']"); + const selectedLabels = []; + @@ -100,13 +109,10 @@ index 9f17174fdd9cc1eaefb4330da1e10f40eeda2f31..cbafb150524af4947218fb6d3ebdadbb + } + }); + -+ // Update the summary text with comma-separated list of workspace names -+ summary.textContent = selectedLabels.length ++ button.textContent = selectedLabels.length + ? selectedLabels.join(", ") -+ : "Choose Workspaces"; ++ : "-"; + } -+ -+ event.stopPropagation(); + }, + + async _initWorkspaceDropdown(aInfo) { @@ -151,7 +157,7 @@ index 9f17174fdd9cc1eaefb4330da1e10f40eeda2f31..cbafb150524af4947218fb6d3ebdadbb + // Update summary text with comma-separated list + this._workspaceSummary.textContent = selectedNames.length + ? selectedNames.join(", ") -+ : "Choose Workspaces"; ++ : "-"; + + // Handle read-only state + if (this.readOnly) { @@ -164,7 +170,7 @@ index 9f17174fdd9cc1eaefb4330da1e10f40eeda2f31..cbafb150524af4947218fb6d3ebdadbb }; ChromeUtils.defineLazyGetter(gEditItemOverlay, "_folderTree", () => { -@@ -1267,6 +1408,9 @@ for (let elt of [ +@@ -1267,6 +1414,9 @@ for (let elt of [ "locationField", "keywordField", "tagsField", diff --git a/src/browser/components/places/content/editBookmarkPanel-inc-xhtml.patch b/src/browser/components/places/content/editBookmarkPanel-inc-xhtml.patch index edcac1134..363e8d2de 100644 --- a/src/browser/components/places/content/editBookmarkPanel-inc-xhtml.patch +++ b/src/browser/components/places/content/editBookmarkPanel-inc-xhtml.patch @@ -1,5 +1,5 @@ diff --git a/browser/components/places/content/editBookmarkPanel.inc.xhtml b/browser/components/places/content/editBookmarkPanel.inc.xhtml -index 3ec3f094831c2143a818b43d1761a571f0ffa63d..f543639d4d8e8d59e32a0ef866abd85e816d2571 100644 +index 3ec3f094831c2143a818b43d1761a571f0ffa63d..c4dd904604ee10a909bbcc7c03dd0dd3536020b1 100644 --- a/browser/components/places/content/editBookmarkPanel.inc.xhtml +++ b/browser/components/places/content/editBookmarkPanel.inc.xhtml @@ -5,7 +5,7 @@ @@ -29,23 +29,30 @@ index 3ec3f094831c2143a818b43d1761a571f0ffa63d..f543639d4d8e8d59e32a0ef866abd85e