PokemonGoers / Catch-em-all

Now that we have tons of data about Pokemon (what they are, where they are, what’s their relationship, what they can transform into, which attacks they can perform, aso) we want to integrate it all into a comprehensive website. This website should contain sections about each Pokemon and its details. Additionally, the website should register the user’s location and tell the user how close is that the predicted pokemon to him/her. Additionally you will be incorporating the apps that were created by project B,C and D into the website. Your group will need to create automated builds and testing for this apps and use continuous integration to pull in new changes in the code repositories. Apps from projects B-D should be packaged and made available on NPM. Ideally when you completed these tasks the webapp component would integrate the apps by “requiring’ them. Here is a possible user story: when a user opens the website or the app the current location of the user will be shown. Additionally, the website/app will show automatically where the pokemons that are currently active are and where the pokemons that we predict to active in the nearest future (i.e. within half a day) will be located (all of this will be available from the app developed in project D). Hopefully, the website will be somewhat crowded by that data. Then, there needs to be a menu bar or something available (e.g. above the map or on the right side to it) that will list currently active or predicted pokemons. Clicking on one of them will make other pokemons on the map disappear, except of this clicked one. Separate web pages would allow the search and presentation of individual Pokemons and the information we gathered about them, including third party data (project A) and twitter analysis (project C)
9 stars 7 forks source link

Add poke-rarity-badge component #96

Closed AlexanderLill closed 8 years ago

AlexanderLill commented 8 years ago

Hi,

I added the pokemon rarity as a star-badge (1 to 3 stars) to the PokeDex page.

Take a look how you like it, I had to test with hardcoded values because the @PokemonGoers/pokedata API is currently offline.

I used the same algorithm as for the rarity texts, e.g. less than 1 in 1000 Pokemon: 3 stars, x in 1000 Pokemon: 2 stars, more than 1 in hundred: 1 star.

PS: I reverted my accidental push to develop with this commit: 146c00a7dbed0e3af92218f5e66455dada474235

... don't ask ;)

AlexanderLill commented 8 years ago

screenshot from 2016-10-08 18-12-21 screenshot from 2016-10-08 18-12-51

Looks like this - feel free to change the design or comment, otherwise I will merge it later today / tomorrow

WoH commented 8 years ago

Not for 3 stars though. Even if you do 5. Everything beyond seems unrealistic.

Edit: If the logic is more difficult you could go for an array with 1's and 0's which is the most flexible solution. However maintaining nested if/else statements is a nightmare, so you'd end up refactoring the method.

AlexanderLill commented 8 years ago

@WoH check one last time if this is also okay, or if you like the stars more in your order :)

WoH commented 8 years ago

The new order is super confusing :/

Edit: Please move completely unrelated Code style changes out of the feature PR's.

AlexanderLill commented 8 years ago

Are you serious? :O

But it looks so much better :P ... Okay... If you want to wait for another opinion, let's wait. If you are super-serious, revert my last commit and let's merge :)

Edit: So it would be better to create a new PR only for Code Style Changes? I see :) I started with a handful of changes, and then they got more and more ... ;) Next time?

WoH commented 8 years ago

Let's say a discussion beaks out on either one of the concerns (feature, code style or whatever in another component). One will always interrupt the merge of the other and it won't be clear which pr is supposed to fix what. Also imagine the PR for feature 1 also improves feature 2 but breaks things there. Other ppl will be clueless as to why it happened or at least it will make things harder to retrace.

I don't know, maybe there is only space for one order of stars to process in my brain. Tag the others for a democratic vote or 1v1 tomorrow in Garching?

Edit: In all seriousness, this is minor, so ready to merge imho.

AlexanderLill commented 8 years ago

Yes, let's ask the others which order they prefer - filled stars in the right, or "normal" order of stars, filling from left to right :) @PokemonGoers/Catch-em-all

I added the stars to the POI-card too. What is the longest pokemon name? Might get too much in one line in that case, dunno if it wraps or just gets cut-off :|

On Oct 8, 2016 20:34, "Wolfgang Hobmaier" notifications@github.com wrote:

Let's say a discussion beaks out on either one of the concerns (feature, code style or whatever in another component). One will always interrupt the merge of the other and it won't be clear which pr is supposed to fix what. Also imagine the PR for feature 1 also improves feature 2 but breaks things there. Other ppl will be clueless as to why it happened or at least it will make things harder to retrace.

I don't know, maybe there is only space for one order of stars to process in my brain. Tag the others for a democratic vote or 1v1 tomorrow in Garching?

— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/PokemonGoers/Catch-em-all/pull/96#issuecomment-252440728, or mute the thread https://github.com/notifications/unsubscribe-auth/AKkaOcH3GnFVU0-1dBM2wMDkGKSKNkDpks5qx-JFgaJpZM4KQY2v .