Skip to content

Add pivot/funnel/grouped-bar widget type tests and update ROADMAP - #720

Merged
hotlong merged 2 commits into
mainfrom
copilot/enhance-dashboardwidget-types
Feb 18, 2026
Merged

Add pivot/funnel/grouped-bar widget type tests and update ROADMAP#720
hotlong merged 2 commits into
mainfrom
copilot/enhance-dashboardwidget-types

Conversation

CopilotAI commented Feb 18, 2026

Copy link
Copy Markdown
Contributor

Protocol already defines pivot, funnel, and grouped-bar in ChartTypeSchema (used by DashboardWidgetSchema.type), but test coverage was missing and ROADMAP didn't reflect protocol completion.

Tests (dashboard.test.ts)

  • Standalone widget validation for each type (pivot with measures, funnel with categoryField, grouped-bar with valueField)
  • chartConfig integration for all three types
  • Full dashboard integration test combining all three widget types
  • Added pivot, grouped-bar to ChartTypeSchema acceptance test list

ROADMAP

  • Marked protocol support for funnel and grouped-bar as complete
  • Split out renderer implementation (plugin-charts) as separate pending items for objectui coordination
// All three types now have dedicated test coverageconstdashboard=Dashboard.create({name: 'analytics_overview',label: 'Analytics Overview',widgets: [{title: 'Sales Funnel',type: 'funnel',object: 'lead',categoryField: 'stage', ... },{title: 'Revenue by Region',type: 'grouped-bar',object: 'order',categoryField: 'region', ... },{title: 'Regional Pivot',type: 'pivot',object: 'opportunity',categoryField: 'region',measures: [{valueField: 'amount',aggregate: 'sum',label: 'Revenue',format: '$0,0'},], ... },],});

5,587 tests pass, 0 CodeQL alerts.

Original prompt

This section details on the original issue you should resolve

<issue_title>DashboardWidget type 支持 pivot/funnel/grouped-bar等类型(协议+objectui实现协同)</issue_title>
<issue_description>Airtable 仪表盘分析类组建中,"pivot"(交叉表)、"funnel(漏斗)"、"grouped-bar(分组条形图)"为常用交互范式,现协议有部分定义但 objectui 落地/映射不完整。

目标

  • DashboardWidgetSchema.type 完善支持
  • 文档/单测
  • 对应 objectui renderer 需协作实现

详见1.4/2.5/3.1

  • 类型:enhancement
  • 实现后更新 roadmap 并通知 UI 侧开发协同落地</issue_description>

Comments on the Issue (you are @copilot in this section)


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

@vercel

vercelBot commented Feb 18, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

ProjectDeploymentActionsUpdated (UTC)
objectstack-playReadyReadyPreview, CommentFeb 18, 2026 8:02am
specReadyReadyPreview, CommentFeb 18, 2026 8:02am

Request Review

- Add dedicated tests for pivot, funnel, and grouped-bar widget types
- Add integration test for dashboard combining all three types
- Include pivot, grouped-bar in ChartTypeSchema acceptance test
- Mark protocol support complete in ROADMAP, separate from renderer impl
Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
CopilotAI changed the title [WIP] Enhance DashboardWidget type to support pivot, funnel, and grouped-barAdd pivot/funnel/grouped-bar widget type tests and update ROADMAPFeb 18, 2026
CopilotAI requested a review from hotlongFebruary 18, 2026 07:53
@hotlong
hotlong marked this pull request as ready for review February 18, 2026 08:17
CopilotAI review requested due to automatic review settings February 18, 2026 08:17
@hotlong
hotlong merged commit bf04728 into mainFeb 18, 2026
5 checks passed

CopilotAI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Adds missing test coverage for pivot, funnel, and grouped-bar dashboard widget types (already present in the protocol), and updates the dashboard roadmap to distinguish protocol completion from renderer implementation work.

Changes:

  • Extend DashboardWidgetSchema tests to validate pivot, funnel, and grouped-bar widgets (standalone + chartConfig + full dashboard composition).
  • Update the ChartTypeSchema acceptance list in dashboard.test.ts to include pivot and grouped-bar.
  • Update ROADMAP.md to mark protocol support as complete and track chart renderer work separately.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.

FileDescription
packages/spec/src/ui/dashboard.test.tsAdds test coverage for pivot/funnel/grouped-bar widget types and chartConfig integration.
ROADMAP.mdMarks protocol support items complete and splits out pending renderer work for plugin-charts.

Comment on lines +25 to 27
const types = ['metric', 'bar', 'line', 'pie', 'funnel', 'table', 'bubble', 'gauge', 'heatmap', 'pivot', 'grouped-bar'];

types.forEach(type => {

CopilotAIFeb 18, 2026

Copy link

Choose a reason for hiding this comment

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

The test name says it "should accept all chart types", but the types array is only a small subset of ChartTypeSchema (e.g., missing horizontal-bar, area, donut, scatter, etc.). This makes the test misleading and easier to accidentally desync from the enum. Consider either enumerating all ChartTypeSchema.options (or deriving from ChartTypeSchema.Enum) or renaming the test to indicate it’s only checking a representative subset (or removing this test and relying on chart.test.ts, which already covers categories).

Suggested change
consttypes=['metric','bar','line','pie','funnel','table','bubble','gauge','heatmap','pivot','grouped-bar'];
types.forEach(type=>{
consttypes=ChartTypeSchema.options;
types.forEach((type)=>{

Copilot uses AI. Check for mistakes.
Sign up for freeto 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.

DashboardWidget type 支持 pivot/funnel/grouped-bar等类型(协议+objectui实现协同)

3 participants

@hotlong