mirror of
https://github.com/coollabsio/coolify.git
synced 2026-08-24 10:05:47 -05:00
fix(ui): position table dropdowns outside overflowing containers
Update Coolify release metadata to version 4.3.7 and nightly 4.3.8.
This commit is contained in:
@@ -2,7 +2,7 @@
|
||||
|
||||
return [
|
||||
'coolify' => [
|
||||
'version' => env('COOLIFY_VERSION') ?: '4.3.6',
|
||||
'version' => env('COOLIFY_VERSION') ?: '4.3.7',
|
||||
'helper_version' => '1.0.15',
|
||||
'realtime_version' => '1.0.17',
|
||||
'railpack_version' => '0.23.0',
|
||||
|
||||
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"coolify": {
|
||||
"v4": {
|
||||
"version": "4.3.6"
|
||||
"version": "4.3.7"
|
||||
},
|
||||
"nightly": {
|
||||
"version": "4.3.7"
|
||||
"version": "4.3.8"
|
||||
},
|
||||
"helper": {
|
||||
"version": "1.0.15"
|
||||
|
||||
@@ -4,13 +4,36 @@
|
||||
'multiselectable' => false,
|
||||
])
|
||||
|
||||
<div class="relative" x-data="{ open: false }" @click.outside="open = false" @keydown.escape.window="open = false">
|
||||
<div @click="open = !open">
|
||||
<div class="relative" x-data="{
|
||||
open: false,
|
||||
panelStyle: 'display: none;',
|
||||
toggle() {
|
||||
this.open = !this.open;
|
||||
|
||||
if (this.open) {
|
||||
this.$nextTick(() => this.updatePosition());
|
||||
}
|
||||
},
|
||||
updatePosition() {
|
||||
const trigger = this.$refs.trigger.getBoundingClientRect();
|
||||
const panel = this.$refs.panel.getBoundingClientRect();
|
||||
const viewportPadding = 8;
|
||||
const left = Math.max(viewportPadding, Math.min(trigger.right - panel.width, window.innerWidth - panel.width - viewportPadding));
|
||||
const spaceBelow = window.innerHeight - trigger.bottom - viewportPadding;
|
||||
const top = spaceBelow >= panel.height
|
||||
? trigger.bottom + 4
|
||||
: Math.max(viewportPadding, trigger.top - panel.height - 4);
|
||||
|
||||
this.panelStyle = `position: fixed; left: ${left}px; top: ${top}px;`;
|
||||
}
|
||||
}" @click.outside="open = false" @keydown.escape.window="open = false"
|
||||
x-on:resize.window="if (open) updatePosition()" x-on:scroll.window="if (open) updatePosition()">
|
||||
<div x-ref="trigger" @click="toggle()">
|
||||
{{ $trigger }}
|
||||
</div>
|
||||
|
||||
<div x-show="open" x-cloak
|
||||
class="listbox-panel absolute top-full! right-0! left-auto! mt-1! {{ $panelClass }}" role="{{ $role }}"
|
||||
<div x-ref="panel" x-show="open" x-cloak :style="panelStyle"
|
||||
class="listbox-panel fixed! top-auto! right-auto! bottom-auto! z-[90]! mt-0! {{ $panelClass }}" role="{{ $role }}"
|
||||
@if ($multiselectable) aria-multiselectable="true" @endif>
|
||||
{{ $slot }}
|
||||
</div>
|
||||
|
||||
@@ -24,8 +24,8 @@ it('renders the standard table toolbar controls', function () {
|
||||
->toContain('wire:model.live="search"')
|
||||
->not->toContain('x-teleport="body"')
|
||||
->not->toContain('floatingDropdown(')
|
||||
->not->toContain('position: fixed')
|
||||
->toContain('absolute top-full')
|
||||
->toContain('position: fixed')
|
||||
->toContain('getBoundingClientRect()')
|
||||
->toContain('x-show="open"')
|
||||
->toContain('aria-multiselectable="true"')
|
||||
->toContain('Reset filters')
|
||||
|
||||
@@ -30,6 +30,20 @@ it('renders the shared page size selector', function () {
|
||||
->toContain('max="100"');
|
||||
});
|
||||
|
||||
it('positions table dropdown panels outside overflowing containers', function () {
|
||||
$html = Blade::render(<<<'BLADE'
|
||||
<x-table.dropdown>
|
||||
<x-slot:trigger><button type="button">Open</button></x-slot:trigger>
|
||||
<button type="button">Option</button>
|
||||
</x-table.dropdown>
|
||||
BLADE);
|
||||
|
||||
expect($html)
|
||||
->toContain('position: fixed')
|
||||
->toContain('getBoundingClientRect()')
|
||||
->toContain('x-on:scroll.window');
|
||||
});
|
||||
|
||||
it('renders compact client-side pagination', function () {
|
||||
$html = Blade::render('<x-client-pagination summary="1-10 of 20" page-size-model="pageSize" storage-key="tests.page-size" />');
|
||||
|
||||
|
||||
@@ -23,9 +23,9 @@ it('publishes v4 branch builds under the commit sha with a traceable internal ve
|
||||
->toContain('ARG COOLIFY_VERSION')
|
||||
->toContain('ENV COOLIFY_VERSION=${COOLIFY_VERSION}')
|
||||
->and($constants)
|
||||
->toContain("'version' => env('COOLIFY_VERSION') ?: '4.3.6'")
|
||||
->and($versions['coolify']['v4']['version'])->toBe('4.3.6')
|
||||
->and($versions['coolify']['nightly']['version'])->toBe('4.3.7')
|
||||
->toContain("'version' => env('COOLIFY_VERSION') ?: '4.3.7'")
|
||||
->and($versions['coolify']['v4']['version'])->toBe('4.3.7')
|
||||
->and($versions['coolify']['nightly']['version'])->toBe('4.3.8')
|
||||
->and($nightlyVersions)->toBe($versions);
|
||||
});
|
||||
|
||||
|
||||
+2
-2
@@ -1,10 +1,10 @@
|
||||
{
|
||||
"coolify": {
|
||||
"v4": {
|
||||
"version": "4.3.6"
|
||||
"version": "4.3.7"
|
||||
},
|
||||
"nightly": {
|
||||
"version": "4.3.7"
|
||||
"version": "4.3.8"
|
||||
},
|
||||
"helper": {
|
||||
"version": "1.0.15"
|
||||
|
||||
Reference in New Issue
Block a user