mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-14 20:17:05 +00:00
fix(ui): cap helper popup width and share destination status
Limit helper info popups to 320px with normal text wrapping so content stacks vertically. Use the shared status-summary on the application destination card instead of custom status badges.
This commit is contained in:
1 parent
4539d1442e
commit
7c6d00c8de
4 files changed
+27
-21
No files matched your search
@@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
it('uses the shared status summary in the primary application server card', function () {
|
||||
$view = file_get_contents(resource_path('views/livewire/project/shared/destination.blade.php'));
|
||||
$applicationSection = str($view)->before('@else')->value();
|
||||
|
||||
expect($applicationSection)
|
||||
->toContain('<x-status-summary :status="$resource->status" />')
|
||||
->not->toContain('<x-status :resource="$resource"');
|
||||
});
|
||||
@@ -86,11 +86,21 @@ test('helper popup stays within the visual viewport on mobile', function () {
|
||||
->toContain('window.visualViewport')
|
||||
->toContain('viewport?.offsetLeft')
|
||||
->toContain('viewport?.offsetTop')
|
||||
->toContain('max-width: ${availableWidth}px;')
|
||||
->toContain('max-width: ${popupWidth}px;')
|
||||
->toContain('max-height: ${availableHeight}px;')
|
||||
->toContain('overflow-y: auto;');
|
||||
});
|
||||
|
||||
test('helper popup width is capped while allowing content to wrap vertically', function () {
|
||||
$helper = file_get_contents(resource_path('views/components/helper.blade.php'));
|
||||
|
||||
expect($helper)
|
||||
->toContain('const maxPopupWidth = 320;')
|
||||
->toContain('const popupWidth = Math.min(maxPopupWidth, availableWidth);')
|
||||
->toContain('max-width: ${popupWidth}px;')
|
||||
->toContain('whitespace-normal');
|
||||
});
|
||||
|
||||
test('helper popup supports focus dismissal and tooltip aria relationships', function () {
|
||||
$helper = file_get_contents(resource_path('views/components/helper.blade.php'));
|
||||
|
||||
|
||||
Reference in new issue
Block a user