fix(ui): scope resource card keys and env count hide

Limit enter/space deploy handlers to the card root with .self so nested focusable content no longer triggers deploy. Hide the environments table resource count on mobile via a stable class instead of nth-child.
This commit is contained in:
Andras Bacsai
2026-08-12 23:57:32 +02:00
parent 1f550e8fcf
commit 37ed725dc1
5 changed files with 34 additions and 11 deletions
@@ -50,3 +50,16 @@ it('does not repeat the resources action outside the resources page', function (
expect(file_get_contents(resource_path('views/livewire/project/resource/index.blade.php')))
->toContain('New resource');
});
it('uses a stable class for the environment resource count on mobile', function () {
$view = file_get_contents(resource_path('views/livewire/project/show.blade.php'));
$css = file_get_contents(resource_path('css/app.css'));
expect($view)
->toContain('class="environment-resource-count">Resources</div>')
->toContain('class="environment-resource-count text-[12px]');
expect($css)
->toContain('.environments-table-grid .environment-resource-count')
->not->toContain('.environments-table-grid > :nth-child(2)');
});