Fetch template icons#80
Merged
Merged
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. 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. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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:
compute_template_metricsfunction incoder/analytics/aggregate.pynow includes atemplate_iconfield in its output, sourcing the icon URL from the template if available.TemplateMetricsTypeScript interface inservices/analytics/lib/types.tsis updated to include a newtemplate_iconproperty.Frontend/UI Enhancements:
TemplatesTablecomponent inservices/analytics/app/components/templates-table.tsxis updated to display the template icon (if present) using the Next.jsImagecomponent. If no icon is provided, a default icon is shown.Imagecomponent from Next.js is imported to support optimized image rendering.Configuration:
services/analytics/next.config.jsis updated to allow loading images fromcdn-icons-png.flaticon.com, enabling the use of remote template icons.