From 28fe3384ed54ea5f88e6e3ddf37a0aad9a29bc56 Mon Sep 17 00:00:00 2001 From: Aditya Tripathi Date: Mon, 7 Sep 2026 02:55:58 +0000 Subject: [PATCH] feat(ui): section-heading component, dashboard spacing, sidebar-toggle icon - Add reusable (title, muted subtitle, optional action) with a compact contained "View all" button; migrate dashboard Projects/ Servers/Deployments and shared-variables environment headers to it. - Dashboard: hide the empty active-deployments node so it no longer adds a gap above the first section; align section actions with the title row. - Mobile: use the panel-left sidebar-toggle icon (matching desktop) as the drawer trigger instead of a hamburger. --- .../components/section-heading.blade.php | 34 +++++++++++++++++++ resources/views/layouts/app.blade.php | 6 ++-- resources/views/livewire/dashboard.blade.php | 34 +++---------------- .../dashboard/active-deployments.blade.php | 13 ++----- .../environment/index.blade.php | 5 +-- 5 files changed, 44 insertions(+), 48 deletions(-) create mode 100644 resources/views/components/section-heading.blade.php diff --git a/resources/views/components/section-heading.blade.php b/resources/views/components/section-heading.blade.php new file mode 100644 index 000000000..523808102 --- /dev/null +++ b/resources/views/components/section-heading.blade.php @@ -0,0 +1,34 @@ +@props([ + 'title', + 'subtitle' => null, + 'href' => null, + 'actionLabel' => 'View all', + 'icon' => 'arrow-right', +]) + +{{-- + Shared section heading: a 14px title, an optional 11px muted subtitle, and an + optional right-aligned action. Pass `href` for the default ghost "View all" + button, or an `` for a custom control. +--}} +
merge(['class' => 'mb-3 min-w-0']) }}> +
+

+ {{ $title }} +

+ @isset($actions) +
{{ $actions }}
+ @elseif (filled($href)) + + {{ $actionLabel }} + @if ($icon) + + @endif + + @endisset +
+ @if (filled($subtitle)) +

{{ $subtitle }}

+ @endif +
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php index fbd107d61..bebde042d 100644 --- a/resources/views/layouts/app.blade.php +++ b/resources/views/layouts/app.blade.php @@ -144,9 +144,9 @@ class="hidden shrink-0 items-center"> diff --git a/resources/views/livewire/dashboard.blade.php b/resources/views/livewire/dashboard.blade.php index bc0193fa3..f4bf96fbb 100644 --- a/resources/views/livewire/dashboard.blade.php +++ b/resources/views/livewire/dashboard.blade.php @@ -17,21 +17,8 @@
-
-
-

- Projects -

-

- Your deployment workspaces -

-
- - View all - - -
+ @if ($dashboardProjects->isEmpty()) -
-
-

- Servers -

-

- Infrastructure available for deployments -

-
- - View all - - -
+ @if ($dashboardServers->isEmpty()) @if ($privateKeys->isEmpty()) diff --git a/resources/views/livewire/dashboard/active-deployments.blade.php b/resources/views/livewire/dashboard/active-deployments.blade.php index 14e960e6a..cea0489a2 100644 --- a/resources/views/livewire/dashboard/active-deployments.blade.php +++ b/resources/views/livewire/dashboard/active-deployments.blade.php @@ -24,19 +24,10 @@ $hasAnyDeployments = $hasActiveDeployments || $hasRecentDeployments; @endphp -
$hasAnyDeployments])> +
$hasAnyDeployments, 'hidden' => ! $hasAnyDeployments])> @if ($hasAnyDeployments)
-
-
-

- Deployments -

-

- Active and recent deployment activity -

-
-
+
@if ($hasActiveDeployments) diff --git a/resources/views/livewire/shared-variables/environment/index.blade.php b/resources/views/livewire/shared-variables/environment/index.blade.php index 39d3ffe10..15c6dd461 100644 --- a/resources/views/livewire/shared-variables/environment/index.blade.php +++ b/resources/views/livewire/shared-variables/environment/index.blade.php @@ -22,10 +22,7 @@ $project->description, ...$project->environments->flatMap(fn ($environment) => [$environment->name, $environment->description])->all(), ]))"> -
-

{{ $project->name }}

-

{{ $project->description ?: 'Project environments' }}

-
+ @if ($project->environments->isEmpty()) @else