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

Feature request: search by key #3

Open
dizcza opened this issue Oct 28, 2019 · 2 comments
Open

Feature request: search by key #3

dizcza opened this issue Oct 28, 2019 · 2 comments

Comments

@dizcza
Copy link

dizcza commented Oct 28, 2019

Thank you for providing the object browser.
It'd nice to have a search field where one can look for specific methods and fields.

@titusjan
Copy link
Owner

Thanks for the suggestion. At the moment I don't have much time to work on objbrowser but I'll keep it in mind if continue with it.

Furthermore I'm not sure search functionality is very useful, but perhaps you can explain more about your use case.

I can think of two different implementations:

  1. A 'traditional' search box that scrolls to the rows that match the text in the search box.
  2. A filter where only the rows that match the text in the filter are displayed. The other rows are hidden.

The first option might be useful to quickly jump to a row, but since the rows are already ordered alphabetically, it doesn't add much.

The second option may be handy for exploring. But it is more work to implement.

However the biggest draw back, for both options, is that it is only possible to search in the tree-rows that already have been expanded by the user. It cannot search through the entire tree because the tree has an infinite depth. Some nodes end up in a loop (e..g a=6; a.real.real.real. <etc>). This makes the search functionality confusing and less useful.

@dizcza
Copy link
Author

dizcza commented Nov 11, 2019

I meant the second option - filter while typing. Even though the list is sorted, you might want to look for methods/attributes that contain (not start with) keyword.
I was looking for smart inspectors in python and found only the objbrowser. Then I started my own project that does what I want. It's here https://github.com/dizcza/pinspect.
I'll make it graph-oriented so that it could deal with infinite depths and cycles.

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

No branches or pull requests

2 participants