Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: added "basic" level gym badge #1004

Merged
merged 4 commits into from
Apr 21, 2024
Merged

Conversation

RradLaw
Copy link
Contributor

@RradLaw RradLaw commented Apr 16, 2024

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

Copy link
Collaborator

@TurtIeSocks TurtIeSocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Awesome, thank you for the contribution! You didn't have to add all of the locales, as they're generated when merged to main but you saved me some OpenAI credits, so thanks for that! @Petap0w, @ReuschelCGN / @Fabio1988, and @lenisko if you can please provide feedback on your respective human translations though that would be great!

I left one comment in the files changed, but it's nothing major, just code format nitpicking. You'll need to do something similar in the User Profile dialog as well as you currently end up with this:
Screenshot 2024-04-16 at 9 47 23 AM

"
/>`
${
badge != '4'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Whenever possible I try to do "positive" ternary checks to try and keep it consistent and clearer so let's change this to badge == '4' ? '' : ...etc

@Fabio1988
Copy link
Contributor

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?

@@ -469,6 +469,7 @@
"badge_1": "Bronze",
"badge_2": "Silber",
"badge_3": "Gold",
"badge_4": "Einfach",
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"Basis" @ReuschelCGN ? :)

@RradLaw
Copy link
Contributor Author

RradLaw commented Apr 16, 2024

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
Copy link
Contributor Author

RradLaw commented Apr 16, 2024

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

packages/locales/lib/human/pl.json Outdated Show resolved Hide resolved
Copy link
Collaborator

@TurtIeSocks TurtIeSocks left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry for the delay, this is looking great now!

@TurtIeSocks TurtIeSocks merged commit 9fc5909 into WatWowMap:develop Apr 21, 2024
2 checks passed
Copy link

🎉 This PR is included in version 1.33.0-develop.1 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

@kamieniarz
Copy link
Contributor

Something is wrong in profile tab with counters
image

@RradLaw
Copy link
Contributor Author

RradLaw commented Apr 22, 2024

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
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants