Implement search feature (titles, site, labels for current view)#11
Merged
Implement search feature (titles, site, labels for current view)#11
Conversation
- Changed TextField to OutlinedTextField for visible border around search box - Added leadingIcon with Icons.Filled.Search magnifying glass icon https://claude.ai/code/session_01Hfb83UWdF5kRvyBMRHYSWX
Adds search functionality to the bookmark list view: - Search icon in TopAppBar activates search mode - OutlinedTextField with magnifying glass leading icon for search input - Searches across bookmark title, site name, and labels (case-insensitive) - 300ms debounce on search input to avoid excessive queries - Close (X) button to exit search mode, clear button when query is non-empty - "No results found" empty state for searches with no matches New files: - SearchOperators.kt: Simple search query parser (text-only, no operators) Modified files: - BookmarkDao: Added searchBookmarkListItems() with dynamic LIKE query - BookmarkRepository/Impl: Added searchBookmarkListItems() method - BookmarkListViewModel: Search state (query, active) with combine+flatMapLatest - BookmarkListScreen: Search UI in TopAppBar with outlined text field - strings.xml: Added search-related string resources https://claude.ai/code/session_01Hfb83UWdF5kRvyBMRHYSWX
Uses FocusRequester with LaunchedEffect to automatically set keyboard focus to the OutlinedTextField when the user taps the search icon. https://claude.ai/code/session_01Hfb83UWdF5kRvyBMRHYSWX
- Navigation icon: use AutoMirrored.Filled.ArrowBack (matching Settings screens) instead of X when search is active - Clear button: moved inside the OutlinedTextField as trailingIcon instead of a separate action icon outside the search box - Compact search field: reduced height to 44dp with bodyMedium text style and small shape for a more compact appearance in the header https://claude.ai/code/session_01Hfb83UWdF5kRvyBMRHYSWX
Remove height constraint (44dp), bodyMedium text style, and small shape — the default OutlinedTextField sizing prevents text from being chopped off at the bottom. https://claude.ai/code/session_01Hfb83UWdF5kRvyBMRHYSWX
Planning document covering: - Three-dot overflow menu with context-sensitive items - Search all views toggle (ignore current filter) - Full-text content search toggle (query article_content) - Sort feature (newest, oldest, by site, by title) - Dynamic placeholder text reflecting active options - Implementation order and performance considerations https://claude.ai/code/session_01Hfb83UWdF5kRvyBMRHYSWX
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Search icon in TopAppBar activates an OutlinedTextField with magnifying glass leading icon, inline clear (X) trailing icon, and back arrow navigation
Searches title, site name, and labels with case-insensitive LIKE queries, 300ms debounce
Respects current view filters (My List, Archive, Favorites)
Auto-focuses search field on activation
"No results found" empty state
Added spec doc for future enhancements: overflow menu, sort, full-text content search, cross-view search
Test plan
[ ] Tap search icon — field appears with keyboard focused
[ ] Type query — results filter in real time after brief debounce
[ ] Clear icon (X) inside field clears text, results return to full list
[ ] Back arrow exits search mode entirely
[ ] Search works correctly within My List, Archive, and Favorites views
[ ] No-results state displays when query matches nothing
[ ] Opening a bookmark from search results shows content correctly
https://claude.ai/code/session_01Hfb83UWdF5kRvyBMRHYSWX