Skip to content

Commit 8d957d7

Browse files
committed
docs(mobile-client): document search feature and its components
- Add description of core components: HeadlinesSearchBloc and HeadlinesSearchPage - Introduce key functionalities: Multi-Model Search, Real-time Input Handling, Paginated Results, and Contextual Result Display - Improve documentation structure with addition of Key Functionalities section
1 parent 5ee4a18 commit 8d957d7

File tree

1 file changed

+20
-0
lines changed

1 file changed

+20
-0
lines changed

src/content/docs/mobile-client/features/search.mdx

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,23 @@ The Search feature provides a powerful tool for users to find content across the
88

99
## Core Components
1010

11+
- **`HeadlinesSearchBloc`**: This is the engine behind the search feature. It manages the state of the search page, handling everything from user input to fetching and paginating results. It is designed to be flexible, allowing it to query different data repositories based on the content type selected by the user.
12+
13+
- **`HeadlinesSearchPage`**: The primary UI for the search feature. It contains the search bar, a dropdown to select the content type to search for (Headlines, Topics, or Sources), and the results list.
14+
15+
## Key Functionalities
16+
17+
<CardGrid>
18+
<Card title="Multi-Model Search" icon="search">
19+
A key feature of the search page is the ability to search across different types of content. A dropdown in the AppBar allows the user to switch between searching for **Headlines**, **Topics**, or **Sources**. The `HeadlinesSearchBloc` dynamically adjusts its query and the data repository it targets based on this selection.
20+
</Card>
21+
<Card title="Real-time Input Handling" icon="keyboard">
22+
The search is triggered when the user submits their query from the text field in the AppBar. The UI includes a clear button that appears as soon as the user starts typing, providing a smooth user experience.
23+
</Card>
24+
<Card title="Paginated Results" icon="arrow-down">
25+
For queries that return a large number of results, the search page supports infinite scrolling. As the user scrolls to the bottom of the results list, the `HeadlinesSearchBloc` fetches the next page of data, ensuring the app remains responsive and efficient.
26+
</Card>
27+
<Card title="Contextual Result Display" icon="list">
28+
The search results are displayed using context-appropriate widgets. Headlines are rendered using the shared `HeadlineTile` widgets, while Topics and Sources are displayed using their own dedicated item widgets (`TopicItemWidget`, `SourceItemWidget`), ensuring that each result is presented clearly and effectively.
29+
</Card>
30+
</CardGrid>

0 commit comments

Comments
 (0)