From 84e80142bc5ad45f90b21430b669f37ed5759df2 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Thu, 17 Sep 2026 19:27:18 +0200 Subject: [PATCH] fix(storages): make volume backup executions responsive on mobile Stack execution details into labeled mobile rows and keep archive paths visible with copy actions. --- resources/css/app.css | 53 ++++++- .../volume-backups/executions.blade.php | 130 ++++++++++-------- .../PersistentStorageVolumesLayoutTest.php | 19 ++- 3 files changed, 139 insertions(+), 63 deletions(-) diff --git a/resources/css/app.css b/resources/css/app.css index 1d0cd200ae..15035abb92 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -3151,7 +3151,58 @@ input[type="search"]::-webkit-search-results-decoration { .volume-backup-executions-grid { grid-template-columns: 7.5rem minmax(0, 1fr) 8.5rem 7rem 9rem minmax(9rem, 0.7fr); - min-width: 50rem; +} + +.volume-backup-execution-label { + display: none; +} + +.volume-backup-execution-message { + grid-column: 1 / -1; +} + +@media (max-width: 768px) { + .data-table-header.volume-backup-executions-grid { + display: none; + } + + .data-table-row.volume-backup-executions-grid { + grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); + min-height: 0; + align-items: start; + gap: 0.875rem 1rem; + padding: 1rem; + } + + .volume-backup-execution-archive, + .volume-backup-execution-availability, + .volume-backup-execution-message { + grid-column: 1 / -1; + } + + .volume-backup-execution-status, + .volume-backup-execution-archive, + .volume-backup-execution-time, + .volume-backup-execution-size, + .volume-backup-execution-availability, + .volume-backup-execution-actions { + display: flex; + min-width: 0; + flex-direction: column; + gap: 0.25rem; + } + + .volume-backup-execution-label { + display: block; + font-size: 12px; + font-weight: 500; + line-height: 1rem; + color: var(--coollabs-subtle); + } + + .volume-backup-execution-actions > span:last-child { + justify-content: flex-start; + } } .clone-destinations-table-grid { diff --git a/resources/views/livewire/project/shared/storages/volume-backups/executions.blade.php b/resources/views/livewire/project/shared/storages/volume-backups/executions.blade.php index 9e7b494128..26a0f8ab39 100644 --- a/resources/views/livewire/project/shared/storages/volume-backups/executions.blade.php +++ b/resources/views/livewire/project/shared/storages/volume-backups/executions.blade.php @@ -23,7 +23,7 @@ @if ($executionCount > 0) -
+
Status @@ -66,70 +66,88 @@
- +
+ Status - +
- - - +
+ Archive +
+ {{ $execution->filename ?? 'No archive name' }} + +
+
- - @if ($execution->status === 'running') - Running for {{ calculateDuration($execution->created_at, now()) }} - @else - {{ $finishedAt->diffForHumans() }}
- {{ calculateDuration($execution->created_at, $finishedAt) }} - @endif -
+
+ Time + + @if ($execution->status === 'running') + Running for {{ calculateDuration($execution->created_at, now()) }} + @else + {{ $finishedAt->diffForHumans() }}
+ {{ calculateDuration($execution->created_at, $finishedAt) }} + @endif +
+
- - {{ $execution->size > 0 ? formatBytes($execution->size) : '-' }} - +
+ Size + + {{ $execution->size > 0 ? formatBytes($execution->size) : '-' }} + +
- - - @if ($execution->s3_uploaded !== null) - - @endif - +
+ Availability + + + @if ($execution->s3_uploaded !== null) + + @endif + +
- - @if ($execution->status === 'success' && ! $execution->local_storage_deleted) - - @endif - @if ($execution->status !== 'running') - - - - - - @endif - +
+ Actions + + @if ($execution->status === 'success' && ! $execution->local_storage_deleted) + + @endif + @if ($execution->status !== 'running') + + + + + + @endif + +
@if ($execution->message)
{{ $execution->message }}
+ class="volume-backup-execution-message mt-2 max-h-32 overflow-auto rounded-lg border border-neutral-200 bg-neutral-50 p-2 text-[11px] whitespace-pre-wrap text-neutral-600 dark:border-white/[0.08] dark:bg-white/[0.05] dark:text-fg-dim">{{ $execution->message }} @endif
@endforeach diff --git a/tests/Feature/PersistentStorageVolumesLayoutTest.php b/tests/Feature/PersistentStorageVolumesLayoutTest.php index 2d89d14486..8ab2560d6b 100644 --- a/tests/Feature/PersistentStorageVolumesLayoutTest.php +++ b/tests/Feature/PersistentStorageVolumesLayoutTest.php @@ -1,16 +1,23 @@ toContain('volume-backup-executions-grid') - ->toContain('data-table w-full overflow-x-auto') + ->toContain('volume-backup-execution-archive') + ->toContain('volume-backup-execution-label') + ->toContain('select-all break-all') + ->toContain('x-copy-button') + ->not->toContain('data-table w-full overflow-x-auto') + ->not->toContain('x-forms.copy-button') ->and($css) ->toContain('.volume-backup-executions-grid') - ->toContain('min-width: 50rem;') - ->not->toContain('.data-table-header.volume-backup-executions-grid'); + ->toContain('.data-table-header.volume-backup-executions-grid') + ->toContain('.volume-backup-execution-archive') + ->toContain('grid-column: 1 / -1;') + ->not->toMatch('/\.volume-backup-executions-grid\s*\{[^}]*min-width:/'); }); it('uses compact icon actions for volume backup executions', function () { @@ -194,8 +201,8 @@ it('renders volumes as a data table with shared column headers', function () { ->toMatch('/]*title="File-level consistency"[\s\S]*id="stopDuringBackup"[\s\S]*<\/x-callout>/'); expect(file_get_contents(resource_path('views/livewire/project/shared/storages/volume-backups/executions.blade.php'))) ->toContain('Time') - ->toContain('x-forms.copy-button') - ->toContain('col-span-6'); + ->toContain('x-copy-button') + ->toContain('volume-backup-execution-message'); $css = file_get_contents(resource_path('css/app.css'));