Skip to content

Conversation

@imnasnainaec
Copy link
Collaborator

@imnasnainaec imnasnainaec commented Nov 26, 2025

Add sense count badge to current domain tile

Changes

Backend:

  • Added GetDomainSenseCount(projectId, domainId) endpoint to StatisticsController
  • Added CountSensesWithDomain method to WordRepository for efficient MongoDB querying
  • Added corresponding service and interface methods

Frontend:

  • Display badge with sense count in upper corner of current domain tile
  • Badge shows even when count = 0
  • Tooltip shows "Number of words gathered in this domain" on hover
  • Graceful error handling - failed API calls simply don't show the badge

This change is Reviewable

@github-actions
Copy link

⚠️ Commit Message Format Issues ⚠️
commit 24af9473ef:
1: T1 Title exceeds max length (79>72): "Add backend statistics endpoints for domain sense count and progress proportion"

@imnasnainaec
Copy link
Collaborator Author

@copilot Remove from this pr all changes related to showing a progress bar. Keep every change needed to show the number badge on the current domain tile (and to test those changes).

After changing anything in Backend/Controllers/, set up a venv per README instructions (https://github.com/sillsdev/TheCombine?tab=readme-ov-file#python), then with the backend running (npm run backend) do python ./scripts/generate_openapi.py.

Copy link
Contributor

Copilot AI commented Nov 26, 2025

@imnasnainaec I've opened a new pull request, #4047, to work on those changes. Once the pull request is ready, I'll request review from you.

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.

2 participants