Skip to content

Commit 57832a3

Browse files
authored
Merge pull request #62 from Yashh56/code-improvement
feat: enhance UI stability and refresh settings layout
2 parents 9fcc5bc + a1ea74b commit 57832a3

32 files changed

Lines changed: 263 additions & 200 deletions

src/App.css

Lines changed: 118 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -48,82 +48,103 @@
4848
}
4949

5050
:root {
51-
--radius: 0.75rem;
52-
--background: oklch(1 0 0);
53-
--foreground: oklch(0.145 0 0);
51+
--radius: 0.625rem;
52+
--background: oklch(0.985 0.003 240);
53+
--foreground: oklch(0.18 0.015 252);
5454
--card: oklch(1 0 0);
55-
--card-foreground: oklch(0.145 0 0);
55+
--card-foreground: oklch(0.18 0.015 252);
5656
--popover: oklch(1 0 0);
57-
--popover-foreground: oklch(0.145 0 0);
58-
--primary: oklch(0.205 0 0);
59-
--primary-foreground: oklch(0.985 0 0);
60-
--secondary: oklch(0.97 0 0);
61-
--secondary-foreground: oklch(0.205 0 0);
62-
--muted: oklch(0.97 0 0);
63-
--muted-foreground: oklch(0.556 0 0);
64-
--accent: oklch(0.97 0 0);
65-
--accent-foreground: oklch(0.205 0 0);
57+
--popover-foreground: oklch(0.18 0.015 252);
58+
--primary: oklch(0.55 0.17 238);
59+
--primary-foreground: oklch(0.99 0 0);
60+
--secondary: oklch(0.955 0.01 247);
61+
--secondary-foreground: oklch(0.25 0.025 252);
62+
--muted: oklch(0.95 0.01 247);
63+
--muted-foreground: oklch(0.52 0.025 252);
64+
--accent: oklch(0.94 0.028 238);
65+
--accent-foreground: oklch(0.27 0.075 238);
6666
--destructive: oklch(0.577 0.245 27.325);
67-
--border: oklch(0.922 0 0);
68-
--input: oklch(0.922 0 0);
69-
--ring: oklch(0.708 0 0);
67+
--border: oklch(0.885 0.012 247);
68+
--input: oklch(0.9 0.012 247);
69+
--ring: oklch(0.58 0.17 238);
7070
--chart-1: oklch(0.646 0.222 41.116);
7171
--chart-2: oklch(0.6 0.118 184.704);
7272
--chart-3: oklch(0.398 0.07 227.392);
7373
--chart-4: oklch(0.828 0.189 84.429);
7474
--chart-5: oklch(0.769 0.188 70.08);
75-
--sidebar: oklch(0.985 0 0);
76-
--sidebar-foreground: oklch(0.145 0 0);
77-
--sidebar-primary: oklch(0.205 0 0);
78-
--sidebar-primary-foreground: oklch(0.985 0 0);
79-
--sidebar-accent: oklch(0.97 0 0);
80-
--sidebar-accent-foreground: oklch(0.205 0 0);
81-
--sidebar-border: oklch(0.922 0 0);
82-
--sidebar-ring: oklch(0.708 0 0);
75+
--sidebar: oklch(0.965 0.006 247);
76+
--sidebar-foreground: oklch(0.22 0.02 252);
77+
--sidebar-primary: var(--primary);
78+
--sidebar-primary-foreground: var(--primary-foreground);
79+
--sidebar-accent: oklch(0.93 0.014 247);
80+
--sidebar-accent-foreground: oklch(0.22 0.02 252);
81+
--sidebar-border: oklch(0.875 0.012 247);
82+
--sidebar-ring: var(--ring);
8383

8484
/* New Design System Tokens */
85-
--card-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
86-
--card-shadow-hover: 0 8px 16px rgba(0, 0, 0, 0.15);
87-
--glass-bg: rgba(255, 255, 255, 0.8);
85+
--card-shadow: 0 1px 2px rgba(15, 23, 42, 0.06), 0 12px 32px rgba(15, 23, 42, 0.05);
86+
--card-shadow-hover: 0 12px 36px rgba(15, 23, 42, 0.1);
87+
--glass-bg: rgba(255, 255, 255, 0.78);
8888
--glass-blur: 12px;
89-
--transition-smooth: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
89+
--transition-smooth: all 0.18s cubic-bezier(0.22, 1, 0.36, 1);
9090
--icon-bar-width: 60px;
9191
--command-bar-max-width: 600px;
9292
--slide-out-width: 400px;
93+
--surface: oklch(0.975 0.006 247);
94+
--surface-elevated: oklch(1 0 0);
95+
--surface-subtle: oklch(0.95 0.01 247);
96+
--border-subtle: oklch(0.9 0.012 247);
97+
}
98+
99+
html,
100+
body,
101+
#root {
102+
width: 100%;
103+
height: 100%;
104+
margin: 0;
105+
overflow: hidden;
106+
background: var(--background);
93107
}
94108

