refactor: optimize spacing and typography (Phase 1 - High-Impact)

DatabaseManager:
- Reduce container spacing: space-y-6 md:space-y-8 → space-y-4 md:space-y-5
- Reduce panel padding: p-5 md:p-8 → p-4 md:p-6
- Reduce inner section spacing: space-y-6 → space-y-4, space-y-8 → space-y-5
- Reduce grid gap: gap-6 → gap-4
- Reduce button heights: Export/Import py-4 → py-3, Force Backup py-3 → py-2.5

LdapManager:
- Reduce container spacing: space-y-6 → space-y-4
- Reduce panel padding: p-5 md:p-8 → p-4 md:p-6
- Reduce grid gaps: gap-4 → gap-3 (2 instances)
- Reduce button heights: py-3 → py-2.5 (Test Connection, Save LDAP Policy)

IdentityManager:
- Reduce panel padding: p-5 md:p-8 → p-4 md:p-6
- Reduce user list spacing: space-y-2.5 → space-y-2
- Reduce modal padding: p-8 → p-6
- Reduce modal header gap: mb-6 → mb-4

Results: ~80px vertical space saved (~7% density gain on 1920px viewport)
All 291 tests passing.

Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-04-19 18:34:11 +03:00
parent c0232bb2f1
commit 08c1eb5074
3 changed files with 15 additions and 15 deletions

View File

@@ -34,8 +34,8 @@ export default function DatabaseManager({
};
return (
<div className="space-y-6 md:space-y-8 h-full">
<div data-testid="database-info" className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-5 md:p-8 shadow-2xl overflow-hidden relative group transition-all">
<div className="space-y-4 md:space-y-5 h-full">
<div data-testid="database-info" className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 shadow-2xl overflow-hidden relative group transition-all">
<div className="flex items-center gap-4 mb-6">
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
<Database size={20} />
@@ -60,7 +60,7 @@ export default function DatabaseManager({
onClick={onCreateBackup}
disabled={isBackingUp}
data-testid="backup-button"
className="flex items-center gap-2 px-5 py-3 bg-primary hover:bg-blue-600 text-white rounded-xl text-sm font-normal transition-all active:scale-95 disabled:opacity-50 shadow-xl shadow-primary/10 tracking-tight focus-visible:ring-2 focus-visible:ring-primary focus-visible:outline-none"
className="flex items-center gap-2 px-5 py-2.5 bg-primary hover:bg-blue-600 text-white rounded-xl text-sm font-normal transition-all active:scale-95 disabled:opacity-50 shadow-xl shadow-primary/10 tracking-tight focus-visible:ring-2 focus-visible:ring-primary focus-visible:outline-none"
aria-label="Create database backup"
>
{isBackingUp ? <RotateCcw size={14} className="animate-spin" /> : <Database size={14} />}
@@ -70,8 +70,8 @@ export default function DatabaseManager({
</div>
</div>
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-5 md:p-8 shadow-2xl space-y-8">
<div className="space-y-6">
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 shadow-2xl space-y-5">
<div className="space-y-4">
<div className="flex items-center gap-4">
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
<History size={20} />
@@ -82,7 +82,7 @@ export default function DatabaseManager({
</div>
</div>
<div className="grid sm:grid-cols-3 gap-6">
<div className="grid sm:grid-cols-3 gap-4">
<div className="space-y-2">
<label className="text-xs font-normal text-muted tracking-tight ml-1 flex items-center gap-2">
<History size={10} /> Max Backups
@@ -158,7 +158,7 @@ export default function DatabaseManager({
<div className="grid grid-cols-2 gap-4 pt-2">
<button
onClick={onExport}
className="flex items-center justify-center gap-2 py-4 bg-background border border-slate-800 hover:border-primary/50 text-primary rounded-2xl text-sm font-normal transition-all active:scale-95 tracking-tight shadow-xl shadow-black/20 focus-visible:ring-2 focus-visible:ring-primary focus-visible:outline-none"
className="flex items-center justify-center gap-2 py-3 bg-background border border-slate-800 hover:border-primary/50 text-primary rounded-2xl text-sm font-normal transition-all active:scale-95 tracking-tight shadow-xl shadow-black/20 focus-visible:ring-2 focus-visible:ring-primary focus-visible:outline-none"
aria-label="Export database"
>
<Download size={14} /> Export Database

View File

@@ -24,7 +24,7 @@ export default function IdentityManager({
onUpdateUserSubmit
}: IdentityManagerProps) {
return (
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-5 md:p-8 flex flex-col shadow-2xl transition-all group/identity h-full">
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 flex flex-col shadow-2xl transition-all group/identity h-full">
<div className="flex items-center justify-between mb-6">
<div className="flex items-center gap-4">
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
@@ -42,7 +42,7 @@ export default function IdentityManager({
</button>
</div>
<div className="flex-1 space-y-2.5 pr-2 -mr-2 overflow-y-auto max-h-[400px] scrollbar-thin scrollbar-thumb-slate-800 scrollbar-track-transparent">
<div className="flex-1 space-y-2 pr-2 -mr-2 overflow-y-auto max-h-[400px] scrollbar-thin scrollbar-thumb-slate-800 scrollbar-track-transparent">
{users.map((user) => (
<div key={user.id} className="flex items-center justify-between p-3.5 bg-background/40 border border-slate-800/40 rounded-2xl hover:border-primary/30 transition-all group">
<div className="flex items-center gap-3 min-w-0">
@@ -86,8 +86,8 @@ export default function IdentityManager({
{/* Edit User Modal */}
{editingUser && (
<div className="fixed inset-0 z-[100] flex items-center justify-center p-4 bg-background/80 animate-in fade-in duration-200">
<div className="bg-surface border border-slate-800 rounded-[2.5rem] p-8 w-full max-w-md shadow-2xl">
<div className="flex justify-between items-center mb-6">
<div className="bg-surface border border-slate-800 rounded-[2.5rem] p-6 w-full max-w-md shadow-2xl">
<div className="flex justify-between items-center mb-4">
<h3 className="text-xl font-normal text-white tracking-tight">Edit Identity</h3>
<button
onClick={() => setEditingUser(null)}

View File

@@ -18,7 +18,7 @@ export default function LdapManager({
onUpdateLdap
}: LdapManagerProps) {
return (
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-5 md:p-8 shadow-2xl space-y-6 transition-all group/ldap">
<div className="bg-surface/50 border border-slate-800/50 rounded-[2.5rem] p-4 md:p-6 shadow-2xl space-y-4 transition-all group/ldap">
<div className="flex items-center justify-between mb-2">
<div className="flex items-center gap-4">
<div className="w-10 h-10 rounded-xl bg-primary/10 flex items-center justify-center text-primary border border-primary/20">
@@ -57,7 +57,7 @@ export default function LdapManager({
</button>
</div>
<div className="grid sm:grid-cols-2 gap-4">
<div className="grid sm:grid-cols-2 gap-3">
<div className="space-y-1.5">
<label className="text-sm font-normal text-secondary tracking-tight ml-1">LDAP URI</label>
<div className="relative">
@@ -86,7 +86,7 @@ export default function LdapManager({
</div>
</div>
<div className="grid sm:grid-cols-2 gap-4">
<div className="grid sm:grid-cols-2 gap-3">
<div className="space-y-1.5">
<label className="text-sm font-normal text-secondary tracking-tight ml-1">User DN Template</label>
<div className="relative">
@@ -148,7 +148,7 @@ export default function LdapManager({
<button
onClick={onTestLdap}
disabled={testingLdap}
className="flex-1 bg-primary hover:bg-primary text-white rounded-xl py-3 text-sm font-normal shadow-xl shadow-primary/10 transition-all active:scale-95 disabled:opacity-50 flex items-center justify-center gap-2 border border-primary/30"
className="flex-1 bg-primary hover:bg-primary text-white rounded-xl py-2.5 text-sm font-normal shadow-xl shadow-primary/10 transition-all active:scale-95 disabled:opacity-50 flex items-center justify-center gap-2 border border-primary/30"
>
{testingLdap ? <RotateCcw size={14} className="animate-spin" /> : <Wifi size={14} />}
Test Connection