Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement search bar at the top of the rooms list #123

Open
kevinaboos opened this issue Aug 21, 2024 · 1 comment · May be fixed by #232
Open

Implement search bar at the top of the rooms list #123

kevinaboos opened this issue Aug 21, 2024 · 1 comment · May be fixed by #232
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Looking for help from anyone!

Comments

@kevinaboos
Copy link
Member

kevinaboos commented Aug 21, 2024

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:

Optionally, 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:

  1. Each room's display name
    • example: "Matrix Rust SDK Development"
  2. Each room's published addresses/aliases
    • example: "#matrix-rust-sdk-dev:flipdot.org"
  3. Each room's internal room ID
    • example: "!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.

@github-project-automation github-project-automation bot moved this to Ready in Robrix Aug 21, 2024
@kevinaboos kevinaboos added enhancement New feature or request good first issue Good for newcomers help wanted Looking for help from anyone! labels Aug 21, 2024
@kevinaboos kevinaboos moved this from Ready to In progress in Robrix Aug 29, 2024
@kevinaboos
Copy link
Member Author

With #224 in place, this should be much easier to do. It should also be clearer on how to implement it based on comments in RoomsList and the RoomDisplayFilter type added in that PR.

@tyreseluo tyreseluo self-assigned this Nov 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Looking for help from anyone!
Projects
Status: In progress
Development

Successfully merging a pull request may close this issue.

2 participants