95109
.dark {
96-
--background: oklch(0.12 0 0);
97-
--foreground: oklch(0.95 0 0);
98-
--card: oklch(0.16 0 0);
99-
--card-foreground: oklch(0.95 0 0);
100-
--popover: oklch(0.16 0 0);
101-
--popover-foreground: oklch(0.95 0 0);
102-
--primary: oklch(0.7 0.15 250);
103-
--primary-foreground: oklch(0.98 0 0);
104-
--secondary: oklch(0.22 0 0);
105-
--secondary-foreground: oklch(0.95 0 0);
106-
--muted: oklch(0.22 0 0);
107-
--muted-foreground: oklch(0.65 0 0);
108-
--accent: oklch(0.22 0 0);
109-
--accent-foreground: oklch(0.95 0 0);
110+
--background: oklch(0.135 0.012 250);
111+
--foreground: oklch(0.94 0.006 255);
112+
--card: oklch(0.18 0.014 250);
113+
--card-foreground: oklch(0.94 0.006 255);
114+
--popover: oklch(0.18 0.014 250);
115+
--popover-foreground: oklch(0.94 0.006 255);
116+
--primary: oklch(0.68 0.16 235);
117+
--primary-foreground: oklch(0.12 0.02 250);
118+
--secondary: oklch(0.23 0.016 250);
119+
--secondary-foreground: oklch(0.93 0.006 255);
120+
--muted: oklch(0.235 0.014 250);
121+
--muted-foreground: oklch(0.68 0.018 255);
122+
--accent: oklch(0.25 0.035 238);
123+
--accent-foreground: oklch(0.93 0.014 238);
110124
--destructive: oklch(0.65 0.2 25);
111-
--border: oklch(0.28 0 0);
112-
--input: oklch(0.22 0 0);
113-
--ring: oklch(0.7 0.15 250);
125+
--border: oklch(0.31 0.018 250);
126+
--input: oklch(0.26 0.016 250);
127+
--ring: oklch(0.68 0.16 235);
114128
--chart-1: oklch(0.65 0.2 250);
115129
--chart-2: oklch(0.65 0.15 165);
116130
--chart-3: oklch(0.75 0.15 70);
117131
--chart-4: oklch(0.627 0.265 303.9);
118132
--chart-5: oklch(0.645 0.246 16.439);
119-
--sidebar: oklch(0.205 0 0);
120-
--sidebar-foreground: oklch(0.985 0 0);
121-
--sidebar-primary: oklch(0.488 0.243 264.376);
122-
--sidebar-primary-foreground: oklch(0.985 0 0);
123-
--sidebar-accent: oklch(0.269 0 0);
124-
--sidebar-accent-foreground: oklch(0.985 0 0);
125-
--sidebar-border: oklch(1 0 0 / 10%);
126-
--sidebar-ring: oklch(0.556 0 0);
133+
--sidebar: oklch(0.16 0.014 250);
134+
--sidebar-foreground: oklch(0.9 0.008 255);
135+
--sidebar-primary: var(--primary);
136+
--sidebar-primary-foreground: var(--primary-foreground);
137+
--sidebar-accent: oklch(0.24 0.018 250);
138+
--sidebar-accent-foreground: oklch(0.94 0.006 255);
139+
--sidebar-border: oklch(1 0 0 / 9%);
140+
--sidebar-ring: var(--ring);
141+
--card-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset, 0 18px 52px rgba(0, 0, 0, 0.34);
142+
--card-shadow-hover: 0 1px 0 rgba(255, 255, 255, 0.06) inset, 0 22px 64px rgba(0, 0, 0, 0.42);
143+
--glass-bg: rgba(23, 29, 39, 0.76);
144+
--surface: oklch(0.16 0.014 250);
145+
--surface-elevated: oklch(0.19 0.016 250);
146+
--surface-subtle: oklch(0.22 0.016 250);
147+
--border-subtle: oklch(1 0 0 / 8%);
127148
}
128149

