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 (
<div className="flex h-screen bg-background">
<div className="flex h-dvh bg-background overflow-hidden">
{/* Left Navigation Rail */}
{!isMobile && (
<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 (
<div className="flex h-screen bg-background">
<div className="flex h-dvh bg-background overflow-hidden">
{!isMobile && (
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0">
<NavigationRail
+1 -1
View File
@@ -827,7 +827,7 @@ export default function Home() {
return (
<DragDropProvider>
<div className="flex flex-col h-screen bg-background overflow-hidden">
<div className="flex flex-col h-dvh bg-background overflow-hidden">
{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">
<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
if (mobileShowContent) {
return (
<div className="flex flex-col h-screen bg-background">
<div className="flex flex-col h-dvh bg-background">
{/* Mobile content header */}
<div className="flex items-center gap-2 px-4 h-14 border-b border-border bg-background shrink-0">
<Button
@@ -117,13 +117,16 @@ export default function SettingsPage() {
{renderTabContent()}
</div>
</div>
{/* Bottom Navigation */}
<NavigationRail orientation="horizontal" />
</div>
);
}
// Mobile: show tab list
return (
<div className="flex flex-col h-screen bg-background">
<div className="flex flex-col h-dvh bg-background">
{/* Mobile header */}
<div className="flex items-center gap-2 px-4 h-14 border-b border-border bg-background shrink-0">
<Button
@@ -155,13 +158,16 @@ export default function SettingsPage() {
))}
</div>
</div>
{/* Bottom Navigation */}
<NavigationRail orientation="horizontal" />
</div>
);
}
// Desktop layout
return (
<div className="flex h-screen bg-background">
<div className="flex h-dvh bg-background">
{/* Navigation Rail */}
<div className="w-14 border-r border-border bg-secondary flex flex-col flex-shrink-0">
<NavigationRail
+1 -1
View File
@@ -161,7 +161,7 @@ export function NavigationRail({
if (orientation === "horizontal") {
return (
<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"
aria-label={t("nav_label")}
>