Skip to content

Comments

feat: implement user analytics feature#3

Open
pqhung3007 wants to merge 1 commit intopreviewfrom
claude/implement-user-analytics-01VRRKywNvEnKLLG731TwNMZ
Open

feat: implement user analytics feature#3
pqhung3007 wants to merge 1 commit intopreviewfrom
claude/implement-user-analytics-01VRRKywNvEnKLLG731TwNMZ

Conversation

@pqhung3007
Copy link
Owner

Implemented comprehensive user analytics feature with both frontend and backend components:

Backend Changes:

  • Added user analytics endpoints to AdvanceAnalyticsEndpoint for metrics (total users, admins, members, guests)
  • Created get_user_work_items_stats() method to retrieve per-user work item statistics
  • Added support for project filtering in user analytics queries
  • Integrated user-analytics tab support in existing analytics endpoints

Frontend Changes:

  • Created UserAnalytics component with three sections:
    1. Metrics cards showing total users by role (admins, members, guests)
    2. Stacked bar chart displaying resolved vs pending work items per active user
    3. Data table with search and CSV export functionality
  • Added custom tooltip for bar chart showing user details (name, avatar, role, work item counts)
  • Implemented UserAnalyticsTable with columns for member name, started, unstarted, and completed work items
  • Added user-analytics tab to analytics navigation

Type & Constants Updates:

  • Extended TAnalyticsTabsBase and TAnalyticsGraphsBase types to include "user-analytics"
  • Added UserAnalyticsColumns interface for type safety
  • Added user-analytics fields to ANALYTICS_INSIGHTS_FIELDS constants

Features:

  • Project filtering (single or multiple) in header dropdown
  • Search functionality in user details table
  • Export to CSV capability
  • Responsive stacked bar chart with green (resolved) and gray (pending) colors
  • Detailed tooltips showing nested pending states (started, unstarted, backlog)

Description

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • Feature (non-breaking change which adds functionality)
  • Improvement (change that would cause existing functionality to not work as expected)
  • Code refactoring
  • Performance improvements
  • Documentation update

Screenshots and Media (if applicable)

Test Scenarios

References

Implemented comprehensive user analytics feature with both frontend and backend components:

Backend Changes:
- Added user analytics endpoints to AdvanceAnalyticsEndpoint for metrics (total users, admins, members, guests)
- Created get_user_work_items_stats() method to retrieve per-user work item statistics
- Added support for project filtering in user analytics queries
- Integrated user-analytics tab support in existing analytics endpoints

Frontend Changes:
- Created UserAnalytics component with three sections:
  1. Metrics cards showing total users by role (admins, members, guests)
  2. Stacked bar chart displaying resolved vs pending work items per active user
  3. Data table with search and CSV export functionality
- Added custom tooltip for bar chart showing user details (name, avatar, role, work item counts)
- Implemented UserAnalyticsTable with columns for member name, started, unstarted, and completed work items
- Added user-analytics tab to analytics navigation

Type & Constants Updates:
- Extended TAnalyticsTabsBase and TAnalyticsGraphsBase types to include "user-analytics"
- Added UserAnalyticsColumns interface for type safety
- Added user-analytics fields to ANALYTICS_INSIGHTS_FIELDS constants

Features:
- Project filtering (single or multiple) in header dropdown
- Search functionality in user details table
- Export to CSV capability
- Responsive stacked bar chart with green (resolved) and gray (pending) colors
- Detailed tooltips showing nested pending states (started, unstarted, backlog)
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