From dd0a66191930ef1b677c825c5eea62cea4e6e8a6 Mon Sep 17 00:00:00 2001 From: Peyman Honarjoo Date: Wed, 7 Oct 2026 23:02:57 +0330 Subject: [PATCH] refactor(ui): optimize layout responsiveness and component positioning - Switch to dynamic viewport height (dvh) for better mobile support - Implement fixed positioning for chat input using :host-context - Simplify home page layout logic and remove redundant padding - Disable Angular CLI analytics in configuration --- angular.json | 3 +++ src/app/pages/home/home.page.css | 8 ++------ .../shared/ui/ai-chat-input/ai-chat-input.component.css | 8 ++++++++ 3 files changed, 13 insertions(+), 6 deletions(-) diff --git a/angular.json b/angular.json index ea2779d..f469c69 100644 --- a/angular.json +++ b/angular.json @@ -93,5 +93,8 @@ } } } + }, + "cli": { + "analytics": false } } diff --git a/src/app/pages/home/home.page.css b/src/app/pages/home/home.page.css index f5886b4..63c37be 100644 --- a/src/app/pages/home/home.page.css +++ b/src/app/pages/home/home.page.css @@ -3,7 +3,8 @@ flex-direction: column; align-items: center; justify-content: center; - min-height: 100vh; + min-height: 100dvh; + box-sizing: border-box; padding: 2rem 1rem; transition: padding 0.4s ease; position: relative; @@ -31,7 +32,6 @@ .home-page.has-messages { justify-content: flex-end; - padding-bottom: 2rem; background: var(--app-bg); } @@ -146,10 +146,6 @@ padding: 1.25rem 0.75rem; } - .home-page.has-messages { - padding-bottom: 1.25rem; - } - .home-header { top: 1.25rem; } diff --git a/src/app/shared/ui/ai-chat-input/ai-chat-input.component.css b/src/app/shared/ui/ai-chat-input/ai-chat-input.component.css index 988a330..3551584 100644 --- a/src/app/shared/ui/ai-chat-input/ai-chat-input.component.css +++ b/src/app/shared/ui/ai-chat-input/ai-chat-input.component.css @@ -2,6 +2,14 @@ display: block; } +:host-context(.has-messages) { + position: fixed; + bottom: 0; + left: 0; + right: 0; + z-index: 10; +} + .ai-chat-input-wrapper { width: 100%; max-width: 800px;