From ac7216918cd65f3824ba7817dea8f22e61221eaf Mon Sep 17 00:00:00 2001
From: 0x5a4 <54070204+0x5a4@users.noreply.github.com>
Date: Sun, 3 Dec 2023 18:10:04 +0100
Subject: [PATCH] firefox: fix folders not showing in toolbar
Fixes #4568
---
modules/programs/firefox.nix | 15 ++++++++++-----
.../profile-settings-expected-bookmarks.html | 14 +++++++-------
2 files changed, 17 insertions(+), 12 deletions(-)
diff --git a/modules/programs/firefox.nix b/modules/programs/firefox.nix
index 314fc399..3c89b96c 100644
--- a/modules/programs/firefox.nix
+++ b/modules/programs/firefox.nix
@@ -97,13 +97,14 @@ let
directoryToHTML = indentLevel: directory: ''
${indent indentLevel}
${
if directory.toolbar then
- ''Bookmarks Toolbar''
+ ''
+ Bookmarks Toolbar''
else
- "${escapeXML directory.name}"
+ ''${escapeXML directory.name}''
}
${indent indentLevel}
${allItemsToHTML (indentLevel + 1) directory.bookmarks}
- ${indent indentLevel}
'';
+ ${indent indentLevel}
'';
itemToHTMLOrRecurse = indentLevel: item:
if item ? "url" then
@@ -126,7 +127,7 @@ let
Bookmarks Menu
${bookmarkEntries}
-
+
'';
mkNoDuplicateAssertion = entities: entityKind:
@@ -377,7 +378,11 @@ in {
toolbar = mkOption {
type = types.bool;
default = false;
- description = "If directory should be shown in toolbar.";
+ description = ''
+ Make this the toolbar directory. Note, this does _not_
+ mean that this directory will be added to the toolbar,
+ this directory _is_ the toolbar.
+ '';
};
};
}) // {
diff --git a/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html b/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html
index 96a540c2..d19eab61 100644
--- a/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html
+++ b/tests/modules/programs/firefox/profile-settings-expected-bookmarks.html
@@ -6,20 +6,20 @@
Bookmarks
Bookmarks Menu
-
Bookmarks Toolbar
+ Bookmarks Toolbar
- Home Manager
-
+
wikipedia
kernel.org
- Nix sites
+ Nix sites
- homepage
- wiki
-
Nix sites
+ Nix sites
- homepage
- wiki
-
-
-
+
+
+