From 8645a5b9c8ac159122e71c2328d986b1f3c9d78c Mon Sep 17 00:00:00 2001 From: "mr. m" <91018726+mr-cheffy@users.noreply.github.com> Date: Fri, 18 Sep 2026 16:40:31 +0200 Subject: [PATCH] gh-15462: Fixed broken folder animations for library (gh-15467) --- locales/en-US/browser/browser/zen-library.ftl | 2 ++ .../zen-icons/common/library/library.svg | 2 +- .../themes/shared/zen-icons/jar.inc.mn | 3 ++ .../zen-icons/nucleo/u-turn-to-left.svg | 5 ++++ src/zen/common/styles/zen-library-widget.css | 2 +- src/zen/library/ZenLibrary.mjs | 13 ++++++--- src/zen/library/moz.build | 1 + .../sections/ZenLibraryHistorySection.mjs | 2 +- .../sections/ZenLibraryMediaSection.mjs | 29 +++++++++++++++++++ .../sections/ZenLibrarySpacesSection.mjs | 2 -- src/zen/library/zen-library.css | 6 ++-- src/zen/tabs/zen-tabs/vertical-tabs.css | 7 +++++ 12 files changed, 62 insertions(+), 12 deletions(-) create mode 100644 src/browser/themes/shared/zen-icons/nucleo/u-turn-to-left.svg create mode 100644 src/zen/library/sections/ZenLibraryMediaSection.mjs diff --git a/locales/en-US/browser/browser/zen-library.ftl b/locales/en-US/browser/browser/zen-library.ftl index 5ce0ce675..fb3009f35 100644 --- a/locales/en-US/browser/browser/zen-library.ftl +++ b/locales/en-US/browser/browser/zen-library.ftl @@ -14,6 +14,7 @@ library-footer-donate-button = library-history-section-title = History library-downloads-section-title = Downloads library-boosts-section-title = Boosts +library-media-section-title = Media library-spaces-section-title = Spaces library-filter-button = Filter @@ -33,6 +34,7 @@ library-history-site-other = Other library-history-search-placeholder = .placeholder = Search History… library-history-empty = No history found +library-media-empty = No media found library-history-forget-button = .title = Remove from history library-history-reopen-button = diff --git a/src/browser/themes/shared/zen-icons/common/library/library.svg b/src/browser/themes/shared/zen-icons/common/library/library.svg index 1ce2a1be7..fcfc754dc 100644 --- a/src/browser/themes/shared/zen-icons/common/library/library.svg +++ b/src/browser/themes/shared/zen-icons/common/library/library.svg @@ -2,7 +2,7 @@ # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. - diff --git a/src/zen/library/sections/ZenLibraryMediaSection.mjs b/src/zen/library/sections/ZenLibraryMediaSection.mjs new file mode 100644 index 000000000..e215edd9b --- /dev/null +++ b/src/zen/library/sections/ZenLibraryMediaSection.mjs @@ -0,0 +1,29 @@ +/* This Source Code Form is subject to the terms of the Mozilla Public + * License, v. 2.0. If a copy of the MPL was not distributed with this + * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ + +import { html } from "chrome://global/content/vendor/lit.all.mjs"; +import { MozLitElement } from "chrome://global/content/lit-utils.mjs"; + +export class ZenLibraryMediaSection extends MozLitElement { + static id = "media"; + static label = "library-media-section-title"; + + static render(library) { + return html` + + `; + } + + render() { + return html` +
+ `; + } +} + +customElements.define("zen-library-media-section", ZenLibraryMediaSection); diff --git a/src/zen/library/sections/ZenLibrarySpacesSection.mjs b/src/zen/library/sections/ZenLibrarySpacesSection.mjs index 2ed7442ac..083db7fb5 100644 --- a/src/zen/library/sections/ZenLibrarySpacesSection.mjs +++ b/src/zen/library/sections/ZenLibrarySpacesSection.mjs @@ -32,8 +32,6 @@ const STRIP_EVENTS = [ "TabGroupCreate", "TabGroupRemoved", "TabGroupMoved", - "TabGroupCollapse", - "TabGroupExpand", ]; const SHOWN_ATTRIBUTES = ["label", "image", "pending", "muted", "soundplaying"]; diff --git a/src/zen/library/zen-library.css b/src/zen/library/zen-library.css index e24c30363..b25b64165 100644 --- a/src/zen/library/zen-library.css +++ b/src/zen/library/zen-library.css @@ -14,13 +14,13 @@ --toolbox-progress: min(1, calc(var(--library-progress) * 1.5)); transform: scale(calc(1 - var(--toolbox-progress) * 0.04)); - opacity: calc(1 - var(--toolbox-progress)); + opacity: calc(1 - var(--toolbox-progress)) !important; } #zen-main-app-wrapper[zen-compact-mode="true"] #navigator-toolbox { @media -moz-pref('zen.view.compact.hide-tabbar') or -moz-pref('zen.view.use-single-toolbar') { transform: translateX(calc(var(--toolbox-progress) * -100%)); - opacity: 1; + opacity: 1 !important; } } @@ -234,7 +234,7 @@ zen-library[transitioning] { } } -@media (max-height: 275px) { +@media (max-height: 575px) { .zen-library-tab { & label { display: none; diff --git a/src/zen/tabs/zen-tabs/vertical-tabs.css b/src/zen/tabs/zen-tabs/vertical-tabs.css index 713fe8717..2ea476edb 100644 --- a/src/zen/tabs/zen-tabs/vertical-tabs.css +++ b/src/zen/tabs/zen-tabs/vertical-tabs.css @@ -454,6 +454,13 @@ zen-library { } } +@media (-moz-platform: macos) { + #zen-sidebar-foot-buttons, + #zen-library-footer { + --zen-toolbar-button-size: 20px; + } +} + #zen-sidebar-foot-buttons { position: relative; background: transparent;