Skip to content

Commit 91b6a41

Browse files
YuvalYuval
authored andcommitted
refactor(ui): update positioning classes for consistent header alignment across components
1 parent ba2b66b commit 91b6a41

7 files changed

Lines changed: 15 additions & 11 deletions

File tree

03-Client/src/app/components/CompareSystem.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -184,8 +184,8 @@ export function CompareSystem() {
184184
{/* Scrollable content */}
185185
<div
186186
ref={scrollRef}
187-
className="absolute left-[12px] right-[12px] z-20 overflow-y-auto"
188-
style={{ top: 93, bottom: 105, scrollbarWidth: "none" }}
187+
className="below-header absolute left-[12px] right-[12px] z-20 overflow-y-auto"
188+
style={{ bottom: 105, scrollbarWidth: "none" }}
189189
>
190190
{/* Description */}
191191
<div className="bg-[#f3fbfd] rounded-[12px] p-[14px] mb-[10px]">

03-Client/src/app/components/DictionaryScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -193,8 +193,8 @@ export function DictionaryScreen() {
193193
{/* Content Panel */}
194194
<div
195195
ref={scrollRef}
196-
className="absolute left-[14px] right-[14px] z-20 overflow-y-auto"
197-
style={{ top: 93, bottom: 105, scrollbarWidth: "none" }}
196+
className="below-header absolute left-[14px] right-[14px] z-20 overflow-y-auto"
197+
style={{ bottom: 105, scrollbarWidth: "none" }}
198198
>
199199
<div className="bg-[#f3fbfd] rounded-[14px] p-[16px]">
200200
{/* FAQ Section */}

03-Client/src/app/components/EditHomeAddressScreen.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ export function EditHomeAddressScreen() {
8181
</div>
8282

8383
{/* Content */}
84-
<div className="absolute left-0 right-0 px-[16px]" style={{ top: 93, bottom: 24 }}>
84+
<div className="below-header absolute left-0 right-0 px-[16px]" style={{ bottom: 24 }}>
8585
<p className="font-['Heebo',sans-serif] text-[#6B7280] text-[13px] mb-[16px]" style={{ fontWeight: 500 }}>
8686
הכתובת תופיע באזור האישי ותשמש לשליחת התראות על דיווחים חדשים באזור שלך.
8787
</p>

03-Client/src/app/components/NearbyReportsScreen.tsx

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -411,8 +411,7 @@ export function NearbyReportsScreen() {
411411
animate={{ opacity: 1, y: 0 }}
412412
exit={{ opacity: 0, y: -10 }}
413413
transition={{ duration: 0.25 }}
414-
className="absolute z-30 left-[10px] right-[10px]"
415-
style={{ top: 82 }}
414+
className="below-header-flush absolute z-30 left-[10px] right-[10px]"
416415
>
417416
<div className="bg-[#f3fbfd] rounded-b-[10px] shadow-[0_4px_12px_rgba(0,0,0,0.1)] px-[14px] py-[10px] flex items-center justify-between gap-[8px]" dir="rtl">
418417
<div className="flex-1 min-w-0">

03-Client/src/app/components/SettingsScreen.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -150,8 +150,8 @@ export function SettingsScreen() {
150150
{/* Scrollable content */}
151151
<div
152152
ref={scrollRef}
153-
className="absolute left-0 right-0 z-20 overflow-y-auto"
154-
style={{ top: 93, bottom: 95, scrollbarWidth: "none" }}
153+
className="below-header absolute left-0 right-0 z-20 overflow-y-auto"
154+
style={{ bottom: 95, scrollbarWidth: "none" }}
155155
>
156156
<div className="px-[14px] pb-[16px]">
157157

03-Client/src/app/components/address-search/AddressInfoPanel.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -183,8 +183,8 @@ export function AddressInfoPanel({
183183

184184
{/* Panel wrapper */}
185185
<div
186-
className="absolute z-20 pointer-events-none"
187-
style={{ top: 93, left: 28, right: 28, bottom: 95 }}
186+
className="below-header absolute z-20 pointer-events-none"
187+
style={{ left: 28, right: 28, bottom: 95 }}
188188
>
189189
<div
190190
ref={scrollRef}

03-Client/src/styles/theme.css

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,11 @@
139139
top: calc(var(--safe-top) + var(--top-bar-gap)) !important;
140140
}
141141

142+
/* Content flush to the header (hardcoded top-[82px], +4px gap) */
143+
.below-header-flush {
144+
top: calc(var(--header-end) + 4px) !important;
145+
}
146+
142147
/* Content blocks that were hardcoded to top-[93px] (header + 15px gap) */
143148
.below-header {
144149
top: calc(var(--header-end) + 15px) !important;

0 commit comments

Comments
 (0)