Skip to content

Commit 7db4039

Browse files
claudeFlowm
authored andcommitted
Fix mobile view: make variable tabs scrollable in Compare Models section
The variable tab row used overflow-hidden which clipped tabs like "Wind speed" and "Cloud cover" on narrow mobile screens. Changed to a horizontally scrollable container with an inner flex row, added whitespace-nowrap to prevent tab labels from wrapping, and changed the outer controls layout to stack vertically on mobile (flex-col) so the Variable and Window rows each have full width. https://claude.ai/code/session_015pWnj2WkNBc5vFcuZvTuYf
1 parent d3139d3 commit 7db4039

1 file changed

Lines changed: 16 additions & 14 deletions

File tree

src/components/ModelBreakdown.vue

Lines changed: 16 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -194,23 +194,25 @@ const option = computed<EChartsOption>(() => {
194194
</summary>
195195

196196
<div class="space-y-4 px-4 pb-6 sm:px-6">
197-
<div class="flex flex-wrap items-center gap-4">
198-
<div class="flex items-center gap-2 text-xs">
199-
<span class="text-slate-500">Variable:</span>
200-
<div class="flex overflow-hidden rounded-md bg-slate-950 ring-1 ring-slate-800">
201-
<button
202-
v-for="o in variableOptions"
203-
:key="o.id"
204-
class="px-3 py-1.5 transition-colors"
205-
:class="variable === o.id ? 'bg-slate-700 text-slate-100' : 'text-slate-400 hover:bg-slate-800 hover:text-slate-200'"
206-
@click="variable = o.id"
207-
>
208-
{{ o.label }}
209-
</button>
197+
<div class="flex flex-col gap-3 sm:flex-row sm:flex-wrap sm:items-center sm:gap-4">
198+
<div class="flex min-w-0 items-center gap-2 text-xs">
199+
<span class="shrink-0 text-slate-500">Variable:</span>
200+
<div class="min-w-0 flex-1 overflow-x-auto rounded-md bg-slate-950 ring-1 ring-slate-800">
201+
<div class="flex">
202+
<button
203+
v-for="o in variableOptions"
204+
:key="o.id"
205+
class="px-3 py-1.5 whitespace-nowrap transition-colors"
206+
:class="variable === o.id ? 'bg-slate-700 text-slate-100' : 'text-slate-400 hover:bg-slate-800 hover:text-slate-200'"
207+
@click="variable = o.id"
208+
>
209+
{{ o.label }}
210+
</button>
211+
</div>
210212
</div>
211213
</div>
212214

213-
<div class="ml-auto flex items-center gap-2 text-xs">
215+
<div class="flex items-center gap-2 text-xs sm:ml-auto">
214216
<span class="text-slate-500">Window:</span>
215217
<div class="flex overflow-hidden rounded-md bg-slate-950 ring-1 ring-slate-800">
216218
<button

0 commit comments

Comments
 (0)