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 custom function for the search box #7

Open
gumbarros opened this issue Oct 9, 2022 · 3 comments
Open

Implement custom function for the search box #7

gumbarros opened this issue Oct 9, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@gumbarros
Copy link
Owner

Currently the searchbox only filter tools by menu name. The best way to search would be adding search tags plus the tool name in the menu and home page.

@gumbarros gumbarros added the enhancement New feature or request label Oct 9, 2022
@kphanipavan
Copy link
Contributor

Here's a search I deviced:

let x be the search term,
The results have to be list in the order below:

  1. name starts with x
  2. name contains x
  3. tag starts with x
  4. tag contains x
  5. description starts with x
  6. desc contains x

For this, we can add static data members to the stateless page widgets and use it as key for searching.

Also, as the list increases, we can asynchronously add matched to the search results.
Ex: Loop over 1 and 2, show matches, loop over 3,4 and append is search box is still open, and so on.

Also, you mentioned tags, plural. Are multiple necessary? help me understand with a example plis.

@gumbarros
Copy link
Owner Author

gumbarros commented Oct 10, 2022

Great algorithm! I was thinking in add the search tags on the Tool class as a List like the original DevToys and then add to the DTO object LinuxMenuItem.
Example for JSON Formatter(I'm on the phone and maybe the syntax is incorrect):

@override
List<String> get searchTags => ["Formatter","JSON","Sort"]

@kphanipavan
Copy link
Contributor

https://github.com/fzyzcjy/flutter_smooth

Ensures smooth listview animations regardless of the size.

Found it on reddit, might be useful when search is being implemented.

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

No branches or pull requests

2 participants