129150
/* Theme Variants - Slate */
@@ -183,6 +204,11 @@
183204
body {
184205
@apply bg-background text-foreground antialiased;
185206
font-family: var(--font-sans);
207+
font-feature-settings: "cv02", "cv03", "cv04", "cv11";
208+
text-rendering: optimizeLegibility;
209+
background:
210+
radial-gradient(circle at 18% -10%, color-mix(in oklch, var(--primary) 14%, transparent) 0, transparent 32rem),
211+
linear-gradient(180deg, color-mix(in oklch, var(--background) 96%, white), var(--background));
186212
}
187213

188214
/* Apply monospace font to technical elements */
@@ -257,6 +283,44 @@ code,
257283
background-clip: content-box;
258284
}
259285

286+
.app-surface {
287+
background:
288+
linear-gradient(180deg, color-mix(in oklch, var(--surface) 92%, transparent), var(--background)),
289+
var(--background);
290+
}
291+
292+
.glass-panel {
293+
background: var(--glass-bg);
294+
backdrop-filter: blur(var(--glass-blur));
295+
border-color: var(--border-subtle);
296+
box-shadow: var(--card-shadow);
297+
}
298+
299+
.premium-card {
300+
border-color: var(--border-subtle);
301+
box-shadow: var(--card-shadow);
302+
transition: var(--transition-smooth);
303+
}
304+
305+
.premium-card:hover {
306+
border-color: color-mix(in oklch, var(--primary) 34%, var(--border));
307+
box-shadow: var(--card-shadow-hover);
308+
transform: translateY(-1px);
309+
}
310+
311+
.ide-panel {
312+
background: color-mix(in oklch, var(--card) 88%, transparent);
313+
border-color: var(--border-subtle);
314+
box-shadow: 0 1px 0 rgba(255, 255, 255, 0.04) inset;
315+
}
316+
317+
.hairline-grid {
318+
background-image:
319+
linear-gradient(color-mix(in oklch, var(--border) 38%, transparent) 1px, transparent 1px),
320+
linear-gradient(90deg, color-mix(in oklch, var(--border) 38%, transparent) 1px, transparent 1px);
321+
background-size: 28px 28px;
322+
}
323+
260324
/* Firefox */
261325

262326
/* Route transition helpers for smoother page changes */
@@ -293,4 +357,4 @@ code,
293357
.dark * {
294358
scrollbar-color: rgba(156, 163, 175, 0.2) transparent;
295359
}
296-
}
360+
}

src/components/layout/VerticalIconBar.tsx

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ export default function VerticalIconBar({ dbId, activePanel, onPanelChange }: Ve
4242
] : [];
4343

