feat: update layout height to use dynamic viewport height for better responsiveness

This commit is contained in:
Linus Rath
2026-03-12 16:05:40 +01:00
parent 7fedcb8e58
commit 2a73adf588
5 changed files with 13 additions and 7 deletions
+1 -1
View File
@@ -637,7 +637,7 @@ export default function CalendarPage() {
}; };
return ( return (
<div className="flex h-screen bg-background"> <div className="flex h-dvh bg-background overflow-hidden">
{/* Left Navigation Rail */} {/* Left Navigation Rail */}
{!isMobile && ( {!isMobile && (
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0"> <div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0">
+1 -1
View File
@@ -441,7 +441,7 @@ export default function ContactsPage() {
}; };
return ( return (
<div className="flex h-screen bg-background"> <div className="flex h-dvh bg-background overflow-hidden">
{!isMobile && ( {!isMobile && (
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0"> <div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0">
<NavigationRail <NavigationRail
+1 -1
View File
@@ -827,7 +827,7 @@ export default function Home() {
return ( return (
<DragDropProvider> <DragDropProvider>
<div className="flex flex-col h-screen bg-background overflow-hidden"> <div className="flex flex-col h-dvh bg-background overflow-hidden">
{connectionLost && ( {connectionLost && (
<div className="flex items-center justify-center gap-2 bg-destructive/10 border-b border-destructive/30 text-destructive text-sm py-1.5 px-4 flex-shrink-0"> <div className="flex items-center justify-center gap-2 bg-destructive/10 border-b border-destructive/30 text-destructive text-sm py-1.5 px-4 flex-shrink-0">
<RotateCcw className="h-3.5 w-3.5 animate-spin" /> <RotateCcw className="h-3.5 w-3.5 animate-spin" />
+9 -3
View File
@@ -97,7 +97,7 @@ export default function SettingsPage() {
// Mobile: show content view // Mobile: show content view
if (mobileShowContent) { if (mobileShowContent) {
return ( return (
<div className="flex flex-col h-screen bg-background"> <div className="flex flex-col h-dvh bg-background">
{/* Mobile content header */} {/* Mobile content header */}
<div className="flex items-center gap-2 px-4 h-14 border-b border-border bg-background shrink-0"> <div className="flex items-center gap-2 px-4 h-14 border-b border-border bg-background shrink-0">
<Button <Button
@@ -117,13 +117,16 @@ export default function SettingsPage() {
{renderTabContent()} {renderTabContent()}
</div> </div>
</div> </div>
{/* Bottom Navigation */}
<NavigationRail orientation="horizontal" />
</div> </div>
); );
} }
// Mobile: show tab list // Mobile: show tab list
return ( return (
<div className="flex flex-col h-screen bg-background"> <div className="flex flex-col h-dvh bg-background">
{/* Mobile header */} {/* Mobile header */}
<div className="flex items-center gap-2 px-4 h-14 border-b border-border bg-background shrink-0"> <div className="flex items-center gap-2 px-4 h-14 border-b border-border bg-background shrink-0">
<Button <Button
@@ -155,13 +158,16 @@ export default function SettingsPage() {
))} ))}
</div> </div>
</div> </div>
{/* Bottom Navigation */}
<NavigationRail orientation="horizontal" />
</div> </div>
); );
} }
// Desktop layout // Desktop layout
return ( return (
<div className="flex h-screen bg-background"> <div className="flex h-dvh bg-background">
{/* Navigation Rail */} {/* Navigation Rail */}
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0"> <div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0">
<NavigationRail <NavigationRail
+1 -1
View File
@@ -161,7 +161,7 @@ export function NavigationRail({
if (orientation === "horizontal") { if (orientation === "horizontal") {
return ( return (
<nav <nav
className={cn("flex items-center justify-around bg-background border-t border-border", className)} className={cn("flex items-center justify-around bg-background border-t border-border shrink-0", className)}
role="navigation" role="navigation"
aria-label={t("nav_label")} aria-label={t("nav_label")}
> >