Skip to content

Conversation

@Aarebecca
Copy link
Contributor

@Aarebecca Aarebecca commented Jan 15, 2026

  • 调整数据类型
  • 语法支持按信息图分类设置数据
  • 列表:lists
  • 顺序:sequences
  • 对比:compares
  • 层级:root
  • 关系:nodes / relations
  • 统计图:values
  • 更新文档及语法案例
  • 优化 Gallery 页及语法组装逻辑
  • 更新提示词及 SKILLS

示例:

对比:

infographic compare-swot
data
  compares
    - label Strengths
      children
        - label Strong brand
        - label Loyal users
    - label Weaknesses
      children
        - label High cost
        - label Slow release

关系:

infographic relation-dagre-flow-tb-simple-circle-node
data
  nodes
    - id A
      label Node A
    - id B
      label Node B
  relations
    A - approves -> B
    A -->|blocks| B

@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!

This pull request introduces a significant refactoring of how data is structured and consumed by the infographic system. By moving from a single, general-purpose 'items' field to distinct, semantically meaningful data fields based on infographic classification (e.g., lists, sequences, comparisons, hierarchies, relations, and statistics), the system gains improved data integrity and clarity. This change is accompanied by comprehensive documentation updates and performance enhancements to the Gallery page, ensuring a more intuitive and efficient experience for users and developers alike.

Highlights

  • Data Type Refactoring: The core data structure for infographics has been refactored to use more specific, classification-based fields (e.g., 'lists', 'sequences', 'compares', 'root', 'nodes'/'relations', 'values') instead of a generic 'items' array. This improves clarity and semantic meaning of the data.
  • Documentation and Examples Update: All relevant documentation, including skill definitions, prompt references, and learn pages, has been updated to reflect the new data structure and provide comprehensive examples for each infographic category.
  • Gallery Page Optimization: The Gallery page has been optimized with lazy loading for infographic cards, improving initial page load performance and overall user experience.
  • Template Renaming and Backward Compatibility: Quadrant-related templates have been renamed from 'quadrant-' to 'compare-quadrant-' to align with the 'compare' classification. Backward compatibility is provided for the old names with deprecation warnings.
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.

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

这是一个非常出色的重构!将数据结构从通用的 items 迁移到按信息图类型分类的字段(如 lists, sequences, compares 等),极大地提高了类型的明确性和代码的语义化。

我注意到您在整个代码库中都保持了高度的一致性,包括:

  • 核心逻辑(options/parser.ts, types/data.ts
  • 文档(.md 文件)
  • AI 技能提示(.skills 目录)
  • 测试文件和测试数据

这种彻底的重构确保了代码库的健康和可维护性。特别值得称赞的是,您通过代理旧模板名称等方式,非常周到地处理了向后兼容性问题,这对于库的平稳升级至关重要。此外,Gallery 页面的性能优化也是一个很棒的改进。

我只发现了一个文档中的小格式问题,具体见我的评论。整体而言,这是一次高质量的提交!

hustcc
hustcc previously approved these changes Jan 15, 2026
@codecov-commenter
Copy link

codecov-commenter commented Jan 15, 2026

Codecov Report

❌ Patch coverage is 80.48780% with 24 lines in your changes missing coverage. Please review.
✅ Project coverage is 44.73%. Comparing base (acbcd46) to head (95d5a90).

Files with missing lines Patch % Lines
src/options/parser.ts 79.16% 10 Missing ⚠️
src/templates/compare-quadrant.ts 80.48% 8 Missing ⚠️
src/designs/structures/relation-dagre-flow.tsx 0.00% 4 Missing ⚠️
...esigns/structures/compare-hierarchy-left-right.tsx 0.00% 1 Missing ⚠️
src/designs/structures/hierarchy-structure.tsx 0.00% 1 Missing ⚠️
Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #169      +/-   ##
==========================================
+ Coverage   44.62%   44.73%   +0.10%     
==========================================
  Files         329      330       +1     
  Lines       26206    26286      +80     
  Branches     2032     2047      +15     
==========================================
+ Hits        11694    11758      +64     
- Misses      14502    14518      +16     
  Partials       10       10              
Flag Coverage Δ
infographic 44.73% <80.48%> (+0.10%) ⬆️

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

Files with missing lines Coverage Δ
src/designs/items/types.ts 100.00% <ø> (ø)
...gns/structures/compare-binary-horizontal/index.tsx 82.74% <100.00%> (ø)
src/designs/structures/compare-hierarchy-row.tsx 95.48% <100.00%> (ø)
src/designs/structures/compare-quadrant.tsx 99.47% <ø> (ø)
src/designs/structures/hierarchy-tree.tsx 71.33% <100.00%> (ø)
src/designs/structures/index.ts 100.00% <100.00%> (ø)
src/designs/structures/types.ts 100.00% <ø> (ø)
src/editor/utils/data.ts 100.00% <100.00%> (ø)
src/options/types.ts 100.00% <ø> (ø)
src/syntax/relations.ts 95.25% <100.00%> (ø)
... and 10 more

... and 1 file with indirect coverage changes

🚀 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.

hustcc
hustcc previously approved these changes Jan 16, 2026
@Aarebecca Aarebecca force-pushed the refactor/data-structure branch from 18ad5db to 95d5a90 Compare January 16, 2026 06:27
@Aarebecca Aarebecca merged commit 3fcc360 into main Jan 16, 2026
3 checks passed
@Aarebecca Aarebecca deleted the refactor/data-structure branch January 16, 2026 06:38
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