Modern Docker Management, Designed for Everyone
Go composecontainer-managementcontainersdockerdocker-composedocker-managementgoself-hostedsveltekittypescriptweb-ui
fix: show popover when project name is missing for better user UX
Kyle Mendellf77044e60a71
diff --git a/frontend/messages/en.json b/frontend/messages/en.jsonindex cb7b49581..d55952af2 100644--- a/frontend/messages/en.json+++ b/frontend/messages/en.json@@ -681,6 +681,9 @@"compose_name_label": "Project Name","compose_project_name_placeholder": "My New Project","compose_project_name_required": "Project name is required",+ "compose_project_name_tooltip_title": "Project name required",+ "compose_project_name_tooltip_description": "Click the project name to the left to enter a unique identifier using lowercase letters, numbers, hyphens, and underscores.",+ "compose_project_name_tooltip_example": "Example: my-web-app","compose_compose_content_required": "Compose content is required","compose_nav_services": "Services","compose_nav_logs": "Logs",diff --git a/frontend/src/lib/components/ui/tooltip/tooltip-content.svelte b/frontend/src/lib/components/ui/tooltip/tooltip-content.svelteindex d39ed0f71..535523458 100644--- a/frontend/src/lib/components/ui/tooltip/tooltip-content.svelte+++ b/frontend/src/lib/components/ui/tooltip/tooltip-content.svelte@@ -22,7 +22,7 @@{sideOffset}{side}class={cn(- 'bubble bubble-shadow-lg text-primary-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 z-50 w-fit origin-(--bits-tooltip-content-transform-origin) px-3 py-1.5 text-xs text-balance',+ 'bg-popover/90 text-popover-foreground animate-in fade-in-0 zoom-in-95 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 border-border/40 z-50 w-fit origin-(--bits-tooltip-content-transform-origin) rounded-xl border px-3 py-1.5 text-xs text-balance shadow-lg backdrop-blur-(--glass-blur-popup) backdrop-saturate-150',className)}{...restProps}@@ -32,7 +32,7 @@{#snippet child({ props })}<divclass={cn(- 'bg-primary z-50 size-2.5 rotate-45 rounded-[2px] backdrop-blur-md',+ 'bg-popover/20 border-border/40 backdrop-blur-medium z-50 size-2.5 rotate-45 rounded-[2px] border backdrop-saturate-150','data-[side=top]:translate-x-1/2 data-[side=top]:translate-y-[calc(-50%_+_2px)]','data-[side=bottom]:-translate-x-1/2 data-[side=bottom]:-translate-y-[calc(-50%_+_1px)]','data-[side=right]:translate-x-[calc(50%_+_2px)] data-[side=right]:translate-y-1/2',diff --git a/frontend/src/routes/projects/new/+page.svelte b/frontend/src/routes/projects/new/+page.svelteindex 4a90a6017..92a2d5e0a 100644--- a/frontend/src/routes/projects/new/+page.svelte+++ b/frontend/src/routes/projects/new/+page.svelte@@ -3,6 +3,7 @@import ArrowLeftIcon from '@lucide/svelte/icons/arrow-left';import TerminalIcon from '@lucide/svelte/icons/terminal';import CopyIcon from '@lucide/svelte/icons/copy';+ import InfoIcon from '@lucide/svelte/icons/info';import { Spinner } from '$lib/components/ui/spinner/index.js';import LayoutTemplateIcon from '@lucide/svelte/icons/layout-template';import WandIcon from '@lucide/svelte/icons/wand';@@ -14,6 +15,7 @@import { handleApiResultWithCallbacks } from '$lib/utils/api.util';import { Textarea } from '$lib/components/ui/textarea/index.js';import * as Dialog from '$lib/components/ui/dialog/index.js';+ import * as Tooltip from '$lib/components/ui/tooltip/index.js';import TemplateSelectionDialog from '$lib/components/dialogs/template-selection-dialog.svelte';import type { Template } from '$lib/types/template.type';import { z } from 'zod/v4';@@ -163,8 +165,7 @@</script><div class="bg-background flex min-h-0 flex-col">- <!-- Header -->- <div class="sticky top-0 z-50 border-b">+ <div class="sticky top-0 border-b"><div class="mx-auto flex h-16 max-w-full items-center justify-between gap-4 px-6"><div class="flex items-center gap-4"><Button variant="ghost" size="sm" href="/projects" class="gap-2 bg-transparent">@@ -188,19 +189,44 @@<div class="flex items-center gap-2"><ButtonGroup.Root>- <Button- disabled={!$inputs.name.value || !$inputs.composeContent.value || saving || converting || isLoadingTemplateContent}- onclick={() => handleSubmit()}- class={`${templateBtnClass} gap-2 rounded-r-none hover:translate-y-0 focus:translate-y-0 active:translate-y-0`}- >- {#if saving}- <Spinner class="size-4" />- {m.common_action_creating()}- {:else}- <PlusCircleIcon class="size-4" />- {m.compose_create_project()}- {/if}- </Button>+ <Tooltip.Provider>+ <Tooltip.Root open={!$inputs.name.value && !saving && !converting && !isLoadingTemplateContent ? undefined : false}>+ <Tooltip.Trigger>+ {#snippet child({ props })}+ <span {...props}>+ <Button+ disabled={!$inputs.name.value ||+ !$inputs.composeContent.value ||+ saving ||+ converting ||+ isLoadingTemplateContent}+ onclick={() => handleSubmit()}+ class={`${templateBtnClass} gap-2 rounded-r-none hover:translate-y-0 focus:translate-y-0 active:translate-y-0`}+ >+ {#if saving}+ <Spinner class="size-4" />+ {m.common_action_creating()}+ {:else}+ <PlusCircleIcon class="size-4" />+ {m.compose_create_project()}+ {/if}+ </Button>+ </span>+ {/snippet}+ </Tooltip.Trigger>+ {#if $inputs.name.value === ''}+ <Tooltip.Content class="arcane-tooltip-content max-w-[280px]">+ <p class="mb-1 text-sm font-medium">{m.compose_project_name_tooltip_title()}</p>+ <p class="text-muted-foreground text-xs">+ {m.compose_project_name_tooltip_description()}+ </p>+ <p class="bg-muted mt-1.5 inline-block rounded px-1.5 py-0.5 font-mono text-xs">+ {m.compose_project_name_tooltip_example()}+ </p>+ </Tooltip.Content>+ {/if}+ </Tooltip.Root>+ </Tooltip.Provider><DropdownMenu.Root><DropdownMenu.Trigger>@@ -254,11 +280,9 @@</div></div>- <!-- Main Content --><div class="flex-1 overflow-hidden"><div class="mx-auto h-full max-w-full"><div class="flex h-full flex-col gap-4 p-6">- <!-- Name field for mobile --><div class="block sm:hidden"><EditableNamebind:value={$inputs.name.value}@@ -271,7 +295,6 @@/></div>- <!-- Code Panels --><formclass="grid h-full grid-cols-1 gap-4 lg:grid-cols-5 lg:items-stretch"style="grid-template-rows: 1fr;"@@ -304,7 +327,6 @@</div></div>-<!-- Converter Dialog --><Dialog.Root bind:open={showConverterDialog}><Dialog.Content class="max-h-[80vh] sm:max-w-[800px]"><Dialog.Header>@@ -358,7 +380,6 @@</Dialog.Content></Dialog.Root>-<!-- Template Selection Dialog --><TemplateSelectionDialogbind:open={showTemplateDialog}templates={data.composeTemplates || []}