jkomoros / card-web

The web app behind thecompendium.cards
Apache License 2.0
46 stars 8 forks source link

Find card to link dialog shows cards in default set order #545

Closed jkomoros closed 2 years ago

jkomoros commented 2 years ago

Ever since I think #199 was fixed, maybe? And maybe only for new working notes cards?

jkomoros commented 2 years ago

Also, maybe related, maybe separate, but when you open the "card to reference" dialog, it doesnt' show similar cards by default, also roughly in that time horizon of when this other thing broke

jkomoros commented 2 years ago

The way to get it to repro is on NEW cards that haven't yet been saved (so their previous content is nothing), similar cards don't show up, it's just a generic set of all cards in order.

jkomoros commented 2 years ago

Bisect says 63d3b7e48d4c34b9693374ab72fad004a1f7a610 broke it

jkomoros commented 2 years ago

The similar cards filter, in the find dialog, is being passed an undefined editingCard, so it's showing ersults for a totally blank card.

I think what's happening is that we have, erroneously, never been passing the editing card to the find dialog constructor. It used to be that by default it would show the most recently updated cards, which is not similar cards but is sometimes useful, but it never showed similar cards for the CURRENT card content as desired--but that often was close enough to what you wanted. So it never worked, but it used to not work in a way that was less obviously broken.