Skip to content

feat(app): migrate bar/line/pie charts to plugin system (#220) - #379

Merged
alfredo1996 merged 2 commits into
release/1.1from
feat/chart-plugin-migrate-simple
Apr 5, 2026
Merged

feat(app): migrate bar/line/pie charts to plugin system (#220)#379
alfredo1996 merged 2 commits into
release/1.1from
feat/chart-plugin-migrate-simple

Conversation

@alfredo1996

Copy link
Copy Markdown
Owner

Summary

Third PR in the plugin system epic. Migrates bar/line/pie/markdown from the hardcoded switch into self-contained plugin files.

Stacked on: PR #378 (plugin-driven renderer). Merge that first.

Charts migrated

Renderer cleanup

  • Removed dead switch cases for bar/line/pie/markdown
  • Removed unused dynamic imports
  • Plugin lookup intercepts these types before the switch

Pattern

Each plugin reuses existing `transform`/`validate` from `chart-registry` to stay behaviorally identical. Plugin adapter maps `settings → component props` explicitly.

Tests

  • 6 new bar plugin tests
  • All 1877 app tests pass

Related: #220, epic #221

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Apr 5, 2026

Copy link
Copy Markdown

Warning

Rate limit exceeded

@alfredo1996 has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 0 minutes and 58 seconds before requesting another review.

Your organization is not enrolled in usage-based pricing. Contact your admin to enable usage-based pricing to continue reviews beyond the rate limit, or try again in 0 minutes and 58 seconds.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 09ed4454-510e-4503-a922-a16de8e143f8

📥 Commits

Reviewing files that changed from the base of the PR and between 249feb7 and 0c1ae54.

📒 Files selected for processing (6)
  • app/src/components/chart-renderer.tsx
  • app/src/plugins/__tests__/bar.test.tsx
  • app/src/plugins/bar.tsx
  • app/src/plugins/index.ts
  • app/src/plugins/line.tsx
  • app/src/plugins/pie.tsx
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch feat/chart-plugin-migrate-simple

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.

@alfredo1996
alfredo1996 changed the base branch from feat/chart-plugin-renderer to release/1.1 April 5, 2026 22:21
alfredorubin96 and others added 2 commits April 6, 2026 00:27
Third PR in the plugin system epic. Migrates the three most-used
chart types from the hardcoded switch statement into self-contained
plugin files.

New plugins:
- app/src/plugins/bar.tsx — BarPluginComponent adapter + plugin config
- app/src/plugins/line.tsx — LinePluginComponent (includes dual Y-axis,
  connectNulls, endLabel from #146/#159)
- app/src/plugins/pie.tsx — PiePluginComponent (donut, rose, topN)

Changes to chart-renderer.tsx:
- Removed bar/line/pie/markdown cases from switch (dead code)
- Removed now-unused BarChart/LineChart/PieChart dynamic imports
- Removed now-unused MarkdownWidget import
- Plugin registry lookup intercepts these types before the switch

Each plugin reuses existing transforms/validators from chart-registry
to stay behaviorally identical during migration. Future PRs will
further consolidate options schemas + query hints into plugin configs.

Tests added:
- 6 bar plugin tests (capabilities, component render, settings passing)
- All 1877 app tests pass (+6 new, total +34 since PR 1)

Related: #220, epic #221

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@alfredo1996
alfredo1996 force-pushed the feat/chart-plugin-migrate-simple branch from 00005ed to 0c1ae54 Compare April 5, 2026 22:28
@sonarqubecloud

sonarqubecloud Bot commented Apr 5, 2026

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
37.8% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

@alfredo1996
alfredo1996 merged commit 41f80dd into release/1.1 Apr 5, 2026
11 of 13 checks passed
@alfredo1996
alfredo1996 deleted the feat/chart-plugin-migrate-simple branch April 7, 2026 11:46
alfredo1996 added a commit that referenced this pull request May 10, 2026
…mple

feat(app): migrate bar/line/pie charts to plugin system (#220)
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