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

Add functionality for counting batch actions #3499

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

Conversation

harmitgoswami
Copy link
Collaborator

Fix #3481

This PR adds badge stat counting logic for batch actions.

The initial commit is able to send the badge update logic to translate/src/context/BadgeTooltip.tsx, but the tooltip component doesn't seem to be rendering.

@codecov-commenter
Copy link

codecov-commenter commented Dec 18, 2024

Codecov Report

Attention: Patch coverage is 52.08333% with 23 lines in your changes missing coverage. Please review.

Project coverage is 79.17%. Comparing base (1ea8f48) to head (7621570).
Report is 10 commits behind head on main.

Additional details and impacted files

pontoon/batch/actions.py Outdated Show resolved Hide resolved
pontoon/batch/actions.py Outdated Show resolved Hide resolved
pontoon/base/models/user.py Show resolved Hide resolved
pontoon/batch/actions.py Outdated Show resolved Hide resolved
pontoon/batch/actions.py Outdated Show resolved Hide resolved
@@ -87,9 +87,9 @@ export function useSendTranslation(): (ignoreWarnings?: boolean) => void {
);

const badgeLevel = content.badge_update?.level;
if (badgeLevel) {
if (content.badge_update?.name && badgeLevel) {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Since this pattern is used twice, could you please instead declare it above?

const badgeName = content.badge_update?.name;,

Copy link
Collaborator

@mathjazz mathjazz left a comment

Choose a reason for hiding this comment

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

Great work! 👍

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.

Award badges for batch actions
3 participants