fix(dashboard): apply workspace layout sizing and independent scroll to databases page

This commit is contained in:
2026-06-14 14:02:57 -07:00
parent 968d3477c2
commit a55a226ed0

View File

@@ -53,24 +53,40 @@ export default function DataTablesPage() {
return ( return (
<div <div
style={{ style={{
minHeight: "100vh", flex: 1,
minHeight: 0,
boxSizing: "border-box",
background: THEME.canvasGradient, background: THEME.canvasGradient,
fontFamily: THEME.font, fontFamily: THEME.font,
padding: "36px 48px", padding: "16px",
display: "flex",
flexDirection: "column",
}} }}
> >
<div style={{ maxWidth: 1400, margin: "0 auto" }}> <Card
padding={0}
style={{
display: "flex",
flexDirection: "column",
flex: 1,
minHeight: 0,
}}
>
<div style={{ padding: "20px 24px" }}>
<PageHeader <PageHeader
title="Databases" title="Databases"
subtitle="Explore the raw schema and rows in your project databases." subtitle="Explore the raw schema and rows in your project databases."
/> />
</div>
<div <div
style={{ style={{
display: "grid", display: "grid",
gridTemplateColumns: "minmax(200px, 280px) minmax(0, 1fr)", gridTemplateColumns: "300px minmax(0, 1fr)",
gap: 28,
alignItems: "stretch", alignItems: "stretch",
flex: 1,
minHeight: 0,
borderTop: `1px solid ${THEME.borderSoft}`,
}} }}
> >
{/* ── Left rail ── */} {/* ── Left rail ── */}
@@ -79,38 +95,39 @@ export default function DataTablesPage() {
minWidth: 0, minWidth: 0,
display: "flex", display: "flex",
flexDirection: "column", flexDirection: "column",
gap: 14, borderRight: `1px solid ${THEME.borderSoft}`,
overflowY: "auto",
}} }}
> >
{showLoading && ( {showLoading && (
<Card>
<div <div
style={{ style={{
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
justifyContent: "center",
padding: "48px 0",
gap: 8, gap: 8,
color: THEME.mid, color: THEME.muted,
fontSize: "0.875rem", fontSize: "0.85rem",
}} }}
> >
<Loader2 size={15} className="animate-spin" /> Loading <Loader2 size={16} className="animate-spin" /> Loading
</div> </div>
</Card>
)} )}
{error && !showLoading && ( {error && !showLoading && (
<Card>
<div <div
style={{ style={{
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
justifyContent: "center",
padding: "48px 0",
gap: 8, gap: 8,
color: THEME.danger, color: THEME.danger,
fontSize: "0.875rem", fontSize: "0.85rem",
}} }}
> >
<AlertCircle size={15} /> {error} <AlertCircle size={16} /> {error}
</div> </div>
</Card>
)} )}
{anatomy && ( {anatomy && (
@@ -120,36 +137,34 @@ export default function DataTablesPage() {
display: "flex", display: "flex",
alignItems: "center", alignItems: "center",
justifyContent: "space-between", justifyContent: "space-between",
padding: "0 4px 8px", padding: "20px 20px 12px 20px",
position: "sticky",
top: 0,
background: THEME.cardBg,
zIndex: 10,
height: "41px",
boxSizing: "border-box",
borderTopLeftRadius: THEME.radius,
}} }}
> >
<h3 <h3
style={{ style={{
fontSize: "0.68rem", fontSize: "0.95rem",
fontWeight: 600, fontWeight: 600,
letterSpacing: "0.12em", color: THEME.ink,
textTransform: "uppercase",
color: THEME.muted,
margin: 0, margin: 0,
}} }}
> >
Databases Databases
</h3> </h3>
<span
style={{
fontSize: "0.7rem",
fontWeight: 600,
color: THEME.mid,
padding: "1px 7px",
borderRadius: 999,
background: THEME.borderSoft,
}}
>
{activeDatabases.length}
</span>
</header> </header>
<div <div
style={{ display: "flex", flexDirection: "column", gap: 10 }} style={{
display: "flex",
flexDirection: "column",
gap: 4,
padding: "0 20px 20px 20px",
}}
> >
{activeDatabases.length === 0 && ( {activeDatabases.length === 0 && (
<div <div
@@ -184,10 +199,9 @@ export default function DataTablesPage() {
<article <article
key={db.uuid} key={db.uuid}
style={{ style={{
background: THEME.cardBg, display: "flex",
border: `1px solid ${THEME.borderSoft}`, flexDirection: "column",
borderRadius: 10, flex: 1,
overflow: "hidden",
}} }}
> >
<div <div
@@ -196,7 +210,7 @@ export default function DataTablesPage() {
alignItems: "center", alignItems: "center",
gap: 8, gap: 8,
width: "100%", width: "100%",
padding: "12px 14px", padding: "16px 20px 8px",
background: "transparent", background: "transparent",
border: "none", border: "none",
font: "inherit", font: "inherit",
@@ -226,7 +240,7 @@ export default function DataTablesPage() {
> >
<div <div
style={{ style={{
fontSize: "0.85rem", fontSize: "0.95rem",
fontWeight: 600, fontWeight: 600,
color: THEME.ink, color: THEME.ink,
marginBottom: 2, marginBottom: 2,
@@ -255,8 +269,7 @@ export default function DataTablesPage() {
</div> </div>
<div <div
style={{ style={{
padding: "8px 10px 12px", padding: "0 8px 16px 8px",
borderTop: `1px solid ${THEME.borderSoft}`,
}} }}
> >
<DatabaseTableTree <DatabaseTableTree
@@ -330,7 +343,7 @@ export default function DataTablesPage() {
</Card> </Card>
</aside> </aside>
</div> </div>
</div> </Card>
</div> </div>
); );
} }