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(ui): raise top bar above open service actions

Andras Bacsai8264129f031d
diff --git a/resources/views/layouts/app.blade.php b/resources/views/layouts/app.blade.php
index 1c8e91dcaa..43f5dff42a 100644
--- a/resources/views/layouts/app.blade.php
+++ b/resources/views/layouts/app.blade.php
@@ -27,6 +27,9 @@
{{-- ============ DESKTOP TOP BAR ============ --}}
<header
+ x-data="{ resourceActionsOpen: false }"
+ @resource-actions-toggled.window="resourceActionsOpen = $event.detail.open"
+ :class="{ 'z-[1000]': resourceActionsOpen }"
class="hidden lg:flex fixed top-0 inset-x-0 z-50 h-12 items-center bg-white/95 dark:bg-panel/95 backdrop-blur border-b border-neutral-200 dark:border-white/[0.06]">
{{-- Brand (width tracks sidebar) --}}
<div class="flex items-center gap-2 h-full shrink-0 border-r border-neutral-200 dark:border-white/[0.06] transition-[width] duration-200"
diff --git a/resources/views/livewire/project/service/heading.blade.php b/resources/views/livewire/project/service/heading.blade.php
index 38e81f278c..aa23f3e6b4 100644
--- a/resources/views/livewire/project/service/heading.blade.php
+++ b/resources/views/livewire/project/service/heading.blade.php
@@ -185,6 +185,7 @@
<x-services.links :service="$service" />
</div>
<div id="service-desktop-actions" class="relative" x-data="{ open: false }"
+ x-effect="$dispatch('resource-actions-toggled', { open })"
@click.outside="open = false" @keydown.escape.window="open = false">
<button type="button" class="button" @click="open = !open" :aria-expanded="open">
<x-reicon name="play-circle" class="size-3.5 opacity-70" />
diff --git a/tests/Feature/ResourceHeadingUnifiedNavbarTest.php b/tests/Feature/ResourceHeadingUnifiedNavbarTest.php
index 3521ea8266..d13135bb6e 100644
--- a/tests/Feature/ResourceHeadingUnifiedNavbarTest.php
+++ b/tests/Feature/ResourceHeadingUnifiedNavbarTest.php
@@ -156,6 +156,18 @@ it('groups application lifecycle controls in an actions dropdown', function () {
->toContain('Deploy');
});
+it('raises the desktop top bar while the service actions dropdown is open', function () {
+ $layout = file_get_contents(resource_path('views/layouts/app.blade.php'));
+ $heading = file_get_contents(resource_path('views/livewire/project/service/heading.blade.php'));
+
+ expect($layout)
+ ->toContain('resourceActionsOpen: false')
+ ->toContain("'z-[1000]': resourceActionsOpen")
+ ->toContain('@resource-actions-toggled.window="resourceActionsOpen = $event.detail.open"')
+ ->and($heading)
+ ->toContain("\$dispatch('resource-actions-toggled', { open })");
+});
+
it('keeps deploy in the actions menu alongside advanced operations', function () {
$heading = file_get_contents(resource_path('views/livewire/project/application/heading.blade.php'));
$desktop = str($heading)->after('resource-heading-actions flex')->toString();