Skip to content

feat(types): add data_visualization Block Kit block#2637

Draft
zimeg wants to merge 1 commit into
mainfrom
chore/block-kit-data-visualization
Draft

feat(types): add data_visualization Block Kit block#2637
zimeg wants to merge 1 commit into
mainfrom
chore/block-kit-data-visualization

Conversation

@zimeg

@zimeg zimeg commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Adds the net-new data_visualization Block Kit block to @slack/types.

  • New DataVisualizationBlock interface (type: 'data_visualization', required title <=50 chars, required chart).
  • Nested chart types: DataVisualizationPieChart (segments[], 1-6) and DataVisualizationSeriesChart (bar/area/line with series[] 1-6 + axis_config), unioned as DataVisualizationChart.
  • Supporting object types: DataVisualizationPieSegment, DataVisualizationSeries, DataVisualizationDataPoint, DataVisualizationAxisConfig.
  • Added DataVisualizationBlock to the KnownBlock union (alphabetical placement, after ContextActionsBlock).
  • Follows existing conventions in blocks.ts (interface extending Block, JSDoc with @description + @see doc link, literal type discriminant).

Docs

https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block

Validation

Run in packages/types:

  • npm run build — pass (tsc clean)
  • npm run test:types (tsd) — pass; added happy/sad-path assertions in test/blocks.test-d.ts mirroring the existing CardBlock/AlertBlock/CarouselBlock tests
  • biome lint/format (pre-commit hook) — pass

Added a changeset (@slack/types minor).

🤖 Generated with Claude Code

Add the DataVisualizationBlock type and its nested chart objects
(pie/bar/area/line) to @slack/types, including a tsd type test
mirroring the existing block tests.

Ref: https://docs.slack.dev/reference/block-kit/blocks/data-visualization-block

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@changeset-bot

changeset-bot Bot commented Jun 26, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 029d0e6

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@slack/types Minor

Not sure what this means? Click here to learn what changesets are.

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

@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 88.90%. Comparing base (a270a6e) to head (029d0e6).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2637   +/-   ##
=======================================
  Coverage   88.90%   88.90%           
=======================================
  Files          63       63           
  Lines       10256    10256           
  Branches      452      452           
=======================================
  Hits         9118     9118           
  Misses       1117     1117           
  Partials       21       21           
Flag Coverage Δ
cli-hooks 88.90% <ø> (ø)
cli-test 88.90% <ø> (ø)
logger 88.90% <ø> (ø)
oauth 88.90% <ø> (ø)
socket-mode 88.90% <ø> (ø)
web-api 88.90% <ø> (ø)
webhook 88.90% <ø> (ø)

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

🚀 New features to boost your workflow:
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

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