Skip to content

Fetch template icons#80

Merged
amrit110 merged 1 commit into
mainfrom
fetch_template_icons
Mar 20, 2026
Merged

Fetch template icons#80
amrit110 merged 1 commit into
mainfrom
fetch_template_icons

Conversation

@amrit110
Copy link
Copy Markdown
Member

This pull request adds support for displaying template icons in the templates table of the analytics dashboard. The changes include updating the backend to provide the icon URL, updating type definitions, enhancing the table UI to render the icon, and configuring Next.js to allow images from specific remote sources.

Backend and Data Model Updates:

  • The compute_template_metrics function in coder/analytics/aggregate.py now includes a template_icon field in its output, sourcing the icon URL from the template if available.
  • The TemplateMetrics TypeScript interface in services/analytics/lib/types.ts is updated to include a new template_icon property.

Frontend/UI Enhancements:

  • The TemplatesTable component in services/analytics/app/components/templates-table.tsx is updated to display the template icon (if present) using the Next.js Image component. If no icon is provided, a default icon is shown.
  • The Image component from Next.js is imported to support optimized image rendering.

Configuration:

  • The Next.js config in services/analytics/next.config.js is updated to allow loading images from cdn-icons-png.flaticon.com, enabling the use of remote template icons.

@amrit110 amrit110 self-assigned this Mar 20, 2026
@amrit110 amrit110 added the enhancement New feature or request label Mar 20, 2026
@codecov
Copy link
Copy Markdown

codecov Bot commented Mar 20, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.62%. Comparing base (8c3b6a4) to head (1029173).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main      #80   +/-   ##
=======================================
  Coverage   90.62%   90.62%           
=======================================
  Files          10       10           
  Lines        1408     1408           
=======================================
  Hits         1276     1276           
  Misses        132      132           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@amrit110 amrit110 merged commit bc44333 into main Mar 20, 2026
9 checks passed
@amrit110 amrit110 deleted the fetch_template_icons branch March 20, 2026 22:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant