dphuang2 / PoGoBag

Analyze and share your Pokémon through a locally run server! Official Site access has been stopped as of 12/23/2016
146 stars 49 forks source link

Added types to bag using JSON list #51

Closed webibara closed 8 years ago

webibara commented 8 years ago

I added pokemon types to every pokemon in the bag page, using a JSON list in a file and public images of pokemon types

screen

dphuang2 commented 8 years ago

Hi ibara,

I am in the process of moving the rendering to client-side. The way you implemented the types requires server-side rendering for each Pokemon by inputting their poke_num into a user_helper function. To future proof your work, could you think about implementing it so that the types are stored in the database as part of the Pokemon model rather than calculating the type from a JSON parsed file each time a card is loaded? This is so in the future, when the server makes a AJAX call, the type is received as part of the JSON response of each Pokemon.

To clarify, you could still use the same logic for determining types, but rather than determining the type as each pokemon card is rendered, could you instead migrate the schema such that each pokemon contains a type_1 and type_2 field and you grab from that instead.

Besides that, great work and I look forward to seeing types being implemented.

webibara commented 8 years ago

I can add the types to the model, I'll start working on it :D

ananyosen commented 8 years ago

@ibaramayaka12345 are you on discord?