feat(block-kit): add data_table layout block#1613
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
Add the new `data_table` Block Kit layout block to the model: DataTableBlock plus its cell model (DataTableCell interface with RawTextDataTableCell, RawNumberDataTableCell, and RichTextBlock for rich_text cells), the GsonDataTableCellFactory deserializer, factory registration, and a `dataTable` builder DSL entry. Ref: https://docs.slack.dev/reference/block-kit/blocks/data-table-block Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1613 +/- ##
============================================
- Coverage 73.32% 73.31% -0.02%
- Complexity 4520 4526 +6
============================================
Files 478 479 +1
Lines 14300 14319 +19
Branches 1490 1490
============================================
+ Hits 10486 10498 +12
- Misses 2923 2928 +5
- Partials 891 893 +2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
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 new
data_tableBlock Kit layout block to the Java SDK model. The block displays a sortable, paginated grid of tabular data, where each row is a list of cells (raw_text,raw_number, orrich_text).What's included:
DataTableBlock(typedata_table) withrows,caption,pageSize,rowHeaderColumnIndex, andblockId.DataTableCellinterface implemented byRawTextDataTableCell(raw_text),RawNumberDataTableCell(raw_number), andRichTextBlock(rich_text);RichTextBlocknow also implementsDataTableCell.GsonDataTableCellFactoryto deserialize cells bytype, registered forDataTableCellin both the clientGsonFactoryand the model test factory.DataTableBlockregistered inGsonLayoutBlockFactory.Blocks.dataTable(...)builder DSL entry.Reference
Schema: https://docs.slack.dev/reference/block-kit/blocks/data-table-block
Validation
Run in the touched module:
./mvnw -pl slack-api-model -am test -Dtest=BlockKitTest -Djacoco.skip=true— Tests run: 45, Failures: 0, Errors: 0. Includes newparseDataTableBlock(deserialization of all three cell types +page_size/row_header_column_index) andbuildDataTableBlock(builder DSL + round-trip serialization)../mvnw -pl slack-api-model test -Djacoco.skip=true— full module suite: Tests run: 476, Failures: 0, Errors: 0../mvnw -pl slack-api-client -am test-compile -Djacoco.skip=true— BUILD SUCCESS (verifies theGsonFactorychange in the client module compiles).Note:
jacoco.skip=truewas required because the locally available JDK is 25 and the pinned JaCoCo agent (0.8.7) cannot instrument class file major version 69 ("Unsupported class file major version 69"). This is an environment limitation unrelated to the change; the surefire test execution itself passes.This repo does not use changesets (Maven multi-module project), so no changeset was added.
Co-Authored-By: Claude svc-devxp-claude@slack-corp.com