Open annk15 opened 3 months ago
The simplest way to do this would probably be to make a seperate page for card search. The index being on keywords with a clear Button/hyperlink at the top to search for cards.
Another potential way could be to have a toggle Button above/below The searchbar to toggle between different searches
Yes having different switch buttons under the search bar to help narrow down the search result sounds like a good idea. We can have keywords set as default but also options to filter by cards or expansions to show all keywords introduced in that expansion.
I think it would be beneficial to be able to search for a card and see all keywords related to that card
If we want to implement this it should only show the keywords if the user has typed the exact card name to prevent issues where lazy search matches both keywords and card names at the same time.
This may still be an issue if some cards have strange names like a card named "death" will also match the tag "deathtouch" so we need a way to make this clear in the frontend by writing some text when it finds a matching card or only allow searching for cards when a prefix is added to the search box.
Another way is to show a suggestion list when searching and show a tag at the opposite site of the list to show if it is a card or tag and update the view when one is selected. In this case we could always show the tags at the top and cards after the matching tags have been listed. I think this would be the best way to solve this as we still could use lazy search for both tags and cards.🃏