feat(types): add data_table Block Kit block#2638
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
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 detectedLatest commit: 8cde938 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 Report✅ All modified and coverable lines are covered by tests. 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
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the net-new
data_tableBlock Kit block to@slack/types:DataTableBlockinterface (type: 'data_table') withrows(required),caption(required), and optionalpage_size,row_header_column_index, andblock_id.DataTableCellhelper union (raw_text|raw_number|rich_text) for row cells.RawNumberElementcomposition object (type: 'raw_number',value,text) for numeric, sortable cells.DataTableBlockadded to theKnownBlockunion.Follows the conventions of the existing
TableBlock/AlertBlock/CardBlocktypes and theirRawTextElementcell object.Docs
https://docs.slack.dev/reference/block-kit/blocks/data-table-block
Validation
Run against the
@slack/typesworkspace in an isolated worktree offorigin/main:npm test --workspace=packages/types(runsbuildviatsc+tsdtype tests) — pass. Added happy/sad-pathexpectAssignable/expectErrorcases forDataTableBlockinpackages/types/test/blocks.test-d.ts.npx @biomejs/biome checkon 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/typesminor) is included.Draft until the broader Block Kit additions land.
Co-Authored-By: Claude svc-devxp-claude@slack-corp.com