From 4fb6182b41825a1ebc4eddb80ee0a2bd7bfa2950 Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Tue, 8 Sep 2026 11:55:24 -0700
Subject: [PATCH] Actually hide them
---
.../app-frame/app-frame.component.html | 10 ++++----
.../app-frame/app-frame.component.spec.ts | 23 ++++++++++++++++++-
.../app-frame/app-frame.component.ts | 7 +++++-
3 files changed, 33 insertions(+), 7 deletions(-)
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.html b/src-ui/src/app/components/app-frame/app-frame.component.html
index 6faddbb8a..df3a35710 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.html
+++ b/src-ui/src/app/components/app-frame/app-frame.component.html
@@ -86,7 +86,7 @@
}
}
-
+
Saved Views
-
Workflows
-
}
-
+
{
jest.useRealTimers()
})
+ it('should hide configured sidebar items', () => {
+ settingsService.set(SETTINGS_KEYS.SIDEBAR_HIDDEN_ITEMS, [
+ HideableSidebarItemID.Dashboard,
+ HideableSidebarItemID.Workflows,
+ ])
+ fixture.detectChanges()
+
+ expect(
+ fixture.nativeElement.querySelector('[routerLink="dashboard"]')
+ .parentElement.classList
+ ).toContain('d-none')
+ expect(
+ fixture.nativeElement.querySelector('[routerLink="workflows"]')
+ .parentElement.classList
+ ).toContain('d-none')
+ expect(
+ fixture.nativeElement.querySelector('[routerLink="mail"]').parentElement
+ .classList
+ ).not.toContain('d-none')
+ })
+
it('should show error on toggle slim sidebar if store settings fails', () => {
jest.spyOn(console, 'warn').mockImplementation(() => {})
const toastSpy = jest.spyOn(toastService, 'showError')
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.ts b/src-ui/src/app/components/app-frame/app-frame.component.ts
index 59a2ba18b..39df0e438 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.ts
+++ b/src-ui/src/app/components/app-frame/app-frame.component.ts
@@ -21,7 +21,11 @@ import { Observable } from 'rxjs'
import { first } from 'rxjs/operators'
import { Document } from 'src/app/data/document'
import { SavedView } from 'src/app/data/saved-view'
-import { CollapsibleSection, SETTINGS_KEYS } from 'src/app/data/ui-settings'
+import {
+ CollapsibleSection,
+ HideableSidebarItemID,
+ SETTINGS_KEYS,
+} from 'src/app/data/ui-settings'
import { IfPermissionsDirective } from 'src/app/directives/if-permissions.directive'
import { ComponentCanDeactivate } from 'src/app/guards/dirty-doc.guard'
import { DocumentTitlePipe } from 'src/app/pipes/document-title.pipe'
@@ -98,6 +102,7 @@ export class AppFrameComponent
readonly isMenuCollapsed = signal(true)
readonly slimSidebarAnimating = signal(false)
readonly mobileSearchHidden = signal(false)
+ readonly HideableSidebarItemID = HideableSidebarItemID
private readonly versionSetting = this.settingsService.getSignal(
SETTINGS_KEYS.VERSION
)