Bentheburrito / sacastats

A stat site for Connery's SaCa outfit members. Built with Elixir and Phoenix
MIT License
2 stars 0 forks source link

Codebase Cleanup pass (CharacterController) #126

Closed Bentheburrito closed 2 years ago

Bentheburrito commented 2 years ago

I moved all the helper fns in CharacterControllers to new helper/context modules, SacaStats.{Characters, Conversions, Weapons} and optimized some of them (lmk if you have questions!). I made a bunch of other changes, like consolidating our two maybe_to_int fns into one under Utils.

To Test

Visit all pages (especially the character ones), make sure all content looks correct

dm0896665 commented 2 years ago

Nice consolidation! But I do have a question about weapons_not_found.html.heex. When would this end up being used? I am just wondering because we do have unknown weapon images that we could use.

Bentheburrito commented 2 years ago

Nice consolidation! But I do have a question about weapons_not_found.html.heex. When would this end up being used? I am just wondering because we do have unknown weapon images that we could use.

Good question - I thought about having an error page that displays when loading the weapon stats failed for some reason (e.g. Census is down and we don't have it cached). I just made that page on a whim, so since it doesn't really belong in this PR (and doesn't actually have any content), I can create an actual issue for it. Thanks for asking!

dm0896665 commented 2 years ago

Ah, okay, that makes sense.