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

Juliano/op 677 add user badge #132

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

juliano-quatrin-nunes
Copy link
Contributor

@juliano-quatrin-nunes juliano-quatrin-nunes commented Jan 16, 2025

Implemented:

  • Refactor special badges (separate from normal badges)
  • Create user badges read model + table
  • Listen to quest and track completed events to create user badges

Not implemented:

  • Create base strategy and factory for special badges verify and rewarding (OP 678)

Preview:

Screen.Recording.2025-01-16.at.18.24.56.mov

Copy link

linear bot commented Jan 16, 2025

OP-677 Add user badge

Copy link

vercel bot commented Jan 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
op-govquests ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 20, 2025 9:44pm

@juliano-quatrin-nunes juliano-quatrin-nunes changed the base branch from main to juliano/op-676-ui-for-achievements-page January 16, 2025 13:58
withTitle
header={`BADGE #${index + 1}`}
header={`${badge.badgeable.__typename} BADGE #${badge.displayData.sequenceNumber}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you trust the typename to be something readable?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I have done some testing and I think yes, it's supposed to be either Quest or Track

Copy link
Contributor

@ribeirojose ribeirojose left a comment

Choose a reason for hiding this comment

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

validates :display_data, presence: true
validates :badge_type, presence: true
validates :badge_data, presence: true
validates :points, presence: true, numericality: {only_integer: true, greater_than_or_equal_to: 0}
Copy link
Contributor

Choose a reason for hiding this comment

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

Remind me -- users will get these after satisfying a set of requirements, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes! I'm creating something related to this on #138

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

Successfully merging this pull request may close these issues.

2 participants