diff --git a/frontend/src/lib/components/ExploreAssetButton.svelte b/frontend/src/lib/components/ExploreAssetButton.svelte
index de0d70e26e..e2d21aa1ee 100644
--- a/frontend/src/lib/components/ExploreAssetButton.svelte
+++ b/frontend/src/lib/components/ExploreAssetButton.svelte
@@ -1,15 +1,5 @@
+
+
+{#each groups.current ?? [] as group (group.title)}
+
+ {group.title}
+ {#each group.stores as store (`${store.asset.kind}:${store.asset.path}`)}
+
+ {/each}
+{/each}
diff --git a/frontend/src/lib/components/sidebar/FavoritesSection.svelte b/frontend/src/lib/components/sidebar/FavoritesSection.svelte
new file mode 100644
index 0000000000..47a75a2b43
--- /dev/null
+++ b/frontend/src/lib/components/sidebar/FavoritesSection.svelte
@@ -0,0 +1,97 @@
+
+
+
+{#if sidebarPrefs.favorites.val && !isCollapsed && loaded}
+
+
(sectionCollapsed.val = !sectionCollapsed.val)}
+ />
+ {#if !sectionCollapsed.val}
+
+ {#each favoriteManager.current as favorite (`${favorite.kind}:${favorite.path}`)}
+ {@const selected = favorite.href !== '#' && page.url.pathname === favorite.href}
+
+ {:else}
+
Star an item to list it here.
+ {/each}
+
+ {/if}
+
+{/if}
diff --git a/frontend/src/lib/components/sidebar/SettingsMenu.svelte b/frontend/src/lib/components/sidebar/SettingsMenu.svelte
index a1b0f51fdb..881b3f0e13 100644
--- a/frontend/src/lib/components/sidebar/SettingsMenu.svelte
+++ b/frontend/src/lib/components/sidebar/SettingsMenu.svelte
@@ -19,8 +19,12 @@
Gauge,
Trash2,
KeyRound,
- GraduationCap
+ GraduationCap,
+ PanelLeft,
+ Star,
+ Database
} from 'lucide-svelte'
+ import { sidebarPrefs } from './sidebarPrefs.svelte'
import { goto } from '$lib/navigation'
import { type Item } from '$lib/utils'
import { logout } from '$lib/logoutKit'
@@ -227,6 +231,25 @@
icon: darkMode ? Sun : Moon,
action: () => toggleDarkMode()
},
+ {
+ displayName: 'Customize sidebar',
+ icon: PanelLeft,
+ submenuItems: [
+ {
+ displayName: 'Favorites section',
+ icon: Star,
+ toggle: sidebarPrefs.favorites.val,
+ action: () => (sidebarPrefs.favorites.val = !sidebarPrefs.favorites.val)
+ },
+ {
+ displayName: 'Group data pages',
+ description: 'Variables, Resources and Assets under one Data menu',
+ icon: Database,
+ toggle: !sidebarPrefs.splitData.val,
+ action: () => (sidebarPrefs.splitData.val = !sidebarPrefs.splitData.val)
+ }
+ ]
+ },
{
// The email is the label itself; the crown icon carries the admin role.
displayName: $userStore?.non_member
diff --git a/frontend/src/lib/components/sidebar/SidebarContent.svelte b/frontend/src/lib/components/sidebar/SidebarContent.svelte
index 9a74148ba5..890185c5d3 100644
--- a/frontend/src/lib/components/sidebar/SidebarContent.svelte
+++ b/frontend/src/lib/components/sidebar/SidebarContent.svelte
@@ -54,6 +54,8 @@
getServiceIcon
} from '../triggers/native/utils'
import type { NativeServiceName } from '$lib/gen/types.gen'
+ import DataStoresMenuItems from './DataStoresMenuItems.svelte'
+ import { sidebarPrefs } from './sidebarPrefs.svelte'
import {
Menubar,
Menu,
@@ -250,15 +252,21 @@
let sharingLinks = $derived(
mainMenuLinks.filter((l) => SHARING_LABELS.includes(l.label) && !l.disabled)
)
- const groupedLabels = new Set([...MAIN_MENU_GROUPS.flatMap((g) => g.members), ...SHARING_LABELS])
+ // "Customize sidebar" can split the groups back into links of their own.
+ let activeMenuGroups = $derived(sidebarPrefs.splitData.val ? [] : MAIN_MENU_GROUPS)
+ let groupedLabels = $derived(
+ new Set([...activeMenuGroups.flatMap((g) => g.members), ...SHARING_LABELS])
+ )
let ungroupedMainLinks = $derived(mainMenuLinks.filter((l) => !groupedLabels.has(l.label)))
// A disabled MenuLink renders nothing, so its page leaves the menu, and a group with no
// page left leaves the nav.
let mainMenuGroups = $derived(
- MAIN_MENU_GROUPS.map((g) => ({
- ...g,
- links: mainMenuLinks.filter((l) => g.members.includes(l.label) && !l.disabled)
- })).filter((g) => g.links.length > 0)
+ activeMenuGroups
+ .map((g) => ({
+ ...g,
+ links: mainMenuLinks.filter((l) => g.members.includes(l.label) && !l.disabled)
+ }))
+ .filter((g) => g.links.length > 0)
)
let defaultExtraTriggerLinks = $derived([
{
@@ -566,6 +574,9 @@
{/each}
+ {#if group.label === 'Data'}
+
+ {/if}
{/snippet}
{/each}
diff --git a/frontend/src/lib/components/sidebar/sidebarPrefs.svelte.ts b/frontend/src/lib/components/sidebar/sidebarPrefs.svelte.ts
new file mode 100644
index 0000000000..fb0b6e3bd3
--- /dev/null
+++ b/frontend/src/lib/components/sidebar/sidebarPrefs.svelte.ts
@@ -0,0 +1,10 @@
+import { useLocalStorageValue } from '$lib/svelte5Utils.svelte'
+
+/** What "Customize sidebar" in the settings menu changes, per browser. Module-level so the
+ * menu that flips a choice and the sidebar that reads it share one value. */
+export const sidebarPrefs = {
+ /** The starred items as a section of their own. */
+ favorites: useLocalStorageValue('windmill_sidebar_show_favorites', false, 'boolean'),
+ /** Variables, Resources and Assets as links of their own instead of one Data menu. */
+ splitData: useLocalStorageValue('windmill_sidebar_split_data', false, 'boolean')
+}
diff --git a/frontend/src/routes/(root)/(logged)/+layout.svelte b/frontend/src/routes/(root)/(logged)/+layout.svelte
index 6066dd4345..bdd79bd023 100644
--- a/frontend/src/routes/(root)/(logged)/+layout.svelte
+++ b/frontend/src/routes/(root)/(logged)/+layout.svelte
@@ -25,6 +25,7 @@
import SidebarUsage from '$lib/components/sidebar/SidebarUsage.svelte'
import SidebarScrollArea from '$lib/components/sidebar/SidebarScrollArea.svelte'
import AiChatsSection from '$lib/components/sidebar/AiChatsSection.svelte'
+ import FavoritesSection from '$lib/components/sidebar/FavoritesSection.svelte'
import AccountSetupBanner from '$lib/components/sidebar/AccountSetupBanner.svelte'
import FinishAccountSetup from '$lib/components/sidebar/FinishAccountSetup.svelte'
import { accountSetup } from '$lib/components/sidebar/accountSetup.svelte'
@@ -1188,7 +1189,7 @@ outside this layout, and their shortcut must reopen the URL that is their creden
{#snippet settingsMenu(collapsed: boolean)}
-
+
+
+
+
+
+
{#if sessionsShown}
@@ -1320,23 +1326,22 @@ outside this layout, and their shortcut must reopen the URL that is their creden
-
-
-
- {@render settingsMenu(collapsed)}
-
+
+
+ {@render settingsMenu(collapsed)}
+
+
{@render accountSetupBanner(collapsed)}