feature: add search bar for collect page#2235
Conversation
| for (List<CollectedBangumi> list in collectedBangumiRenderItemList) { | ||
| if (collectController.searchText.isNotEmpty) { | ||
| list.removeWhere((item) { | ||
| return !item.bangumiItem.nameCn.contains(collectController.searchText) && |
There was a problem hiding this comment.
SUGGESTION: Case-sensitive search may miss matches
String.contains is case-sensitive, so searching naruto will not match a title stored as Naruto. For the English name field in particular, users likely expect case-insensitive matching. Consider lower-casing both sides, e.g. normalize searchText once and compare against nameCn.toLowerCase() / name.toLowerCase().
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
Code Review SummaryStatus: 2 Issues Found | Recommendation: Optional improvements before merge Overview
Incremental review of commit Issue Details (click to expand)WARNING
SUGGESTION
Other Observations (not inline-commentable / UX-only)
Resolved since last review: The previous touch-device hover/opacity issue and the floating bar overlapping the grid/FAB are no longer applicable — the floating Files Reviewed (3 files)
Fix these issues in Kilo Cloud Previous Review Summary (commit 0dd4aff)Current summary above is authoritative. Previous snapshots are kept for context only. Previous review (commit 0dd4aff)Status: 1 Issue Found | Recommendation: Optional improvements before merge Overview
Issue Details (click to expand)SUGGESTION
Other Observations (not inline-commentable / UX-only)Non-blocking observations in the changed code:
Files Reviewed (3 files)
Reviewed by claude-opus-4.8 · 279,242 tokens |
|
此PR的代码很棒,但是 UI/UX 有些太糟糕了,搜索框叠放在页面下方很奇怪 |
|
我的想法是考虑到手机端操作会方便一点,并且放在顶部的话会和现有网络搜索的按钮有视觉冲突,如果有什么其他好想法的话我可以改一下 |
|
可以在 #2106 提到的群组中进一步讨论 UI/UX 的问题 |
|
OK,已加入 |
| bool showDelete = false; | ||
| bool syncCollectiblesing = false; | ||
| bool searchBarHovering = false; | ||
| late final FocusNode _searchEntryFocusNode = FocusNode(); |
There was a problem hiding this comment.
WARNING: _searchEntryFocusNode is created here but never disposed. The dispose() method (lines 162-166) disposes tabController and searchController, but not this FocusNode. An undisposed FocusNode leaks resources and is flagged by the Flutter analyzer.
| late final FocusNode _searchEntryFocusNode = FocusNode(); | |
| late final FocusNode _searchEntryFocusNode = FocusNode(); |
Then add _searchEntryFocusNode.dispose(); inside dispose().
Reply with @kilocode-bot fix it to have Kilo Code address this issue.
add a search bar for collect page to filter bangumi by nameCn and name.
related issuse #2193