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 a search by name #2

Open
macMikey opened this issue Aug 23, 2022 · 5 comments
Open

add a search by name #2

macMikey opened this issue Aug 23, 2022 · 5 comments
Labels
enhancement New feature or request

Comments

@macMikey
Copy link

this project could use a search function. if i want a checkbox across all icon families, i could pull them all up at the same time

@bwmilby
Copy link
Owner

bwmilby commented Aug 23, 2022

Yes, that could be useful.

@bwmilby
Copy link
Owner

bwmilby commented Aug 30, 2022

Thinking about the best way to present this option with the limited space in the stack design. Initially thinking that a floating window for the search UI would be one way to handle this.

@bwmilby bwmilby added the enhancement New feature or request label Aug 30, 2022
@bwmilby
Copy link
Owner

bwmilby commented Aug 30, 2022

I'm thinking that part of this would involve creating two special families. The first would be the search result family. The second would be a super-set family that includes everything (for searching across the entire library of icons).

@macMikey
Copy link
Author

i was rolling this around in my head, thinking about how to solve the same problem. one could also iterate through all the families, get the names, and search.
the problem with that is there can also be many other icons that are not installed with LC, but are available, e.g. your original version of this project.
another option might be to, at stack load, build a couple of arrays, one indexed by family, and one by name.

@bwmilby
Copy link
Owner

bwmilby commented Aug 31, 2022

Since the filter command is so efficient, creating a text list and then filtering would probably be the easiest. Would just need to include a delay (no bounce) on the field so it only updated the list when typing was paused (did that on the dictionary to improve search responsiveness). Currently I don't display icon labels in the grid (only on hover) but for a search it would probably be more important to see them. PowerButton would make that easy (or another community button widget that does SVG icons). The code that paints the icons would need to be adjusted to work off of a list directly though (with family and icon components). Currently it just gets the keys of the family array and shows the correct chunk. I'm thinking that is going to be better than building a new combined array and adjusting it.

Initial thought would be to add a magnifying glass (search) icon to the grid card. It would open a palette that allowed the user to select the family to search (with an additional option for all). Default would be the currently selected family. Once a search was started, the grid would start updating with the found icons. Implementing the select all/none and selection in general will take some consideration (currently it sets a flag in the array that holds the family, but there won't be a full array - thinking out loud for now).

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