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

Improvements to card search #242

Open
tooomm opened this issue Apr 6, 2021 · 5 comments
Open

Improvements to card search #242

tooomm opened this issue Apr 6, 2021 · 5 comments

Comments

@tooomm
Copy link
Contributor

tooomm commented Apr 6, 2021

  • Card search is case sensitive
    case

  • Back sides or different faces are not considered for the search (Probably also an issue with split/aftermath/fuse and meld)
    dfc
    dfc

  • One can not search the card text for e.g. keywords, removal effects, certain token generators etc.pp.
    haste

  • It can only be searched for one Type ("Human" and "Warlock" work on their own)
    types
    This might not be too problematic.

@Senryoku
Copy link
Owner

Senryoku commented Apr 6, 2021

  • Fixed by d5c9228
  • Addressed by 079c801 for double faced cards, I still have to check for split cards.
  • I knew this would come up :D I didn't want to include the whole oracle text in the db for the search feature, I don't think this is worth the increase in db size (I've already added the subtypes only for this feature), but I'll do some experiments anyway
  • Fixed by a8bcf50 (Not sure if useful either, but this was an easy fix)

@Senryoku
Copy link
Owner

Senryoku commented Apr 6, 2021

Adding oracle text also allow for some other minor improvements (better placeholders while image are loading, full text description on mouseover) for a 16% increase in DB size (and thus of most requests while drafting), maybe this is worth it?
#243

Edit: Deployed PR doesn't work because the app exceeds maximum memory usage during startup... I could try to optimize it but I'm really not sure it's worth it :)

Edit 2: I optimized application startup for memory usage, allowing it to run on heroku, if you want to give it a try.

@tooomm
Copy link
Contributor Author

tooomm commented Apr 7, 2021

Hmm, thanks for the fixes and checking possibilities for adding text.
Storing ability keywords only could be confusing. Maybe at a later point with an improved db/memory usage, search is a nice enhancement as is already.


Only split cards are left then. 👌

Two other observations:

  • Did you consider exact matches only? It can be quite confusing when some parts in the middle of a word match and you get unexpected results:
    exact
    At least matches that are not right at the start or ending of a word mess it up a bit. Like one would probably still want to find warewolf when typing wolf. Maybe that's something for a later fine tuning.

  • Search is english only, no matter what language one uses for card art displaying. A tiny hint in the placeholder text (Search... (EN)), or a tooltip? It could also tell you where people can search in.


Typed this up already when your edit appeared with the memory fix. Will report back in one hour or so.

@Senryoku
Copy link
Owner

Senryoku commented Apr 7, 2021

  • To match exact words you can type a space before/after your query, I don't think matching exact words only by default would be expected here.
  • I'll probably add a tooltip at some point, yeah.

@tooomm
Copy link
Contributor Author

tooomm commented Apr 7, 2021

Edit 2: I optimized application startup for memory usage, allowing it to run on heroku, if you want to give it a try.

Text search works nicely, also on back sides (not split yet).

To match exact words you can type a space before/after your query, I don't think matching exact words only by default would be expected here.

Hehe, funky workaround with the space. Kinda works.


Two more:

  • Search field is not cleared on game start. It's preserved from your current game when you open a new sealed pool for example or a second draft is starting.
  • Could be handy to set the focus to the search field after clearing it with x to start typing a new search right away

Edit: Re oracle search...
A new use case for searching within the card text are the new Lesson cards from STX, one wants to know how much Learn there is in a deck to access them.

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