Skip to content

Conversation

@rr-paras-patel
Copy link
Contributor

@rr-paras-patel rr-paras-patel commented Aug 22, 2025

Summary

Adds CSV, JSON, and clipboard export options to all data tables for easy data analysis and reporting.

Features

  • 3 Export Options: CSV download, JSON download, clipboard copy
  • Complete Data: Always exports full dataset (ignores pagination)
  • Smart Naming: Auto-timestamped filenames by table type
  • Clean UI: Export dropdown in table headers with record counts

Tables Updated

  • Seats Analysis
  • IDE Code Completion Models
  • IDE Chat Models
  • GitHub.com Chat Models
  • GitHub.com PR Summary Models
  • Language Breakdown
  • Editor Breakdown

Technical

  • Reusable exportUtils.ts with TypeScript support
  • Proper CSV escaping and UTF-8 encoding
  • Tab-separated clipboard format for spreadsheets
  • Theme-consistent styling with readable hover states

Test Plan

  • Export buttons work on all 7 tables
  • CSV/JSON downloads are properly formatted
  • Clipboard copy works across browsers
  • Full dataset exported regardless of pagination
  • Filenames include timestamps and table names

- Add exportUtils.ts with CSV, JSON, and clipboard functions
- Implement formatFilename utility for consistent naming
- Create ExportData interface for type safety
- Support tab-separated clipboard format for spreadsheet compatibility
- Include fallback clipboard method for older browsers
- Add export dropdown with 3 options positioned in header area
- Export includes all seat records regardless of pagination
- Support CSV with proper escaping, JSON with camelCase, and clipboard copy
- Clean UI with export button showing total record count
- Consistent export pattern for future table implementations
- Add export dropdowns to IDE Code Completion, IDE Chat,
  GitHub.com Chat, and GitHub.com PR Summary tables
- Each table gets consistent 3-option export pattern (CSV, JSON, clipboard)
- Export positioned in expansion panel headers for clean UX
- Dynamic filenames based on table type for easy identification
- Support for different data structures across model types
- Add export dropdown to BreakdownComponent for both breakdown types
- Dynamic export filenames based on breakdown type (languages/editors)
- Supports same 3-option export pattern with consistent UI placement
- Reuses single component for both Languages and Editors breakdown tables
- Maintains clean header positioning consistent with other tables
- Fix unreadable hover colors in export dropdown menus
- Add proper primary color hover for export buttons
- Match pagination dropdown styling for consistency
@karpikpl karpikpl requested a review from Copilot August 24, 2025 04:10

This comment was marked as outdated.

@karpikpl
Copy link
Collaborator

@copilot can you fix code review comments and add unit tests?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@copilot add unit tests

@karpikpl karpikpl requested a review from Copilot August 25, 2025 17:40
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR adds comprehensive export functionality to all data tables in the GitHub Copilot Metrics Viewer, enabling users to download or copy table data for analysis and reporting. The implementation provides CSV download, JSON download, and clipboard copy options across all metric tables.

Key changes:

  • Created reusable export utility functions with proper CSV escaping and UTF-8 encoding
  • Added export dropdown menus to all 7 data tables with consistent styling
  • Updated CSS styling for export button hover states and dropdown menus

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
app/utils/exportUtils.ts New utility module containing reusable export functions for CSV, JSON, and clipboard operations with proper data formatting and error handling
app/components/SeatsAnalysisViewer.vue Added export dropdown menu to seats analysis table with data transformation methods
app/components/BreakdownComponent.vue Added export functionality to language/editor breakdown tables using the utility functions
app/components/AgentModeViewer.vue Added export dropdowns to all 4 model tables (IDE completion, IDE chat, GitHub.com chat, PR summary) with specific data mappings
app/assets/global.css Updated CSS styling for export button hover states and dropdown menu appearance to maintain theme consistency
Comments suppressed due to low confidence (5)

<h2>All assigned seats </h2>
<br>
<div class="d-flex justify-space-between align-center mb-4">
<h2>All assigned seats </h2>
Copy link

Copilot AI Aug 25, 2025

Choose a reason for hiding this comment

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

[nitpick] Remove the trailing space after 'seats' for consistency.

Suggested change
<h2>All assigned seats </h2>
<h2>All assigned seats</h2>

Copilot uses AI. Check for mistakes.
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