Skip to content

Commit 152f783

Browse files
babayomiclaude
andcommitted
Fix mobile view overflow in program-analysis and financial-reports pages
🔧 Mobile Header Controls Fix: - Changed header controls from horizontal flex to responsive flex-col/flex-row - Added proper mobile stacking for select boxes and buttons - Implemented w-full sm:w-auto for proper mobile sizing 📱 Key Mobile Improvements: - Header controls now stack vertically on mobile (< 640px) - Select boxes use full width on mobile, auto width on larger screens - Buttons adapt with shortened text labels on mobile - Added proper gap spacing (gap-3 sm:gap-4) for consistent spacing 🎯 Specific Changes: Financial Reports: - "Export Report" → "Export" on mobile - Full-width select boxes and button on mobile - Vertical stacking prevents horizontal overflow Program Analysis: - "Generate Report" → "Generate" on mobile - Same responsive pattern applied - Consistent mobile behavior 🔨 Additional CSS Enhancements: - Added header-content width management for mobile - Select box text-overflow: ellipsis for long options - min-width: 0 to prevent select box expansion - Maintained existing mobile responsive patterns ✅ Overflow Issues Resolved: - No more horizontal scrolling on mobile devices - Touch-friendly interface with proper spacing - Maintains functionality while improving UX - Consistent with Botnar spacing system 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent 8ca5e0d commit 152f783

File tree

2 files changed

+34
-10
lines changed

2 files changed

+34
-10
lines changed

design-system/pages/financial-reports/index.html

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,17 @@
116116
overflow-x: auto;
117117
-webkit-overflow-scrolling: touch;
118118
}
119+
120+
/* Mobile header controls */
121+
.header-content > div:last-child {
122+
width: 100%;
123+
}
124+
125+
/* Mobile select boxes */
126+
select {
127+
min-width: 0;
128+
text-overflow: ellipsis;
129+
}
119130
}
120131

121132
@media (max-width: 768px) {
@@ -442,12 +453,12 @@
442453
</p>
443454
</div>
444455
</div>
445-
<div class="flex items-center space-x-4">
456+
<div class="flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4">
446457
<!-- Year Selector -->
447458
<select
448459
x-model="selectedYear"
449460
@change="updateYear()"
450-
class="rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 text-sm"
461+
class="rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 text-sm w-full sm:w-auto"
451462
>
452463
<option value="2025">2025</option>
453464
<option value="2024">2024</option>
@@ -459,7 +470,7 @@
459470
<select
460471
x-model="currency"
461472
@change="updateCurrency()"
462-
class="rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 text-sm"
473+
class="rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 text-sm w-full sm:w-auto"
463474
>
464475
<option value="EUR">EUR (€)</option>
465476
<option value="USD">USD ($)</option>
@@ -469,7 +480,7 @@
469480
<!-- Export Button -->
470481
<button
471482
@click="exportFinancialReport()"
472-
class="btn btn-primary text-sm"
483+
class="btn btn-primary text-sm w-full sm:w-auto flex items-center justify-center"
473484
>
474485
<svg
475486
class="w-4 h-4 mr-2"
@@ -484,7 +495,8 @@
484495
d="M12 10v6m0 0l-3-3m3 3l3-3m2 8H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"
485496
/>
486497
</svg>
487-
Export Report
498+
<span class="hidden sm:inline">Export Report</span>
499+
<span class="sm:hidden">Export</span>
488500
</button>
489501
</div>
490502
</div>

design-system/pages/program-analysis/index.html

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,17 @@
143143
.timeline-item {
144144
padding-left: 1rem;
145145
}
146+
147+
/* Mobile header controls */
148+
.header-content > div:last-child {
149+
width: 100%;
150+
}
151+
152+
/* Mobile select boxes */
153+
select {
154+
min-width: 0;
155+
text-overflow: ellipsis;
156+
}
146157
}
147158

148159
@media (max-width: 768px) {
@@ -326,10 +337,10 @@ <h1 class="text-2xl font-bold text-gray-900 dark:text-gray-100">Program Analysis
326337
<p class="text-gray-600 dark:text-gray-300">Deep dive into program performance and strategic insights</p>
327338
</div>
328339
</div>
329-
<div class="flex items-center space-x-4">
340+
<div class="flex flex-col sm:flex-row sm:items-center gap-3 sm:gap-4">
330341
<!-- Analysis Type Selector -->
331342
<select x-model="analysisType" @change="updateAnalysisType()"
332-
class="rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 text-sm">
343+
class="rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 text-sm w-full sm:w-auto">
333344
<option value="performance">Performance Analysis</option>
334345
<option value="comparative">Comparative Analysis</option>
335346
<option value="predictive">Predictive Analysis</option>
@@ -338,19 +349,20 @@ <h1 class="text-2xl font-bold text-gray-900 dark:text-gray-100">Program Analysis
338349

339350
<!-- Time Range -->
340351
<select x-model="timeRange" @change="updateTimeRange()"
341-
class="rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 text-sm">
352+
class="rounded-md border-gray-300 dark:border-gray-600 dark:bg-gray-700 text-sm w-full sm:w-auto">
342353
<option value="3m">Last 3 Months</option>
343354
<option value="6m">Last 6 Months</option>
344355
<option value="1y">Last Year</option>
345356
<option value="all">All Time</option>
346357
</select>
347358

348359
<!-- Generate Report Button -->
349-
<button @click="generateAnalysisReport()" class="btn btn-primary text-sm">
360+
<button @click="generateAnalysisReport()" class="btn btn-primary text-sm w-full sm:w-auto flex items-center justify-center">
350361
<svg class="w-4 h-4 mr-2" fill="none" stroke="currentColor" viewBox="0 0 24 24">
351362
<path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 17v-2m3 2v-4m3 4v-6m2 10H7a2 2 0 01-2-2V5a2 2 0 012-2h5.586a1 1 0 01.707.293l5.414 5.414a1 1 0 01.293.707V19a2 2 0 01-2 2z"/>
352363
</svg>
353-
Generate Report
364+
<span class="hidden sm:inline">Generate Report</span>
365+
<span class="sm:hidden">Generate</span>
354366
</button>
355367
</div>
356368
</div>

0 commit comments

Comments
 (0)