Implement search bar at the top of the rooms list #123
Labels
enhancement
New feature or request
good first issue
Good for newcomers
help wanted
Looking for help from anyone!
Milestone
This feature simply acts as a local filter for the list of rooms currently being displayed. It does not perform any remote search for rooms or any other form of server requests for data. It only looks at the list of currently-known rooms, including both joined and invited rooms.
There are many ways one could implement this:
all_rooms
vector in theRoomsList
struct:robrix/src/home/rooms_list.rs
Line 202 in 106033d
RoomPreviewEntry
, namely the set of published addresses/aliases for the room.Client::rooms_filtered()
function with the appropriateRoomStateFilter
Client::joined_rooms()
andClient::invited_rooms()
functionOptionally, you can also include left rooms (rooms the user had joined in the past but has since left) in the search.
Supported search terms
The keywords entered in the rooms list search bar should match on all of the following strings:
"Matrix Rust SDK Development"
"#matrix-rust-sdk-dev:flipdot.org"
"!qSsPTKDfMGYqhgiLPJ:flipdot.org"
Upon typing one or more characters in the search bar, the list should automatically be refreshed (without the user having to click a button or press Enter/Return), and only the Rooms that (partially) match the terms should be shown.
Then, also after typing at least one character, a small X (❌) icon button should be shown on the right-hand side of the
TextInput
search bar, which allows the user to clear the entered search terms. Upon clicking that, or when the search bar text is deleted/cleared, all filters should be automatically removed and all known rooms should be displayed.When the search bar is empty, it should display the text "Filter rooms..." or "Room name, alias, or ID...", or something similar.
The text was updated successfully, but these errors were encountered: