From 4a3dc119584b60321968f427062bed81441f721e Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Tue, 8 Sep 2026 11:49:02 +0200 Subject: [PATCH] feat(ui): polish env editor, error buttons, and modal layout --- .../Shared/EnvironmentVariable/Show.php | 1 + app/View/Components/Forms/Button.php | 3 ++ config/constants.php | 2 +- other/nightly/versions.json | 2 +- resources/css/app.css | 22 +++++++-- .../views/components/modal-input.blade.php | 4 +- resources/views/layouts/base.blade.php | 2 +- .../views/livewire/destination/show.blade.php | 2 +- .../project/database/backup-edit/s3.blade.php | 42 ++++++---------- .../project/service/domains.blade.php | 11 +---- .../service/volume-backup/index.blade.php | 2 +- .../livewire/project/shared/danger.blade.php | 2 +- .../environment-variable/show.blade.php | 47 ++++++++++-------- .../storages/volume-backups/s3.blade.php | 42 ++++++---------- .../livewire/project/shared/tags.blade.php | 3 +- .../livewire/source/github/change.blade.php | 2 +- .../views/livewire/storage/show.blade.php | 2 +- .../views/livewire/team/danger-zone.blade.php | 2 +- tests/Feature/ButtonDepthInteractionTest.php | 13 ++++- .../Feature/EnvironmentVariableEditorTest.php | 49 +++++++++++++++++++ .../EnvironmentVariableTableLayoutTest.php | 13 +++++ tests/Feature/FormsButtonLoadingTest.php | 27 ++++++++++ tests/Feature/ModalScrollLockTest.php | 9 ++++ .../ServiceDatabaseVerticalNavigationTest.php | 21 ++++++++ tests/Feature/ServiceDomainsTest.php | 12 +++++ tests/Unit/BodyScrollbarLayoutTest.php | 16 +++++- tests/Unit/ProductionImageWorkflowTest.php | 4 +- versions.json | 2 +- 28 files changed, 256 insertions(+), 103 deletions(-) create mode 100644 tests/Feature/EnvironmentVariableEditorTest.php diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php index 8350cffa4..d42184f65 100644 --- a/app/Livewire/Project/Shared/EnvironmentVariable/Show.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/Show.php @@ -299,6 +299,7 @@ public function submit() $this->syncData(true); $this->syncData(false); $this->dispatch('success', 'Environment variable updated.'); + $this->dispatch('environment-variable-updated', envId: $this->env->id); $this->dispatch('envsUpdated'); $this->dispatch('configurationChanged'); diff --git a/app/View/Components/Forms/Button.php b/app/View/Components/Forms/Button.php index 3e1600127..f16fc3d95 100644 --- a/app/View/Components/Forms/Button.php +++ b/app/View/Components/Forms/Button.php @@ -23,6 +23,7 @@ public function __construct( public mixed $canResource = null, public bool $autoDisable = true, public bool $isHighlighted = false, + public bool $isError = false, public ?string $tooltip = null, ) { // Handle authorization-based disabling @@ -37,6 +38,8 @@ public function __construct( if ($this->noStyle) { $this->defaultClass = ''; + } elseif ($this->isError) { + $this->defaultClass .= ' button-error'; } } diff --git a/config/constants.php b/config/constants.php index 1e6d40b7b..7e649668d 100644 --- a/config/constants.php +++ b/config/constants.php @@ -2,7 +2,7 @@ return [ 'coolify' => [ - 'version' => env('COOLIFY_VERSION') ?: '4.3.18', + 'version' => env('COOLIFY_VERSION') ?: '4.3.19', 'helper_version' => '1.0.16', 'realtime_version' => '1.0.19', 'railpack_version' => '0.23.0', diff --git a/other/nightly/versions.json b/other/nightly/versions.json index 97ab3b3a6..e2d8c18bc 100644 --- a/other/nightly/versions.json +++ b/other/nightly/versions.json @@ -1,7 +1,7 @@ { "coolify": { "v4": { - "version": "4.3.18" + "version": "4.3.19" }, "nightly": { "version": "4.4-rc.1" diff --git a/resources/css/app.css b/resources/css/app.css index 04c9177ed..bf506dbda 100644 --- a/resources/css/app.css +++ b/resources/css/app.css @@ -101,10 +101,18 @@ .button[isHighlighted]:not(:disabled) { --button-depth-color: color-mix(in oklab, var(--color-coollabs) 52%, black); } -.dark .button:not(.button-highlighted):not([isHighlighted]):not(:disabled) { +.dark .button:not(.button-highlighted):not(.button-error):not([isHighlighted]):not(:disabled) { --button-depth-color: rgb(255 255 255 / 0.08); } +.button.button-error:not(:disabled) { + --button-depth-color: var(--color-red-300); +} + +.dark .button.button-error:not(:disabled) { + --button-depth-color: var(--color-red-800); +} + /* Keep the shared focus indicator when the depth shadow owns box-shadow. */ .button:not(:disabled):focus-visible { box-shadow: var(--button-depth), 0 0 0 1px var(--color-accent); @@ -377,8 +385,16 @@ option { @apply dark:text-white dark:bg-coolgray-100; } -button[isError]:not(:disabled) { - @apply text-red-800 dark:text-red-300 bg-red-50 dark:bg-red-900/30 border-red-300 dark:border-red-800 hover:bg-red-300 hover:text-white dark:hover:bg-red-800 dark:hover:text-white; +.button.button-error { + @apply text-red-800 dark:text-red-300 bg-red-50 dark:bg-red-900/30 border-red-300 dark:border-red-800; +} + +.button.button-error:disabled { + @apply text-red-800 dark:text-red-300 bg-red-50 dark:bg-red-900/30 border-red-300 dark:border-red-800; +} + +.button-error:not(:disabled) { + @apply hover:bg-red-100 hover:text-red-900 dark:hover:bg-red-700 dark:hover:text-white; } button[isHighlighted]:not(:disabled) { diff --git a/resources/views/components/modal-input.blade.php b/resources/views/components/modal-input.blade.php index bb4477e1a..af21714c4 100644 --- a/resources/views/components/modal-input.blade.php +++ b/resources/views/components/modal-input.blade.php @@ -13,6 +13,7 @@ 'wireOpen' => null, 'contentClicks' => true, 'isLarge' => false, + 'fixedHeight' => false, ])
+ class="fixed inset-0 z-99 overflow-hidden">
'application-settings-form application-settings-section relative flex max-h-[calc(100dvh-2rem)] w-full flex-col overflow-hidden', 'lg:w-[95vw]! lg:max-w-7xl!' => $isLarge, 'lg:w-auto lg:min-w-2xl lg:max-w-4xl' => ! $isLarge, + 'sm:h-[40rem]' => $fixedHeight, ]) style="box-shadow: 0 0 0 1px var(--coollabs-hairline), var(--shadow-modal)">
diff --git a/resources/views/layouts/base.blade.php b/resources/views/layouts/base.blade.php index 03cb21f53..ffeefb587 100644 --- a/resources/views/layouts/base.blade.php +++ b/resources/views/layouts/base.blade.php @@ -184,7 +184,7 @@ @section('body') - +