fix(ui): expose environment variable settings on mobile

Collapse environment variable rows to the key and settings action on small
screens, and let the key open the corresponding details modal.
This commit is contained in:
Andras Bacsai
2026-08-12 11:51:42 +02:00
parent d662de05d9
commit 4e3def11e3
4 changed files with 50 additions and 7 deletions
@@ -80,16 +80,25 @@ test('resource environment variables table has a Managed column and no name-cell
expect($show)->toContain('<x-helper :helper="e($comment)" />');
});
test('resource environment variables table remains horizontally scrollable on mobile', function () {
test('resource environment variables expose their settings action without horizontal scrolling on mobile', function () {
$view = file_get_contents(resource_path('views/livewire/project/shared/environment-variable/all.blade.php'));
$show = file_get_contents(resource_path('views/livewire/project/shared/environment-variable/show.blade.php'));
$hardcoded = file_get_contents(resource_path('views/livewire/project/shared/environment-variable/show-hardcoded.blade.php'));
$css = file_get_contents(resource_path('css/app.css'));
expect($view)
->toContain('environment-table-scroll')
->and($show)
->toContain('data-env-name-trigger')
->toContain('data-env-settings-trigger')
->and($hardcoded)
->toContain('data-env-name-trigger')
->toContain('data-env-settings-trigger')
->and($css)
->toContain(".environment-table-scroll {\n overflow-x: auto;")
->toContain(".environment-table-scroll .env-table-grid {\n min-width: 53rem;")
->not->toContain('.data-table-row.env-table-grid > :nth-child')
->toContain('.data-table-header.env-table-grid')
->toContain('.data-table-row.env-table-grid > :last-child')
->not->toContain(".env-type-desktop {\n display: none");
});