Skip to content

Commit 39197d0

Browse files
committed
fix(ui): keep deployment history columns scrollable on mobile
Replace responsive column-hiding with horizontal scroll and a fixed min-width grid so Status, Source, Commit, Started, Duration, and Server stay available on small screens. Also let logs-viewer actions grow in the primary toolbar so the status badge remains usable.
1 parent 8f255bd commit 39197d0

3 files changed

Lines changed: 37 additions & 28 deletions

File tree

resources/css/app.css

Lines changed: 12 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2329,7 +2329,14 @@ input[type="search"]::-webkit-search-results-decoration {
23292329
}
23302330
}
23312331

2332+
.deployment-table-scroll {
2333+
overflow-x: auto;
2334+
overscroll-behavior-x: contain;
2335+
-webkit-overflow-scrolling: touch;
2336+
}
2337+
23322338
.deployment-table-grid {
2339+
min-width: 59rem;
23332340
grid-template-columns: 7.5rem minmax(7rem, 0.8fr) minmax(12rem, 1.7fr) minmax(8rem, 0.9fr) 6.5rem minmax(7rem, 0.8fr);
23342341
}
23352342

@@ -2408,15 +2415,6 @@ input[type="search"]::-webkit-search-results-decoration {
24082415
display: none;
24092416
}
24102417

2411-
.deployment-table-grid {
2412-
grid-template-columns: 7.5rem minmax(7rem, 0.8fr) minmax(10rem, 1.4fr) minmax(8rem, 0.9fr);
2413-
}
2414-
2415-
.deployment-table-grid > :nth-child(5),
2416-
.deployment-table-grid > :nth-child(6) {
2417-
display: none;
2418-
}
2419-
24202418
.team-members-table-grid {
24212419
grid-template-columns: minmax(0, 1fr) 7rem 7rem;
24222420
}
@@ -2477,15 +2475,6 @@ input[type="search"]::-webkit-search-results-decoration {
24772475
display: none;
24782476
}
24792477

2480-
.deployment-table-grid {
2481-
grid-template-columns: 7.5rem minmax(0, 1fr);
2482-
}
2483-
2484-
.deployment-table-grid > :nth-child(2),
2485-
.deployment-table-grid > :nth-child(4) {
2486-
display: none;
2487-
}
2488-
24892478
.team-members-table-grid {
24902479
grid-template-columns: minmax(0, 1fr) 6.5rem;
24912480
}
@@ -2671,6 +2660,11 @@ html[data-theme="custom"] .logs-viewer-timestamp {
26712660
gap: 0.5rem;
26722661
}
26732662

2663+
.logs-viewer-primary .logs-viewer-actions {
2664+
width: auto;
2665+
flex: 1 1 auto;
2666+
}
2667+
26742668
.logs-viewer-search {
26752669
position: relative;
26762670
min-width: 0;

resources/views/livewire/project/application/deployment/index.blade.php

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -168,16 +168,17 @@ class="px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-neut
168168
<x-table.loading id="deployment-table-filter-loading"
169169
target="toggleDeploymentFilter,clearFilter,setPullRequestFilter"
170170
text="Filtering deployments..." class="rounded-lg" />
171-
<div class="data-table-header deployment-table-grid rounded-none!">
172-
<span>Status</span>
173-
<span>Source</span>
174-
<span>Commit</span>
175-
<span>Started</span>
176-
<span>Duration</span>
177-
<span>Server</span>
178-
</div>
171+
<div class="deployment-table-scroll">
172+
<div class="data-table-header deployment-table-grid rounded-none!">
173+
<span>Status</span>
174+
<span>Source</span>
175+
<span>Commit</span>
176+
<span>Started</span>
177+
<span>Duration</span>
178+
<span>Server</span>
179+
</div>
179180

180-
@foreach ($deployments as $deployment)
181+
@foreach ($deployments as $deployment)
181182
@php
182183
$deploymentStatus = data_get($deployment, 'status');
183184
$statusLabel = match ($deploymentStatus) {
@@ -245,7 +246,8 @@ class="px-2 pb-1 pt-2 text-[10px] font-medium uppercase tracking-wider text-neut
245246
{{ data_get($deployment, 'server_name') ?: data_get($application, 'destination.server.name', '-') }}
246247
</span>
247248
</a>
248-
@endforeach
249+
@endforeach
250+
</div>
249251

250252
<x-table-pagination :from="$firstVisibleRow" :to="$lastVisibleRow" :total="$deployments_count"
251253
:current-page="$currentPage" :last-page="$lastPage"

tests/Feature/DeploymentLogsLayoutTest.php

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,19 @@
176176
->toContain('relative order-7 shrink-0');
177177
});
178178

179+
it('keeps deployment history fields and the log status badge accessible on mobile', function () {
180+
$deploymentIndexView = file_get_contents(resource_path('views/livewire/project/application/deployment/index.blade.php'));
181+
$appCss = file_get_contents(resource_path('css/app.css'));
182+
183+
expect($deploymentIndexView)
184+
->toContain('deployment-table-scroll')
185+
->and($appCss)
186+
->toContain(".deployment-table-scroll {\n overflow-x: auto;")
187+
->toContain(".deployment-table-grid {\n min-width: 59rem;")
188+
->not->toContain('.deployment-table-grid > :nth-child')
189+
->toContain(".logs-viewer-primary .logs-viewer-actions {\n width: auto;\n flex: 1 1 auto;");
190+
});
191+
179192
it('places cancel deployment controls inside the deployment logs toolbar', function () {
180193
$deployment = ApplicationDeploymentQueue::create([
181194
'application_id' => $this->application->id,

0 commit comments

Comments
 (0)