WatWowMap / ReactMap

Pokemon GO Map frontend built with React
MIT License
123 stars 62 forks source link

feat: added "basic" level gym badge #1004

Closed RradLaw closed 4 months ago

RradLaw commented 4 months ago

This PR adds the gym badge level "basic" (which is the level before Bronze, but still different from "not obtained"). This better matches the options of gym badges in-game.

The changes in file src/features/gym/gymMarker.js allows the badge icon to appear with no border, which is how it is displayed in Pogo.

Previous gym badges/filters: All, None (badge_0), Bronze (badge_1), Silver (badge_2), Gold (badge_3) Updated gym badges/filters: All, None (badge_0), Basic (badge_4), Bronze (badge_1), Silver (badge_2), Gold (badge_3)

image

image

image

Fabio1988 commented 4 months ago

I would suggest to use a different number, at some point we will have platin badges as well, what then? :) Can we try to add it in between and add a migration on stored badges?

RradLaw commented 4 months ago

Thanks for the comments. I've fixed the profile page and updated the ternary.

Can you please point me to the right piece of code for the database migration?

RradLaw commented 4 months ago

I've added the migration now and fixed the badges in the profile. Hopefully this should be all good now!

For the badge icons, I'm using badge_${badge - 1} to reference the gym icons so the icon repositories do not need to be updated.

image

github-actions[bot] commented 4 months ago

:tada: This PR is included in version 1.33.0-develop.1 :tada:

The release is available on GitHub release

Your semantic-release bot :package::rocket:

kamieniarz commented 4 months ago

Something is wrong in profile tab with counters image

RradLaw commented 4 months ago

Something is wrong in profile tab with counters image

What's the issue with it? It looks like the 4 badges in your image are "basic" level gym badges (not Bronze). Were they previously Bronze and the data migration did not work?

kamieniarz commented 4 months ago

Something is wrong in profile tab with counters image

What's the issue with it? It looks like the 4 badges in your image are "basic" level gym badges (not Bronze). Were they previously Bronze and the data migration did not work?

I just added them and they counted as bronze. I also have way less gold and silver ones