jkomoros / boardgame

An in-progress framework in golang to easily build boardgame Progressive Web Apps
Apache License 2.0
31 stars 4 forks source link

Game types should have an icon #445

Open jkomoros opened 7 years ago

jkomoros commented 7 years ago

And that icon should be shown in e.g. boardgame-game-item (e.g. in list-games-view).

Originally captured in #435

jkomoros commented 7 years ago

The pattern we've used elsewhere is having the render-*-GAMENAME component, but it's quite finicky to do that loading, especially for an icon that is pretty dumb and will be used lots of places.

Maybe the option is to have the thing have an import that creates an icon with the id of boardgame-GAMENAME. Then you'd have a config element that really just imports the gameicons for all of the icons in this server.

How bad would it really be to require the gamemanager to splat out its icon? as an SVG path?

jkomoros commented 7 years ago

Each game type should have a boardgame-icons-GAMENAME element. In it, it should define an iconset named GAMENAME, with at least one icon named "icon".

In list games, when manager comes back, we just go through and import all of those icon sets. then we just set that icon name.

(How do we detect when the icon doesn't exist and fall back to a generic one?)