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

Alias filter #51

Open
wants to merge 9 commits into
base: master
Choose a base branch
from
Open

Alias filter #51

wants to merge 9 commits into from

Conversation

Minterl
Copy link

@Minterl Minterl commented Feb 23, 2025

Press "/" when searching through new devices to filter them by alias via a popup dialog.
I would be happy to swap out the String::contains with a fuzzy search algorithm, but I figured not to be worth the extra dependency.

@pythops
Copy link
Owner

pythops commented Feb 24, 2025

Thanks for the PR 🙏
I like the idea of filtering, I just have couple of comments:

  1. Show filter popup only when the discovered devices are not empty
  2. Highlight with color the matching pattern in the name of the devices.
  3. Maybe instead of the popup, having it at the bottom of the block Discovered devices would be better in term of the ux. and when the discarded (with esc for example) then the filter is gone.

I am willing to collaborate on this one if you need my help :)

@Minterl
Copy link
Author

Minterl commented Feb 24, 2025

I agree with those points and will get to implementing them when I can.
I also seem to have introduced a bug I've experienced a few times but can't seem to reproduce. I get a "not found" error of some kind if I remember correctly.
On another note, forgive me if my code isn't exactly idiomatic with respect to what is commonplace in Ratatui. This is my first time with the library and I am learning as I go.

@pythops
Copy link
Owner

pythops commented Feb 25, 2025

no worries, I really appreciate your initiative to contribute, we are all here to learn. Again, let me know if you want to join forces and split the tasks so we can work on it together.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants