Skip to content

[wip]fix: replace chart components with huicharts equivalents and update ependencies#94

Open
gimmyhehe wants to merge 1 commit intodevfrom
cgm/update-chart-mateiral
Open

[wip]fix: replace chart components with huicharts equivalents and update ependencies#94
gimmyhehe wants to merge 1 commit intodevfrom
cgm/update-chart-mateiral

Conversation

@gimmyhehe
Copy link
Copy Markdown
Member

@gimmyhehe gimmyhehe commented Mar 21, 2026

Summary by CodeRabbit

  • New Features

    • Extended chart component library with additional chart types: Funnel, Scatter, Waterfall, Gauge, Graph, and Process charts now available alongside existing chart options.
  • Chores

    • Consolidated chart package dependencies for improved maintainability.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 21, 2026

Walkthrough

Consolidated multiple separate chart package dependencies into a single @opentiny/vue-huicharts package across two package.json files, and updated component registration and whitelisting to support 12 new TinyHuicharts component variants in the Vue opentiny materials.

Changes

Cohort / File(s) Summary
Dependency Consolidation
packages/frameworks/vue/package.json, packages/materials/vue-opentiny-vue/package.json
Replaced 6 individual chart dependencies (@opentiny/vue-chart-{bar,histogram,line,pie,radar,ring} at ~3.14.x) with single unified @opentiny/vue-huicharts at ^3.28.0.
Component Registration
packages/materials/vue-opentiny-vue/src/extend-renderer.ts
Added imports for 12 TinyHuicharts components and registered them onto the Mapper as TinyHuichartsLine, TinyHuichartsHistogram, TinyHuichartsBar, TinyHuichartsRadar, TinyHuichartsRing, TinyHuichartsPie, TinyHuichartsFunnel, TinyHuichartsScatter, TinyHuichartsWaterfall, TinyHuichartsGauge, TinyHuichartsGraph, and TinyHuichartsProcess.
Component Whitelisting
packages/materials/vue-opentiny-vue/src/render-config/white-list.ts
Extended whiteList array with 12 new component identifiers for all registered TinyHuicharts variants.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 Charts consolidated with glee,
Six packages now are one, you see!
Huicharts arrive with colors bright,
Component mappers registered right,
Whitelists grow—the vision's clear!

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Title check ⚠️ Warning The title contains a typo ('ependencies' instead of 'dependencies') and uses the '[wip]' prefix indicating incomplete work, making it unsuitable for merge. Additionally, the title is somewhat vague about what 'huicharts equivalents' means without context. Fix the typo in the title (change 'ependencies' to 'dependencies'), remove the '[wip]' prefix to indicate the PR is ready for review, and consider clarifying the scope if possible.
✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch cgm/update-chart-mateiral

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

🧹 Nitpick comments (1)
packages/materials/vue-opentiny-vue/src/extend-renderer.ts (1)

18-29: Consider adding legacy TinyChart* aliases for migration safety.

The whitelist includes legacy TinyChart* names (lines 74-79 of white-list.ts), but only TinyHuicharts* are registered in the Mapper. If external schemas or persisted data use the legacy names, rendering will fail silently. While no internal schemas currently reference them, adding temporary aliases provides a safer migration path:

Optional alias block for backward compatibility
  Mapper.TinyHuichartsLine = TinyHuichartsLine;
  Mapper.TinyHuichartsHistogram = TinyHuichartsHistogram;
  Mapper.TinyHuichartsBar = TinyHuichartsBar;
  Mapper.TinyHuichartsRadar = TinyHuichartsRadar;
  Mapper.TinyHuichartsRing = TinyHuichartsRing;
  Mapper.TinyHuichartsPie = TinyHuichartsPie;
  Mapper.TinyHuichartsFunnel = TinyHuichartsFunnel;
  Mapper.TinyHuichartsScatter = TinyHuichartsScatter;
  Mapper.TinyHuichartsWaterfall = TinyHuichartsWaterfall;
  Mapper.TinyHuichartsGauge = TinyHuichartsGauge;
  Mapper.TinyHuichartsGraph = TinyHuichartsGraph;
  Mapper.TinyHuichartsProcess = TinyHuichartsProcess;
+  Mapper.TinyChartLine = TinyHuichartsLine;
+  Mapper.TinyChartHistogram = TinyHuichartsHistogram;
+  Mapper.TinyChartBar = TinyHuichartsBar;
+  Mapper.TinyChartRadar = TinyHuichartsRadar;
+  Mapper.TinyChartRing = TinyHuichartsRing;
+  Mapper.TinyChartPie = TinyHuichartsPie;

Alternatively, if legacy names are no longer needed, remove them from the whitelist and update any documentation about the migration.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/materials/vue-opentiny-vue/src/extend-renderer.ts` around lines 18 -
29, The Mapper currently registers only TinyHuicharts* components (e.g.,
Mapper.TinyHuichartsLine, TinyHuichartsPie, TinyHuichartsBar,
TinyHuichartsRadar, TinyHuichartsRing, TinyHuichartsFunnel,
TinyHuichartsScatter, TinyHuichartsWaterfall, TinyHuichartsGauge,
TinyHuichartsGraph, TinyHuichartsProcess) but the whitelist still contains
legacy TinyChart* names; add temporary alias entries mapping the legacy symbols
to the new ones (for example assign Mapper.TinyChartLine =
Mapper.TinyHuichartsLine, Mapper.TinyChartPie = Mapper.TinyHuichartsPie, etc.)
so external schemas or persisted data using TinyChart* continue to render, or
alternatively remove the legacy names from the whitelist and update docs if you
intend to drop them entirely.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@packages/materials/vue-opentiny-vue/src/extend-renderer.ts`:
- Around line 18-29: The Mapper currently registers only TinyHuicharts*
components (e.g., Mapper.TinyHuichartsLine, TinyHuichartsPie, TinyHuichartsBar,
TinyHuichartsRadar, TinyHuichartsRing, TinyHuichartsFunnel,
TinyHuichartsScatter, TinyHuichartsWaterfall, TinyHuichartsGauge,
TinyHuichartsGraph, TinyHuichartsProcess) but the whitelist still contains
legacy TinyChart* names; add temporary alias entries mapping the legacy symbols
to the new ones (for example assign Mapper.TinyChartLine =
Mapper.TinyHuichartsLine, Mapper.TinyChartPie = Mapper.TinyHuichartsPie, etc.)
so external schemas or persisted data using TinyChart* continue to render, or
alternatively remove the legacy names from the whitelist and update docs if you
intend to drop them entirely.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 2c92e076-f801-4cf5-98c1-0922e7277cd2

📥 Commits

Reviewing files that changed from the base of the PR and between baa73eb and 6d065da.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (5)
  • packages/frameworks/vue/package.json
  • packages/materials/vue-opentiny-vue/package.json
  • packages/materials/vue-opentiny-vue/src/extend-renderer.ts
  • packages/materials/vue-opentiny-vue/src/render-config/chart.json
  • packages/materials/vue-opentiny-vue/src/render-config/white-list.ts

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.

1 participant