Skip to content

Conversation

@Aarebecca
Copy link
Contributor

  • 新增条形图、饼图、甜甜圈图
  • 优化现有设计
  • 更新 Gallery 列表
image image image image

@gemini-code-assist
Copy link
Contributor

Summary of Changes

Hello @Aarebecca, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

此拉取请求为信息图库引入了全新的图表类型,包括条形图、饼图和甜甜圈图,显著增强了数据可视化能力。同时,它还对现有的设计组件进行了精细优化,并对画廊模板的管理方式进行了重构,以提高代码质量和未来的可扩展性。这些改进共同提升了信息图的视觉效果和用户体验。

Highlights

  • 新增图表类型: 引入了条形图、饼图和甜甜圈图,极大地丰富了信息图的视觉表现力。
  • 画廊模板优化与重构: 重构了画廊模板的生成逻辑,通过引入公共配置和更高效的数据结构,提升了代码的可维护性和可扩展性,并新增了多种图表模板。
  • 设计细节优化: 对现有组件进行了多项设计优化,包括调整 CandyCardLite 的圆角和路径,以及增强 PlainText 组件以支持多行文本和垂直对齐。
  • 内边距配置增强: 将信息图的内边距(padding)作为一个可配置选项,并建议默认值为 20,提供了更灵活的布局控制。
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@codecov-commenter
Copy link

codecov-commenter commented Dec 9, 2025

Codecov Report

❌ Patch coverage is 18.75627% with 810 lines in your changes missing coverage. Please review.
✅ Project coverage is 29.92%. Comparing base (e8e09c8) to head (c627ecf).

Files with missing lines Patch % Lines
src/designs/structures/chart-line.tsx 3.39% 341 Missing ⚠️
src/designs/structures/chart-bar.tsx 5.04% 226 Missing ⚠️
src/designs/structures/chart-pie.tsx 5.45% 208 Missing ⚠️
src/designs/items/PlainText.tsx 0.00% 22 Missing ⚠️
...rc/designs/structures/sequence-zigzag-pucks-3d.tsx 60.00% 6 Missing ⚠️
src/designs/items/CandyCardLite.tsx 0.00% 3 Missing ⚠️
src/runtime/Infographic.tsx 25.00% 3 Missing ⚠️
src/designs/structures/list-sector.tsx 50.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main      #66      +/-   ##
==========================================
- Coverage   30.57%   29.92%   -0.66%     
==========================================
  Files         293      297       +4     
  Lines       19566    20527     +961     
  Branches     1013     1014       +1     
==========================================
+ Hits         5983     6142     +159     
- Misses      13580    14382     +802     
  Partials        3        3              
Flag Coverage Δ
infographic 29.92% <18.75%> (-0.66%) ⬇️

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
src/designs/structures/index.ts 100.00% <100.00%> (ø)
src/resource/utils/index.ts 100.00% <ø> (ø)
src/resource/utils/ref.ts 100.00% <100.00%> (ø)
src/runtime/options.ts 50.00% <100.00%> (+10.00%) ⬆️
src/runtime/utils.ts 100.00% <100.00%> (ø)
src/templates/built-in.ts 100.00% <100.00%> (ø)
src/utils/hash.ts 100.00% <ø> (ø)
src/utils/index.ts 100.00% <100.00%> (ø)
src/designs/structures/list-sector.tsx 4.46% <50.00%> (+0.42%) ⬆️
src/designs/items/CandyCardLite.tsx 13.63% <0.00%> (ø)
... and 6 more
🚀 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.

Copy link
Contributor

@gemini-code-assist gemini-code-assist bot left a comment

Choose a reason for hiding this comment

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

Code Review

本次 PR 新增了条形图、饼图和甜甜圈图,并对现有的设计和 Gallery 列表进行了优化和更新,整体质量非常高。新增加的图表组件代码结构清晰,考虑周全,对各种配置和边界情况都做了处理。尤其是在 site/src/components/Gallery/templates.ts 文件中的重构,通过提取公共配置和使用 Map 等方式,极大地提升了代码的可读性、可维护性和性能,是非常出色的实践。我只发现一个可以改进的小问题,在 chart-line.tsx 中关于唯一 ID 生成方式的建议,以增强代码的确定性和可测试性。总体来说,这是一次非常棒的更新!

@hustcc
Copy link
Member

hustcc commented Dec 9, 2025

加到 /ai 下了不?

@Aarebecca
Copy link
Contributor Author

加到 /ai 下了不?

加上了

@hustcc hustcc merged commit ae36c74 into main Dec 9, 2025
2 checks passed
@hustcc hustcc deleted the refactor/designs branch December 9, 2025 11:16
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.

4 participants