Fix fallback badges in card grids - #316
Conversation
|
Thanks, @engelben, for addressing the fallback-label overflow. After testing the shared component across every affected view, I would like to propose a broader version of the change. The tooltip approach creates clipping and interaction problems inside clickable card grids. I prepared an alternative that reuses the existing compact badge style and legend system:
I tested the alternative across desktop and mobile with real card data and different ownership, variant, quantity, wishlist, and fallback combinations. The frontend tests and production build pass without layout overflow or runtime errors. ScreenshotsPokédex species
Set Detail
My Collection
Another user’s collection
Wishlist
Card popup
If you are happy with this direction or have some further ideas, I can update the PR with this implementation. Thanks again for starting the fix! |
|
The overlay is far more elegant, I prefer it! The only concern is how much information we overlay on the cards. My only thought here is that maybe the fallback information is not something most users really care too much about. So a more discrete way of presenting the information is maybe sufficient. Card border highlighting is discrete and maybe an alternative... This raises a parallel issue I have started to feel increasingly. I feel the inconsistency between the views on how cards are presented is a bit jarring. The overlays work very well in the set/card search/collection views. The wishlist and pkedex version with the frame and text beneath is less so, because information is presented in multiple places and ways. The same applies to the card modals. I have a branch on my fork where I was trying to create a unified card modal for all views, but it is still very much a "Spielwiese"... Also been playing with list view for cards vs the grid view... Separate but related ;) |






Motivation
Description
FallbackBadges.jsxwith a single small flag icon (usingFlagfromlucide-react) whencompactis true.aria-labelandtabIndex.data,price,image, andcustomImagebadges unchanged.I considered other options to flag the fallback, such as highlighting the card frame, but found this the least intrusive. Open to alternatives of course. Right now no colors are used in the tt - can be added back of course.
Current behavior:

Compact behavior with this PR:

