From f6c461894b3f3bb76bc9d1a0aa6d390999f0a5f0 Mon Sep 17 00:00:00 2001 From: alphaeusmote <41258468-alphaeusmote@users.noreply.replit.com> Date: Fri, 11 Apr 2025 04:30:35 +0000 Subject: [PATCH] Improve dialog and alert component usability by adding scrollbars and max-height. Replit-Commit-Author: Agent Replit-Commit-Session-Id: 705f2157-ef97-4fbd-89e4-8c7f2ecaea90 Replit-Commit-Screenshot-Url: https://storage.googleapis.com/screenshot-production-us-central1/7ed01c5f-a82d-405a-b728-b2e3d127c60c/0360c05e-a8ef-4b77-bcbe-1de1ce604942.jpg --- client/src/components/ui/alert-dialog.tsx | 2 +- client/src/components/ui/dialog.tsx | 6 ++- client/src/index.css | 50 ++++++++++++++++++++ client/src/pages/ldap-query-builder-page.tsx | 2 +- 4 files changed, 56 insertions(+), 4 deletions(-) diff --git a/client/src/components/ui/alert-dialog.tsx b/client/src/components/ui/alert-dialog.tsx index 8722561..751379b 100644 --- a/client/src/components/ui/alert-dialog.tsx +++ b/client/src/components/ui/alert-dialog.tsx @@ -34,7 +34,7 @@ const AlertDialogContent = React.forwardRef< - {children} +
+ {children} +
Close diff --git a/client/src/index.css b/client/src/index.css index 7537a16..88f8f3d 100644 --- a/client/src/index.css +++ b/client/src/index.css @@ -10,6 +10,31 @@ .drawer-item.active { @apply bg-primary/10 text-primary font-medium; } + + /* Custom scrollbar styling */ + .scrollbar-custom { + scrollbar-width: thin; + scrollbar-color: var(--primary) var(--background); + } + + .scrollbar-custom::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + .scrollbar-custom::-webkit-scrollbar-track { + background: hsl(var(--muted)); + border-radius: 4px; + } + + .scrollbar-custom::-webkit-scrollbar-thumb { + background: hsl(var(--primary) / 0.6); + border-radius: 4px; + } + + .scrollbar-custom::-webkit-scrollbar-thumb:hover { + background: hsl(var(--primary) / 0.8); + } } @layer base { @@ -126,6 +151,31 @@ font-family: 'Roboto', sans-serif; } + /* Apply scrollbar styling globally */ + ::-webkit-scrollbar { + width: 8px; + height: 8px; + } + + ::-webkit-scrollbar-track { + background: hsl(var(--muted)); + border-radius: 4px; + } + + ::-webkit-scrollbar-thumb { + background: hsl(var(--primary) / 0.6); + border-radius: 4px; + } + + ::-webkit-scrollbar-thumb:hover { + background: hsl(var(--primary) / 0.8); + } + + /* Apply consistent sizing and scrolling to dialog content */ + .dialog-content { + @apply max-h-[85vh] overflow-y-auto; + } + .drawer-item.active { @apply bg-opacity-10 bg-primary text-primary border-l-2 border-primary; } diff --git a/client/src/pages/ldap-query-builder-page.tsx b/client/src/pages/ldap-query-builder-page.tsx index 73714d9..a8dc010 100644 --- a/client/src/pages/ldap-query-builder-page.tsx +++ b/client/src/pages/ldap-query-builder-page.tsx @@ -900,7 +900,7 @@ const LdapQueryBuilderPage = () => { Build and test LDAP filters for your Active Directory queries - +