seastan / dragncards

Multiplayer online card game platform written in Elixir, Phoenix, and React. Drag and Drop provided by React-Beautiful-DND.
https://dragncards.com/
77 stars 41 forks source link

Drag into browse dialog bug #74

Open morvael opened 1 month ago

morvael commented 1 month ago

Browse dialog somehow remembers how many cards it wants to display (even if launched with option to show all cards). Thus, if one drags a new card into browse dialog as "last card" it will disappear until dialog is hidden and re-launched. If one drags new card into position of existing card, the new card will be visible, but the last card from the existing list will disappear.

morvael commented 1 month ago

This cutting behavior is ok if a limit was set, but not when it's set to unlimited.

morvael commented 1 month ago

It's best if there's a limit - no new cards can appear from the deck, but if new card is dropped into this limited view, all cards are visible (X - existing cards, N - new card): XXX -> XNXX. When a card is removed, no new cards are added when one of them is removed: XXX -> XX. Imagine you took XXX into hand, so you can add a card there, or remove, but you'll not magically get new cards from a deck inserted into your hand.

If there's no limit all cards should be shown, including those dropped into view.