1
0
mirror of https://github.com/immich-app/immich.git synced 2025-08-10 23:22:22 +02:00

fix(mobile): fix text search (#14873)

* fix(mobile): fix text search

* chore(mobile): add tests for SearchPage

* fix(mobile): fix render overflow for small screens

Needed for SearchPage test to not throw overflow error

* chore(mobile): update import_rule_openapi

* styling

* preserve styling and skip a test

---------

Co-authored-by: Alex <alex.tran1502@gmail.com>
This commit is contained in:
John Stef
2025-01-07 18:26:14 +02:00
committed by GitHub
parent 776be7d205
commit c148a28a82
9 changed files with 215 additions and 8 deletions

View File

@@ -441,19 +441,15 @@ class SearchPage extends HookConsumerWidget {
}
handleTextSubmitted(String value) {
if (value.isEmpty) {
return;
}
if (isContextualSearch.value) {
filter.value = filter.value.copyWith(
filename: null,
filename: '',
context: value,
);
} else {
filter.value = filter.value.copyWith(
filename: value,
context: null,
context: '',
);
}
@@ -468,6 +464,7 @@ class SearchPage extends HookConsumerWidget {
Padding(
padding: const EdgeInsets.only(right: 14.0),
child: IconButton(
key: const Key('contextual_search_button'),
icon: isContextualSearch.value
? const Icon(Icons.abc_rounded)
: const Icon(Icons.image_search_rounded),
@@ -496,6 +493,7 @@ class SearchPage extends HookConsumerWidget {
),
),
child: TextField(
key: const Key('search_text_field'),
controller: textSearchController,
decoration: InputDecoration(
contentPadding: prefilter != null
@@ -551,6 +549,7 @@ class SearchPage extends HookConsumerWidget {
child: SizedBox(
height: 50,
child: ListView(
key: const Key('search_filter_chip_list'),
shrinkWrap: true,
scrollDirection: Axis.horizontal,
padding: const EdgeInsets.symmetric(horizontal: 16),
@@ -580,6 +579,7 @@ class SearchPage extends HookConsumerWidget {
currentFilter: dateRangeCurrentFilterWidget.value,
),
SearchFilterChip(
key: const Key('media_type_chip'),
icon: Icons.video_collection_outlined,
onTap: showMediaTypePicker,
label: 'search_filter_media_type'.tr(),