From 6297ac6c88a712b8e867d6442ea81aa7abc8cb73 Mon Sep 17 00:00:00 2001 From: Andras Bacsai <5845193+andrasbacsai@users.noreply.github.com> Date: Sun, 12 Oct 2025 14:57:45 +0200 Subject: [PATCH 1/5] feat: replace terminal dropdown with searchable datalist component MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Enhanced the terminal server/container selection with a new searchable datalist component: **Terminal View Changes:** - Replaced `x-forms.select` with `x-forms.datalist` for server/container selection - Added search functionality for filtering servers and containers - Fixed form validation by adding hidden input for proper HTML5 validation - Prevented error messages when clearing selection (sets to 'default') **Datalist Component (Single Selection):** - Implemented Alpine.js-powered dropdown with search functionality - Added visual dropdown arrow that rotates when opened - Proper entangle binding for wire:model support - Keyboard support (Escape to close) - Click outside to close behavior - Disabled options filtering (skips disabled options) - Consistent styling with input/textarea components **Styling Improvements:** - Explicit background colors: `bg-white` (light) and `dark:bg-coolgray-100` (dark) - Proper ring border: `ring-1 ring-inset ring-neutral-200 dark:ring-coolgray-300` - Focus states: `focus-within:ring-2 focus-within:ring-coollabs dark:focus-within:ring-warning` - Text colors: `text-black dark:text-white` - Added custom scrollbar styling for dropdown lists - Wire:dirty state support for visual feedback - Proper padding and spacing (`py-1.5`, `px-1`, `px-2`) **Multiple Selection Mode:** - Also updated for consistent styling and scrollbar support - Added proper background colors and focus states 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude --- app/Livewire/Terminal/Index.php | 4 + .../views/components/forms/datalist.blade.php | 149 +++++++++++++++--- .../views/livewire/terminal/index.blade.php | 4 +- 3 files changed, 136 insertions(+), 21 deletions(-) diff --git a/app/Livewire/Terminal/Index.php b/app/Livewire/Terminal/Index.php index 03dbc1d91..6bb4c5e90 100644 --- a/app/Livewire/Terminal/Index.php +++ b/app/Livewire/Terminal/Index.php @@ -61,6 +61,10 @@ private function getAllActiveContainers() public function updatedSelectedUuid() { + if ($this->selected_uuid === 'default') { + // When cleared to default, do nothing (no error message) + return; + } $this->connectToContainer(); } diff --git a/resources/views/components/forms/datalist.blade.php b/resources/views/components/forms/datalist.blade.php index 224ff82ab..7f9ffefec 100644 --- a/resources/views/components/forms/datalist.blade.php +++ b/resources/views/components/forms/datalist.blade.php @@ -98,11 +98,12 @@ {{-- Unified Input Container with Tags Inside --}}
+ wire:loading.class="opacity-50" + wire:dirty.class="dark:ring-warning ring-warning"> {{-- Selected Tags Inside Input --}}