4444
return (
45-
<nav className="fixed left-0 top-8 h-[calc(100vh-32px)] w-15 bg-background border-r border-border/20 z-40 flex flex-col items-center py-4 gap-2">
45+
<nav className="fixed left-0 top-8 h-[calc(100vh-32px)] w-15 bg-sidebar/90 border-r border-sidebar-border z-40 flex flex-col items-center py-4 gap-2 backdrop-blur-xl shadow-[1px_0_0_rgba(255,255,255,0.03)_inset]">
4646

4747
{/* Global Navigation Icons */}
4848
<div className="flex flex-col gap-2">
@@ -58,10 +58,10 @@ export default function VerticalIconBar({ dbId, activePanel, onPanelChange }: Ve
5858
variant="ghost"
5959
size="icon"
6060
className={`
61-
w-10 h-10 rounded-lg transition-all
61+
w-10 h-10 rounded-lg transition-all duration-150
6262
${active
63-
? 'bg-primary text-primary-foreground shadow-md'
64-
: 'hover:bg-muted text-muted-foreground hover:text-foreground'
63+
? 'bg-primary text-primary-foreground shadow-lg shadow-primary/20'
64+
: 'text-sidebar-foreground/62 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground'
6565
}
6666
`}
6767
>
@@ -80,7 +80,7 @@ export default function VerticalIconBar({ dbId, activePanel, onPanelChange }: Ve
8080
{/* Database-Specific Panel Items (state-based, no navigation) */}
8181
{databasePanelItems.length > 0 && (
8282
<>
83-
<div className="w-8 h-px bg-border/40 my-2" />
83+
<div className="w-8 h-px bg-sidebar-border my-2" />
8484
<div className="flex flex-col gap-2">
8585
{databasePanelItems.map((item) => {
8686
const Icon = item.icon;
@@ -94,10 +94,10 @@ export default function VerticalIconBar({ dbId, activePanel, onPanelChange }: Ve
9494
size="icon"
9595
onClick={() => onPanelChange?.(item.panel)}
9696
className={`
97-
w-10 h-10 rounded-lg transition-all
97+
w-10 h-10 rounded-lg transition-all duration-150
9898
${active
99-
? 'bg-primary text-primary-foreground shadow-md'
100-
: 'hover:bg-muted text-muted-foreground hover:text-foreground'
99+
? 'bg-primary text-primary-foreground shadow-lg shadow-primary/20'
100+
: 'text-sidebar-foreground/62 hover:bg-sidebar-accent hover:text-sidebar-accent-foreground'
101101
}
102102
`}
103103
>

src/components/shared/DataTable.tsx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ export const DataTable = ({
4444

4545
const tableContent = (
4646
<Table>
47-
<TableHeader>
48-
<TableRow className="bg-muted/20 hover:bg-muted/20 border-b border-border/20">
47+
<TableHeader className="sticky top-0 z-10">
48+
<TableRow className="bg-muted/45 hover:bg-muted/45 border-b border-border/30 backdrop-blur-sm">
4949
{showRowNumbers && (
5050
<TableHead className="w-12 text-center text-[11px] font-medium text-muted-foreground/60 px-3 py-2">
5151
#
@@ -54,7 +54,7 @@ export const DataTable = ({
5454
{columns.map((column) => (
5555
<TableHead
5656
key={column}
57-
className="text-xs font-medium font-mono text-muted-foreground/70 whitespace-nowrap px-4 py-2.5 first:pl-4"
57+
className="text-xs font-semibold font-mono text-muted-foreground/80 whitespace-nowrap px-4 py-2.5 first:pl-4"
5858
>
5959
{column}
6060
</TableHead>
@@ -70,7 +70,7 @@ export const DataTable = ({
7070
{data.map((row, index) => (
7171
<TableRow
7272
key={index}
73-
className="group transition-colors hover:bg-muted/10 border-b border-border/10 last:border-0"
73+
className="group transition-colors hover:bg-accent/20 border-b border-border/10 last:border-0"
7474
>
7575
{showRowNumbers && (
7676
<TableCell className="w-12 text-center text-[11px] tabular-nums text-muted-foreground/40 px-3 py-2 font-normal">
@@ -97,7 +97,7 @@ export const DataTable = ({
9797
<Button
9898
variant="ghost"
9999
size="icon"
100-
className="h-7 w-7"
100+
className="h-7 w-7 hover:bg-primary/10"
101101
onClick={() => onEditRow(row)}
102102
title="Edit row"
103103
>
@@ -108,7 +108,7 @@ export const DataTable = ({
108108
<Button
109109
variant="ghost"
110110
size="icon"
111-
className="h-7 w-7"
111+
className="h-7 w-7 hover:bg-destructive/10"
112112
onClick={() => onDeleteRow(row)}
113113
title="Delete row"
114114
>
@@ -127,15 +127,15 @@ export const DataTable = ({
127127
// If maxHeight is "none", render table directly (parent handles scrolling)
128128
if (maxHeight === "none") {
129129
return (
130-
<div className="rounded-md border border-border/20 overflow-x-auto bg-background">
130+
<div className="max-w-full min-w-0 rounded-lg border border-border/50 overflow-x-auto bg-background/70 shadow-sm">
131131
{tableContent}
132132
</div>
133133
);
134134
}
135135

136136
// Otherwise use ScrollArea with maxHeight
137137
return (
138-
<div className="rounded-md border border-border/20 overflow-hidden bg-background">
138+
<div className="max-w-full min-w-0 rounded-lg border border-border/50 overflow-hidden bg-background/70 shadow-sm">
139139
<ScrollArea className="w-full" style={{ maxHeight }}>
140140
{tableContent}
141141
<ScrollBar orientation="horizontal" />
@@ -214,4 +214,4 @@ function formatCellValue(value: any): React.ReactNode {
214214
}
215215

216216
return <span className="text-foreground/90">{strValue}</span>;
217-
}
217+
}

src/components/ui/alert-dialog.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function AlertDialogOverlay({
3636
<AlertDialogPrimitive.Overlay
3737
data-slot="alert-dialog-overlay"
3838
className={cn(
39-
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/50",
39+
"data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 fixed inset-0 z-50 bg-black/60 backdrop-blur-sm",
4040
className
4141
)}
4242
{...props}
@@ -54,7 +54,7 @@ function AlertDialogContent({
5454
<AlertDialogPrimitive.Content
5555
data-slot="alert-dialog-content"
5656
className={cn(
57-
"bg-background data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border p-6 shadow-lg duration-200 sm:max-w-lg",
57+
"bg-popover/95 data-[state=open]:animate-in data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=open]:fade-in-0 data-[state=closed]:zoom-out-95 data-[state=open]:zoom-in-95 fixed top-[50%] left-[50%] z-50 grid w-full max-w-[calc(100%-2rem)] translate-x-[-50%] translate-y-[-50%] gap-4 rounded-lg border border-border/70 p-6 shadow-2xl backdrop-blur-xl duration-200 sm:max-w-lg",
5858
className
5959
)}
6060
{...props}

src/components/ui/button.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,19 @@ import { cva, type VariantProps } from "class-variance-authority"
55
import { cn } from "@/lib/utils"
66

77
const buttonVariants = cva(
8-
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium transition-all disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/50 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
8+
"inline-flex items-center justify-center gap-2 whitespace-nowrap rounded-md text-sm font-medium tracking-[0.005em] transition-all duration-150 disabled:pointer-events-none disabled:opacity-50 [&_svg]:pointer-events-none [&_svg:not([class*='size-'])]:size-4 shrink-0 [&_svg]:shrink-0 outline-none focus-visible:border-ring focus-visible:ring-ring/45 focus-visible:ring-[3px] aria-invalid:ring-destructive/20 dark:aria-invalid:ring-destructive/40 aria-invalid:border-destructive",
99
{
1010
variants: {
1111
variant: {
1212
default: "bg-primary text-primary-foreground hover:bg-primary/90",
1313
destructive:
1414
"bg-destructive text-white hover:bg-destructive/90 focus-visible:ring-destructive/20 dark:focus-visible:ring-destructive/40 dark:bg-destructive/60",
1515
outline:
16-
"border bg-background shadow-xs hover:bg-accent hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/50",
16+
"border border-border/70 bg-background/70 shadow-xs hover:border-primary/35 hover:bg-accent/70 hover:text-accent-foreground dark:bg-input/30 dark:border-input dark:hover:bg-input/55",
1717
secondary:
1818
"bg-secondary text-secondary-foreground hover:bg-secondary/80",
1919
ghost:
20-
"hover:bg-accent hover:text-accent-foreground dark:hover:bg-accent/50",
20+
"hover:bg-accent/80 hover:text-accent-foreground dark:hover:bg-accent/55",
2121
link: "text-primary underline-offset-4 hover:underline",
2222
},
2323
size: {

src/components/ui/card.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ function Card({ className, ...props }: React.ComponentProps<"div">) {
77
<div
88
data-slot="card"
99
className={cn(
10-
"bg-card text-card-foreground flex flex-col gap-6 rounded-xl border py-6 shadow-sm",
10+
"bg-card/95 text-card-foreground flex flex-col gap-6 rounded-lg border border-border/60 py-6 shadow-sm backdrop-blur-sm transition-[border-color,box-shadow,transform]",
1111
className
1212
)}
1313
{...props}

0 commit comments

Comments
 (0)