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

Add channel and node search feature #117

Merged
merged 2 commits into from
Feb 5, 2025

Conversation

rfschmid
Copy link
Contributor

@rfschmid rfschmid commented Feb 4, 2025

Press Ctrl + / while the nodes or channels window is highlighted to start search

Type text to search as you type, first matching item will be selected, starting at current selected index

Press Tab to find next match starting from the current index - search wraps around if necessary

Press Esc or Enter to exit search mode

Press Ctrl + / while the nodes or channels window is highlighted to
start search

Type text to search as you type, first matching item will be selected,
starting at current selected index

Press Tab to find next match starting from the current index - search
wraps around if necessary

Press Esc or Enter to exit search mode
Copy link
Owner

@pdxlocations pdxlocations left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is great! Would it be usefull to filter the nodelist as you type characters in the search bar? This way if you have multiple nodes that start with a prefix, you could display them all, instead of only finding the first one.

Also I'm noticing that if the nodelist updates while I search the selected node index doesn't update so the wrong node is highlighted. Not a deal breaker.

I could merge this now and be happy :-).

Copy link
Owner

@pdxlocations pdxlocations left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Press Tab to find next match starting from the current index - search wraps around if necessary

I read this then immediately forgot it. Solves the search for all the nodes that start with x I complained about in my previous comment. Sorry, very distracted by a 3yr old.

@rfschmid
Copy link
Contributor Author

rfschmid commented Feb 5, 2025

Filter could be useful for sure, it's just a little more complicated so would take a bit more work.

As far as the node index issue, does it resolve and start matching the correct nodes again if you press tab, or is it permanently off until you exit search and start again? It might be the later because I'm saving the list when you start search, I'm not sure if Python is giving me a deep or shallow copy there.

@pdxlocations
Copy link
Owner

does it resolve and start matching the correct nodes again if you press tab

No, the highlight is always offset by the number of nodes that have updated in the last heard sort.

@pdxlocations
Copy link
Owner

Filter could be useful for sure, it's just a little more complicated so would take a bit more work.

The tab is a perfect solution. I don't want this client getting so feature-rich that it doesn't run on an older sbc. Maybe file it for a maybe someday.

@rfschmid
Copy link
Contributor Author

rfschmid commented Feb 5, 2025

does it resolve and start matching the correct nodes again if you press tab

No, the highlight is always offset by the number of nodes that have updated in the last heard sort.

Okay l can fix that before we merge this for sure.

@rfschmid
Copy link
Contributor Author

rfschmid commented Feb 5, 2025

Okay I have to run so I haven't tested this thoroughly but I think it should fix the issue discussed - the index will probably be off until you tab or continue searching, but should fix itself once you do something.

@pdxlocations pdxlocations merged commit 353412b into pdxlocations:main Feb 5, 2025
@rfschmid rfschmid deleted the add-node-search-feature branch February 5, 2025 01:48
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