Zarel / Pokemon-Showdown-Dex

Pokémon Showdown's Pokédex
MIT License
107 stars 77 forks source link

Long names cover the description in search results. #28

Open Volbla opened 11 months ago

Volbla commented 11 months ago

dexlap

This is because utilitychart.css hardcodes the width of these columns. 120px for the name and 488px for the description. But that's not a showdown-dex file, it's a showdown-play file. Looking up how it affects the teambuilder's layout:

playlap

The difference comes from pokedex.css specifying .utilichart a { white-space: nowrap; }

The simplest fix for this is to make the description column float: right; instead. Though it wouldn't quite work in the teambuilder if the chat is closed and the description ends up on the other side of the screen. Another option would be to make this a proper table. The name-column would auto-size to the widest element, making the descriptions evenly offset from the left. I don't know if you can put a link around an entire row, but i'm sure that can be solved one way or another.

In either case, setting hard dimensions on variably sized content like text seems like a bad idea. I'd rather have some dynamic boxes if it means everything is readable.