Skip to content

An open-source, self-hostable PaaS alternative to Vercel, Heroku & Netlify that lets you easily deploy static sites, databases, full-stack applications and 360+ one-click services on your own servers.

fix(audit): restore horizontal scrolling for mobile event tables

Andras Bacsai3c72405efa0b
diff --git a/resources/views/livewire/team/audit-log.blade.php b/resources/views/livewire/team/audit-log.blade.php
index 64bd1fa75c..b81de272c5 100644
--- a/resources/views/livewire/team/audit-log.blade.php
+++ b/resources/views/livewire/team/audit-log.blade.php
@@ -35,9 +35,9 @@
@if ($events->isNotEmpty())
<div class="overflow-x-auto">
- <div class="data-table min-w-[760px] transition-opacity" wire:loading.class="opacity-50 pointer-events-none"
- wire:target="search,action,source,setPage,previousPage,nextPage">
- <div class="grid grid-cols-[14rem_minmax(0,1fr)_12rem_9rem] gap-4 border-b border-neutral-200 px-4 py-2 text-[11px] font-medium uppercase tracking-wide text-neutral-500 dark:border-white/[0.07] dark:text-fg-faint">
+ <div class="data-table transition-opacity" wire:loading.class="opacity-50 pointer-events-none"
+ wire:target="search,action,source,setPage,previousPage,nextPage">
+ <div class="grid min-w-[760px] grid-cols-[14rem_minmax(0,1fr)_12rem_9rem] gap-4 border-b border-neutral-200 px-4 py-2 text-[11px] font-medium uppercase tracking-wide text-neutral-500 dark:border-white/[0.07] dark:text-fg-faint">
<span>Actor</span>
<span>Activity</span>
<span>Source</span>
@@ -45,7 +45,7 @@
</div>
@foreach ($events as $event)
<div wire:key="audit-event-{{ $event->id }}"
- class="grid grid-cols-[14rem_minmax(0,1fr)_12rem_9rem] gap-4 border-b border-neutral-200 px-4 py-3 last:border-b-0 dark:border-white/[0.07]">
+ class="grid min-w-[760px] grid-cols-[14rem_minmax(0,1fr)_12rem_9rem] gap-4 border-b border-neutral-200 px-4 py-3 last:border-b-0 dark:border-white/[0.07]">
<div class="min-w-0">
<div class="truncate text-[12px] font-medium text-black dark:text-fg">
{{ $event->actor_name ?: Str::headline($event->actor_type) }}
diff --git a/tests/Feature/AuditEventsTest.php b/tests/Feature/AuditEventsTest.php
index 8851ea0dba..703e70750e 100644
--- a/tests/Feature/AuditEventsTest.php
+++ b/tests/Feature/AuditEventsTest.php
@@ -874,7 +874,7 @@ test('critical operational events persist with their source action and actor', f
'api.database.restarted',
]);
-test('audit log table keeps actor details visible in a mobile scroll area', function () {
+test('audit log uses the standard horizontally scrollable table layout on mobile', function () {
AuditEvent::factory()->create([
'team_id' => $this->team->id,
'actor_name' => 'Visible Actor',
@@ -883,8 +883,8 @@ test('audit log table keeps actor details visible in a mobile scroll area', func
Livewire::test(AuditLog::class)
->assertSeeHtml('class="overflow-x-auto"')
- ->assertSeeHtml('min-w-[760px]')
- ->assertSeeHtml('grid-cols-[14rem_minmax(0,1fr)_12rem_9rem]')
+ ->assertSeeHtml('class="data-table transition-opacity"')
+ ->assertSeeHtml('class="grid min-w-[760px] grid-cols-[14rem_minmax(0,1fr)_12rem_9rem]')
->assertSeeHtml('class="self-center text-right text-[11px]')
->assertSeeHtml('title="Token: visible-audit-token"')
->assertSee('Actor')