mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-13 16:14:42 +00:00
feat(ui): polish domains, storage, env vars and resource nav
Improve project resource UIs: sort domains by DNS failure, stop re-adding www pairs on refresh, lazy-load storage tabs with counts, tighten env-var tables, keep application tabs active across Livewire polls, unify database type labels, and update related CSS/JS and tests.
This commit is contained in:
1 parent
dbc6f5e08c
commit
a7a06aa6c8
75 files changed
+3909
-1173
No files matched your search
@@ -0,0 +1,46 @@
|
||||
<?php
|
||||
|
||||
/**
|
||||
* Settings nav sub-items scroll a section into view and flash its border
|
||||
* for 500ms so the user can see which card was targeted.
|
||||
*/
|
||||
test('settings section highlight animation is defined for 500ms', function () {
|
||||
$appCss = file_get_contents(resource_path('css/app.css'));
|
||||
|
||||
expect($appCss)
|
||||
->toContain('@keyframes application-settings-section-highlight')
|
||||
->toContain('.application-settings-section.is-section-highlight')
|
||||
->toContain('.application-settings-section.is-section-highlight::after')
|
||||
->toContain('animation: application-settings-section-highlight 500ms ease-out forwards')
|
||||
->toContain('border: 0.5px solid var(--color-accent)')
|
||||
->toContain('var(--color-accent)');
|
||||
});
|
||||
|
||||
test('settings navigation leaves room for the default tab focus ring', function () {
|
||||
$appCss = file_get_contents(resource_path('css/app.css'));
|
||||
|
||||
preg_match('/\.application-settings-navigation\s*\{[^}]*\}/s', $appCss, $nav);
|
||||
|
||||
// Tab focus keeps the global ring-2 + ring-offset-2; do not thin it.
|
||||
expect($appCss)
|
||||
->not->toContain('.menu-item:focus-visible')
|
||||
->not->toContain('box-shadow: inset 0 0 0 0.5px var(--color-accent)')
|
||||
->and($nav[0] ?? '')
|
||||
->toContain('padding-right: 0.375rem');
|
||||
});
|
||||
|
||||
test('configuration sidebar subitems trigger section highlight on scroll', function () {
|
||||
$blade = file_get_contents(resource_path('views/livewire/project/application/configuration.blade.php'));
|
||||
$appJs = file_get_contents(resource_path('js/app.js'));
|
||||
|
||||
expect($blade)
|
||||
->toContain('scrollToSection(id)')
|
||||
->toContain('window.scrollToSettingsSection?.(id)')
|
||||
->toContain("scrollToSection('{{ \$section['id'] }}')")
|
||||
->and($appJs)
|
||||
->toContain('window.scrollToSettingsSection')
|
||||
->toContain("el.classList.add('is-section-highlight')")
|
||||
->toContain("behavior: 'smooth'")
|
||||
->toContain("addEventListener('scrollend'")
|
||||
->toContain('stableFrames');
|
||||
});
|
||||
Reference in new issue
Block a user