From a17d84744108e524b0dc0af764353262fb1c2eb3 Mon Sep 17 00:00:00 2001 From: sametcn99 Date: Sat, 8 Aug 2026 14:33:56 +0300 Subject: [PATCH 1/2] Improve responsive UI shell behavior --- ui/src/common/ConnectionErrorBanner.tsx | 11 +- ui/src/common/ScrollUpButton.tsx | 5 +- ui/src/layout/Header.tsx | 149 +++++++------- ui/src/layout/Layout.tsx | 63 ++++-- ui/src/layout/Navigation.tsx | 260 ++++++++++++++++-------- ui/tsconfig.json | 3 +- 6 files changed, 312 insertions(+), 179 deletions(-) diff --git a/ui/src/common/ConnectionErrorBanner.tsx b/ui/src/common/ConnectionErrorBanner.tsx index 067a7eab1..20c06f9d3 100644 --- a/ui/src/common/ConnectionErrorBanner.tsx +++ b/ui/src/common/ConnectionErrorBanner.tsx @@ -8,16 +8,21 @@ interface ConnectionErrorBannerProps { message: string; } -export const ConnectionErrorBanner = ({height, retry, message}: ConnectionErrorBannerProps) => ( +export const ConnectionErrorBanner = ({ height, retry, message }: ConnectionErrorBannerProps) => (
- + {message}{' '} - ) : null} - - - ); -}); + const mobileAction = (action: VoidFunction) => { + action(); + setNavOpen(false); + }; + + return ( + +
+
+
+ setNavOpen(false)}> + + + + + + {loggedIn && ( +
+ setNavOpen(false)}> + + + setNavOpen(false)}> + + + setNavOpen(false)}> + + + {admin && setNavOpen(false)}> + + } + + mobileAction(showSettings)}> + + + mobileAction(logout)}> + + + +
+ )} + {loggedIn ? userApps : placeholderItems} +
+ + + {showRequestNotification ? ( + + ) : null} + +
+ + ); + } +); const ResponsiveDrawer: React.FC< - DrawerProps & {navOpen: boolean; setNavOpen: (open: boolean) => void} -> = ({navOpen, setNavOpen, children, ...rest}) => ( + DrawerProps & { + navOpen: boolean; + setNavOpen: (open: boolean) => void; + bannerVisible: boolean; + } +> = ({ navOpen, setNavOpen, bannerVisible, children, ...rest }) => ( <> setNavOpen(false)} {...rest}> - setNavOpen(false)} size="large"> - - {children} - + {children} diff --git a/ui/tsconfig.json b/ui/tsconfig.json index 8f946afe6..54f12de5a 100644 --- a/ui/tsconfig.json +++ b/ui/tsconfig.json @@ -36,6 +36,7 @@ "src/setupTests.ts" ], "include": [ - "src" + "src", + "vite-env.d.ts" ] } From f0c163bfbac26aa9d5406ec7014c959960484f9d Mon Sep 17 00:00:00 2001 From: sametcn99 Date: Sat, 8 Aug 2026 15:35:19 +0300 Subject: [PATCH 2/2] Fix UI shell formatting --- ui/src/common/ConnectionErrorBanner.tsx | 4 +- ui/src/layout/Header.tsx | 30 +++--- ui/src/layout/Layout.tsx | 43 ++++---- ui/src/layout/Navigation.tsx | 135 +++++++++++++++--------- 4 files changed, 124 insertions(+), 88 deletions(-) diff --git a/ui/src/common/ConnectionErrorBanner.tsx b/ui/src/common/ConnectionErrorBanner.tsx index 20c06f9d3..3083c0d76 100644 --- a/ui/src/common/ConnectionErrorBanner.tsx +++ b/ui/src/common/ConnectionErrorBanner.tsx @@ -8,7 +8,7 @@ interface ConnectionErrorBannerProps { message: string; } -export const ConnectionErrorBanner = ({ height, retry, message }: ConnectionErrorBannerProps) => ( +export const ConnectionErrorBanner = ({height, retry, message}: ConnectionErrorBannerProps) => (
- + {message}{' '}