From e5f800adf54cbb1548a7336b1fe88c9b3b86165d Mon Sep 17 00:00:00 2001 From: ZhuchkaTriplesix Date: Sun, 11 Oct 2026 15:55:14 +0300 Subject: [PATCH] fix(ui): the new-connection wizard search is a QueryaSearchField Replaces the hand-built box (magnifier outside the field and a second border) with QueryaSearchField at lg, with live filtering kept, and sets the category and database-type dropdowns to lg explicitly. Refs #1442 --- .../connections/new_connection_dialog.dart | 47 ++++++------------- 1 file changed, 14 insertions(+), 33 deletions(-) diff --git a/lib/features/connections/new_connection_dialog.dart b/lib/features/connections/new_connection_dialog.dart index 26ddf8aa..567ec748 100644 --- a/lib/features/connections/new_connection_dialog.dart +++ b/lib/features/connections/new_connection_dialog.dart @@ -117,39 +117,18 @@ class _NewConnectionDialogContentState 'Create new database connection. Find your database driver in the list below.', ).muted().small(), const material.SizedBox(height: 12), - material.Container( - decoration: material.BoxDecoration( - color: theme.muted.withValues(alpha: 0.2), - borderRadius: material.BorderRadius.circular(8), - border: material.Border.all( - color: theme.border.withValues(alpha: 0.4)), - ), - padding: const material.EdgeInsets.symmetric( - horizontal: 12, vertical: 4), - child: material.Row( - children: [ - material.Icon( - material.Icons.search_rounded, - size: 20, - color: theme.mutedForeground, - ), - const material.SizedBox(width: 10), - material.Expanded( - child: TextField( - controller: _searchController, - placeholder: const Text('Search...'), - onChanged: (v) => setState(() { - _searchQuery = v; - if (_selected != null && - !_filteredTypes.any( - (t) => _sameChoice(t, _selected))) { - _selected = null; - } - }), - ), - ), - ], - ), + QueryaSearchField( + controller: _searchController, + size: QueryaControlSize.lg, + debounceDuration: Duration.zero, + onChanged: (v) => setState(() { + _searchQuery = v; + if (_selected != null && + !_filteredTypes + .any((t) => _sameChoice(t, _selected))) { + _selected = null; + } + }), ), const material.SizedBox(height: 12), _FilterDropdowns( @@ -308,6 +287,7 @@ class _FilterDropdowns extends StatelessWidget { const material.SizedBox(height: 4), QueryaDropdown<_Category>( value: category, + size: QueryaControlSize.lg, expandToParent: true, items: _categoryItems, onSelected: (value) { @@ -326,6 +306,7 @@ class _FilterDropdowns extends StatelessWidget { value: selected, hint: filteredTypes.isEmpty ? 'No matches' : 'Select database…', enabled: filteredTypes.isNotEmpty, + size: QueryaControlSize.lg, expandToParent: true, items: [ for (final type in filteredTypes)