Skip to content

fix(frontend): library-card descriptions for chartjs, d3, echarts#8254

Merged
MarkusNeusinger merged 1 commit into
mainfrom
fix/library-card-js-descriptions
Jun 2, 2026
Merged

fix(frontend): library-card descriptions for chartjs, d3, echarts#8254
MarkusNeusinger merged 1 commit into
mainfrom
fix/library-card-js-descriptions

Conversation

@MarkusNeusinger
Copy link
Copy Markdown
Owner

Problem

The new JavaScript libraries render no description on their library cards.

LibraryCard.tsx doesn't read the blurb from the backend — it uses a hardcoded DESCRIPTIONS map that still listed only the original 11 libraries. For chartjs/d3/echarts, DESCRIPTIONS[name] || '' resolves to an empty string.

(The backend core/constants.py already has full descriptions for these libs — that feeds the API/DB path used elsewhere, e.g. ImageCard. This PR only fixes the separate hardcoded frontend map.)

Fix

Add concise, one-line entries for the three JS libs, matching the existing style:

chartjs: 'Simple, flexible HTML5-canvas charts. The popular JS default.',
d3: 'Data-driven SVG. Low-level, maximum control on the web.',
echarts: 'Powerful interactive charts for the browser. Vast chart catalog.',

Plus a LibraryCard test asserting a JS library's description renders (locks the regression).

Verified locally: tsc --noEmit clean, LibraryCard.test.tsx 7/7 pass.

🤖 Generated with Claude Code

LibraryCard renders its blurb from a hardcoded DESCRIPTIONS map that still
listed only the original 11 libraries, so the new JavaScript libs showed an
empty description (`DESCRIPTIONS[name] || ''`). Add concise entries for the
three JS libraries, matching the existing one-line style, plus a test that
asserts a JavaScript library's description renders.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings June 2, 2026 22:36
Copy link
Copy Markdown
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

Fixes missing descriptions on the frontend library cards for the newly added JavaScript libraries (Chart.js, D3, ECharts) by extending the hardcoded DESCRIPTIONS map in LibraryCard and adding a regression test to ensure at least one JS library description renders.

Changes:

  • Added chartjs, d3, and echarts entries to LibraryCard.tsx’s DESCRIPTIONS map.
  • Added a LibraryCard unit test asserting the description renders for a JavaScript library (echarts).

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated no comments.

File Description
app/src/components/LibraryCard.tsx Adds description strings for Chart.js, D3, and ECharts so their cards no longer render blank blurbs.
app/src/components/LibraryCard.test.tsx Adds a regression test to ensure a JavaScript library card renders its description.

@codecov
Copy link
Copy Markdown

codecov Bot commented Jun 2, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.

📢 Thoughts on this report? Let us know!

@MarkusNeusinger MarkusNeusinger merged commit 2c44e23 into main Jun 2, 2026
10 checks passed
@MarkusNeusinger MarkusNeusinger deleted the fix/library-card-js-descriptions branch June 2, 2026 22:44
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