Skip to content

feat(types): add data_table Block Kit block#2638

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

feat(types): add data_table Block Kit block#2638
zimeg wants to merge 1 commit into
mainfrom
chore/block-kit-data-table

Conversation

@zimeg

@zimeg zimeg commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Adds the net-new data_table Block Kit block to @slack/types:

  • New DataTableBlock interface (type: 'data_table') with rows (required), caption (required), and optional page_size, row_header_column_index, and block_id.
  • New DataTableCell helper union (raw_text | raw_number | rich_text) for row cells.
  • New RawNumberElement composition object (type: 'raw_number', value, text) for numeric, sortable cells.
  • DataTableBlock added to the KnownBlock union.

Follows the conventions of the existing TableBlock / AlertBlock / CardBlock types and their RawTextElement cell object.

Docs

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

Validation

Run against the @slack/types workspace in an isolated worktree off origin/main:

  • npm test --workspace=packages/types (runs build via tsc + tsd type tests) — pass. Added happy/sad-path expectAssignable/expectError cases for DataTableBlock in packages/types/test/blocks.test-d.ts.
  • npx @biomejs/biome check on the touched files — pass (also enforced by the repo pre-commit hook across all 637 files — pass).

A changeset (.changeset/data-table-block.md, @slack/types minor) is included.

Draft until the broader Block Kit additions land.

Co-Authored-By: Claude svc-devxp-claude@slack-corp.com

Add the `data_table` block (`DataTableBlock`) and the `raw_number` cell
composition object (`RawNumberElement`) used for numeric, sortable cells.
The block is added to the `KnownBlock` union and covered by tsd type tests.

Ref: https://docs.slack.dev/reference/block-kit/blocks/data-table-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: 8cde938

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 (8cde938).
✅ All tests successful. No failed tests found.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2638   +/-   ##
=======================================
  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