Skip to content

Commit 2f38465

Browse files
feat(dashboards): integrate UI with maintainer dashboard models (PR review & merge velocity, open vs closed issues) (#146)
* feat(dashboards): integrate project issues resolution metrics into recent progress component - Add project filter to recent progress component for dynamic data fetching - Implement new API endpoints for fetching project issues resolution data - Enhance recent progress UI with connection status indicators and tooltips - Update maintainer dashboard to include project selection for analytics - Refactor analytics service and controller to support new project-related queries Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-710 Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Mauricio Zanetti Salomao <[email protected]> * feat(analytics): add project pull requests weekly data integration - Implement new API endpoint to fetch project pull requests weekly data from Snowflake - Enhance RecentProgressComponent to display PR review and merge velocity metrics - Add transformation logic for API response to chart format - Update analytics service and controller to support new data retrieval - Introduce new TypeScript interfaces for project pull requests weekly data Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-710 Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Mauricio Zanetti Salomao <[email protected]> * feat(dashboards): enhance recent progress component with loading state and tooltips - Implement loading state in the RecentProgressComponent to improve user experience during data fetching. - Add tooltip functionality for specific metrics to provide additional context when hovering over items. - Refactor data fetching logic to utilize signals for loading states and ensure proper handling of asynchronous data retrieval. - Update HTML template to conditionally render loading indicators and tooltips based on data availability. Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-718 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Mauricio Zanetti Salomao <[email protected]> * fix(analytics): enforce required projectId for project issues resolution - Update the analytics service and controller to require a projectId parameter for fetching project issues resolution data. - Modify RecentProgressComponent to handle cases where projectId is not provided, ensuring a default response is returned. - Refactor related documentation to reflect the change from optional to required projectId. This change improves data integrity and user experience by preventing requests without a valid project identifier. Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-718 Generated with [Claude Code](https://claude.ai/code) Signed-off-by: Mauricio Zanetti Salomao <[email protected]> * feat(dashboards): implement project context service for project selection in maintainer dashboard - Introduced ProjectContextService to manage the selected project state and persist it in local storage. - Updated MaintainerDashboardComponent to utilize the new service for project selection, ensuring the projectId is set based on user selection and restoring previously selected projects. - Enhanced form handling to automatically select the first project if no project is currently selected. This change improves user experience by maintaining project context across sessions and simplifying project selection in the dashboard. Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-718 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Mauricio Zanetti Salomao <[email protected]> * fix(dashboards): add error handling for project data fetching in maintainer dashboard - Implemented error handling in the MaintainerDashboardComponent to manage failures when fetching project data from the analytics service. - Utilized RxJS's catchError to log errors and return an empty projects array, ensuring the application remains stable during data retrieval issues. This change enhances the robustness of the dashboard by preventing crashes due to data fetching errors. Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-718 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Mauricio Zanetti Salomao <[email protected]> * refactor(dashboards): improve project selection logic in maintainer dashboard - Updated MaintainerDashboardComponent to validate the current project selection against loaded projects. - Removed the logic for restoring a stored project ID and streamlined the auto-selection of the first project if no valid selection exists. - Enhanced user experience by ensuring that only valid project selections are set in the form. Jira Ticket: https://linuxfoundation.atlassian.net/browse/LFXV2-718 Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Mauricio Zanetti Salomao <[email protected]> * refactor(dashboards): ssr-safe storage and pattern updates LFXV2-718 - Add SSR safety checks to all localStorage access points in context services - Change ProjectContextService to store full ProjectContext objects (projectId, name, slug) - Simplify maintainer dashboard to match board member dashboard pattern - Centralize project context in RecentProgressComponent using service injection - Move ProjectContext interface to shared package for reusability - Extract chart options to shared constants for consistency - Refactor chart transformation logic for better maintainability Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Asitha de Silva <[email protected]> * fix(dashboards): add ssr-safe persona persistence LFXV2-718 - Add SSR safety checks to PersonaService localStorage access - Implement loadStoredPersona() method to restore persisted persona - Fix constructor to load from localStorage instead of hardcoding 'maintainer' - Ensure persona selection persists across page refreshes Generated with [Claude Code](https://claude.com/claude-code) Signed-off-by: Asitha de Silva <[email protected]> --------- Signed-off-by: Mauricio Zanetti Salomao <[email protected]> Signed-off-by: Asitha de Silva <[email protected]> Co-authored-by: Asitha de Silva <[email protected]>
1 parent 58ed2b3 commit 2f38465

File tree

17 files changed

+1403
-158
lines changed

17 files changed

+1403
-158
lines changed

apps/lfx-one/src/app/modules/dashboards/components/recent-progress/recent-progress.component.html

Lines changed: 42 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,49 @@ <h2 class="font-['Roboto_Slab'] font-semibold text-[16px]">Recent Progress</h2>
4040
</div>
4141
</div>
4242

43-
<div class="overflow-hidden">
44-
<div #progressScroll class="flex gap-4 overflow-x-auto pb-2 hide-scrollbar scroll-smooth" data-testid="dashboard-recent-progress-items">
45-
@for (item of progressItems(); track item.label) {
46-
<div class="p-4 bg-white rounded-lg border border-slate-200 flex-shrink-0 w-80" [attr.data-testid]="'dashboard-recent-progress-item-' + item.label">
47-
<div class="space-y-3">
48-
<h5 class="text-sm font-medium w-full">{{ item.label }}</h5>
49-
<div class="w-full h-8">
50-
<lfx-chart [type]="item.chartType" [data]="item.chartData" [options]="item.chartOptions" height="100%"></lfx-chart>
51-
</div>
52-
<div class="space-y-1">
53-
<div class="text-xl font-medium">{{ item.value }}</div>
54-
@if (item.subtitle) {
55-
<div class="text-xs text-gray-500">{{ item.subtitle }}</div>
56-
}
43+
@if (isLoading()) {
44+
<!-- Loading State -->
45+
<div class="flex items-center justify-center p-12">
46+
<div class="text-center space-y-3">
47+
<i class="fa-light fa-spinner-third fa-spin text-4xl text-[#0094FF]"></i>
48+
<p class="text-sm text-gray-500">Loading project data...</p>
49+
</div>
50+
</div>
51+
} @else {
52+
<div class="overflow-hidden">
53+
<div #progressScroll class="flex gap-4 overflow-x-auto pb-2 hide-scrollbar scroll-smooth" data-testid="dashboard-recent-progress-items">
54+
@for (item of progressItems(); track item.label) {
55+
<div class="p-4 bg-white rounded-lg border border-slate-200 flex-shrink-0 w-80" [attr.data-testid]="'dashboard-recent-progress-item-' + item.label">
56+
<div class="space-y-3">
57+
<div class="flex items-center gap-2">
58+
<h5 class="text-sm font-medium w-full">{{ item.label }}</h5>
59+
<span
60+
[class]="item.isConnected ? 'text-green-500' : 'text-gray-400'"
61+
class="text-xs cursor-help"
62+
[pTooltip]="item.isConnected ? 'Connected to live data' : 'Using placeholder data'"
63+
tooltipPosition="top">
64+
65+
</span>
66+
</div>
67+
<div class="w-full h-8 relative">
68+
<lfx-chart [type]="item.chartType" [data]="item.chartData" [options]="item.chartOptions" height="100%"></lfx-chart>
69+
</div>
70+
<div class="space-y-1">
71+
@if (item.tooltipText) {
72+
<div class="text-xl font-medium cursor-help" [pTooltip]="item.tooltipText" [escape]="false" tooltipPosition="top">
73+
{{ item.value }}
74+
</div>
75+
} @else {
76+
<div class="text-xl font-medium">{{ item.value }}</div>
77+
}
78+
@if (item.subtitle) {
79+
<div class="text-xs text-gray-500">{{ item.subtitle }}</div>
80+
}
81+
</div>
5782
</div>
5883
</div>
59-
</div>
60-
}
84+
}
85+
</div>
6186
</div>
62-
</div>
87+
}
6388
</section>

0 commit comments

Comments
 (0)