From fa6e4812247a29f597cedf08f40235fcb143aded Mon Sep 17 00:00:00 2001
From: shamoon <4887959+shamoon@users.noreply.github.com>
Date: Sun, 30 Aug 2026 08:48:07 -0700
Subject: [PATCH] Fix: responsive sidebar, centralize and make sizes saner
(#13863)
---
.../app-frame/app-frame.component.html | 45 ++++++++++---------
.../app-frame/app-frame.component.scss | 34 +++++++++-----
.../upload-file-widget.component.html | 2 +-
src-ui/src/print.scss | 4 +-
src-ui/src/styles.scss | 21 +++++----
5 files changed, 61 insertions(+), 45 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 e0b2cc8a5..165f0da35 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
@@ -73,7 +73,7 @@
+ [ngClass]="slimSidebarEnabled ? 'col-slim' : 'col-sidebar-expanded'">
diff --git a/src-ui/src/app/components/app-frame/app-frame.component.scss b/src-ui/src/app/components/app-frame/app-frame.component.scss
index 7df8c46ae..ec94b0fb8 100644
--- a/src-ui/src/app/components/app-frame/app-frame.component.scss
+++ b/src-ui/src/app/components/app-frame/app-frame.component.scss
@@ -11,6 +11,7 @@
border-right: 1px solid color-mix(in srgb, var(--bs-border-color) 65%, transparent);
overflow-y: auto;
--pngx-sidebar-width: 100%;
+ width: var(--pngx-sidebar-width);
max-width: var(--pngx-sidebar-width);
transition: all .2s ease;
@@ -32,17 +33,10 @@
display: none !important;
}
- // These come from the col-* classes for non-slim sidebar, needed for animation
@media (min-width: 768px) {
- --pngx-sidebar-width: 25%;
- }
-
- @media (min-width: 992px) {
- --pngx-sidebar-width: 16.66666667%;
- }
-
- @media (min-width: 2400px) {
- --pngx-sidebar-width: 8.33333333%;
+ &.expanded {
+ --pngx-sidebar-width: var(--pngx-sidebar-expanded-width);
+ }
}
}
@media (max-width: 767.98px) {
@@ -260,6 +254,26 @@ main {
}
}
+.sidebar .nav-link:has(> .nav-link-label) {
+ display: flex;
+ align-items: center;
+ min-width: 0;
+
+ > i-bs {
+ flex: 0 0 auto;
+ }
+
+ > .nav-link-label {
+ min-width: 0;
+ overflow: hidden;
+ text-overflow: ellipsis;
+ }
+}
+
+.sidebar:not(.slim):not(.animating) .nav-link > .nav-link-label {
+ overflow: hidden;
+}
+
.sidebar .nav-anchor, .sidebar .nav-label {
padding: .25rem .7rem;
}
diff --git a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html
index 14f8cc230..71ac6157f 100644
--- a/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html
+++ b/src-ui/src/app/components/dashboard/widgets/upload-file-widget/upload-file-widget.component.html
@@ -9,7 +9,7 @@
@if (getStatus().length > 0) {
-