Skip to content

refactor: use shared VisualizationOptions type directly across all visualization components#303

Merged
hustcc merged 5 commits intoaifrom
copilot/refactor-visualization-options
Jan 27, 2026
Merged

refactor: use shared VisualizationOptions type directly across all visualization components#303
hustcc merged 5 commits intoaifrom
copilot/refactor-visualization-options

Conversation

Copy link
Contributor

Copilot AI commented Jan 27, 2026

Fix: Update Playground Import Path for Pie Component

  • Fix import path in playground from '../pie/index' to '../vis/pie/index'
  • Verify playground builds successfully

Summary

Fixed the CI failure in the playground build caused by the pie component being moved to the src/ai/vis/pie/ directory. The playground was still importing from the old path ../pie/index which no longer existed.

Original prompt

src/ai/vis 下所有可视化组件的 Options 类型定义是一模一样的,可以抽出来放到统一的地方,比如 AreaOptions 和 LineOptions 是一样的。

保证代码简洁精炼。


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@changeset-bot
Copy link

changeset-bot bot commented Jan 27, 2026

⚠️ No Changeset found

Latest commit: a42a6b3

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

…on options

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
@hustcc hustcc marked this pull request as ready for review January 27, 2026 08:56
Copilot AI changed the title [WIP] Extract common Options type for visualization components refactor: consolidate duplicate Options types across visualization components Jan 27, 2026
Copilot AI requested a review from hustcc January 27, 2026 08:57
@github-actions
Copy link
Contributor

github-actions bot commented Jan 27, 2026

🎊 PR Preview a42a6b3 has been successfully built and deployed to https://antvis-GPT-Vis-preview-playground-pr-303.surge.sh

🕐 Build time: 0.01s

🤖 By surge-preview

@hustcc
Copy link
Member

hustcc commented Jan 27, 2026

@copilot 不用写类似这样的代码了,也不用 export 各个图表的 Options:

export type BarOptions = VisualizationOptions;

全部直接使用 VisualizationOptions 类型定义即可,并且统一 export 一个 VisualizationOptions。

…c aliases

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 27, 2026

@copilot 不用写类似这样的代码了,也不用 export 各个图表的 Options:

...

Done! Removed all component-specific Options type aliases and updated all 23 visualization components to use VisualizationOptions directly. The main index now exports only a single unified VisualizationOptions type. (Commit: 8a020f9)

Copilot AI changed the title refactor: consolidate duplicate Options types across visualization components refactor: use shared VisualizationOptions type directly across all visualization components Jan 27, 2026
@hustcc
Copy link
Member

hustcc commented Jan 27, 2026

@copilot 把 pie 组件挪到 src/ai/vis 目录中,并且同样的去掉 PieOptions,改成直接使用 VisualizationOptions。

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 27, 2026

@copilot 把 pie 组件挪到 src/ai/vis 目录中,并且同样的去掉 PieOptions,改成直接使用 VisualizationOptions。

Done! Moved pie component from src/ai/pie/ to src/ai/vis/pie/ and replaced PieOptions with VisualizationOptions. The component is now consistent with all other visualization components. (Commit: 19d4bc6)

Copilot AI requested a review from hustcc January 27, 2026 10:39
@hustcc
Copy link
Member

hustcc commented Jan 27, 2026

Co-authored-by: hustcc <7856674+hustcc@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 27, 2026

@copilot 修复 ci https://github.com/antvis/GPT-Vis/actions/runs/21393934632/job/61587511756#step:6:1

Fixed! Updated the playground import path from '../pie/index' to '../vis/pie/index' after moving the pie component. The playground now builds successfully. (Commit: a42a6b3)

@hustcc hustcc merged commit cf02dd4 into ai Jan 27, 2026
8 checks passed
@hustcc hustcc deleted the copilot/refactor-visualization-options branch January 27, 2026 11:13
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