From 27c125ef95548b1e893e28fdca87e07465799aef Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Tue, 8 Sep 2026 20:43:12 -0700 Subject: [PATCH 1/6] feat(block-kit): add data table block example Add a DataTable block-kit example (blocks/DataTable.java) demonstrating a data_table block with raw_text, raw_number, and rich_text-capable cells, plus a DataTableTest round-trip test and a README entry. Depends on the DataTableBlock / TableCell model added in slackapi/java-slack-sdk#1613 (not yet released); the block-kit module pins the published slack-api-model, so this compiles once that lands. Co-Authored-By: Claude --- block-kit/README.md | 1 + block-kit/src/main/java/blocks/DataTable.java | 33 ++++++++++++++++ .../src/test/java/blocks/DataTableTest.java | 39 +++++++++++++++++++ 3 files changed, 73 insertions(+) create mode 100644 block-kit/src/main/java/blocks/DataTable.java create mode 100644 block-kit/src/test/java/blocks/DataTableTest.java diff --git a/block-kit/README.md b/block-kit/README.md index 0ccfb5d..015289f 100644 --- a/block-kit/README.md +++ b/block-kit/README.md @@ -13,6 +13,7 @@ Read the [docs](https://docs.slack.dev/block-kit/) to learn concepts behind thes - **[Carousel](https://docs.slack.dev/reference/block-kit/blocks/carousel-block)**: Displays related card blocks in a horizontally-scrolling container. [Implementation](./src/main/java/blocks/Carousel.java). - **[Card](https://docs.slack.dev/reference/block-kit/blocks/card-block)**: Displays content in a card. [Implementation](./src/main/java/blocks/Card.java). - **[Context](https://docs.slack.dev/reference/block-kit/blocks/context-block)**: Provides contextual info, which can include both images and text. [Implementation](./src/main/java/blocks/Context.java). +- **[Data table](https://docs.slack.dev/reference/block-kit/blocks/data-table-block)**: Displays rich tables that support pagination, sorting, filtering, and interactivity. [Implementation](./src/main/java/blocks/DataTable.java). - **[Divider](https://docs.slack.dev/reference/block-kit/blocks/divider-block)**: Visually separates pieces of info inside of a message. [Implementation](./src/main/java/blocks/Divider.java). - **[File](https://docs.slack.dev/reference/block-kit/blocks/file-block)**: Displays info about remote files. [Implementation](./src/main/java/blocks/File.java). - **[Header](https://docs.slack.dev/reference/block-kit/blocks/header-block)**: Displays a larger-sized text. [Implementation](./src/main/java/blocks/Header.java). diff --git a/block-kit/src/main/java/blocks/DataTable.java b/block-kit/src/main/java/blocks/DataTable.java new file mode 100644 index 0000000..babf86d --- /dev/null +++ b/block-kit/src/main/java/blocks/DataTable.java @@ -0,0 +1,33 @@ +package blocks; + +import com.slack.api.model.block.Blocks; +import com.slack.api.model.block.DataTableBlock; +import com.slack.api.model.block.composition.RawNumberObject; +import com.slack.api.model.block.composition.RawTextObject; +import java.util.List; + +/** + * Displays rich tables that support pagination, sorting, filtering, and interactivity. + * {@link https://docs.slack.dev/reference/block-kit/blocks/data-table-block/} + */ +public class DataTable { + /** + * A data table pairing text labels with numeric values. + */ + public static DataTableBlock example01() { + DataTableBlock block = Blocks.dataTable(t -> t.caption("Quarterly widget report") + .pageSize(10) + .rowHeaderColumnIndex(0) + .rows(List.of( + List.of( + RawTextObject.builder().text("Item").build(), + RawTextObject.builder().text("Count").build()), + List.of( + RawTextObject.builder().text("Widgets").build(), + RawNumberObject.builder().value(42.0).text("42").build()), + List.of( + RawTextObject.builder().text("Gadgets").build(), + RawNumberObject.builder().value(7.0).text("7").build())))); + return block; + } +} diff --git a/block-kit/src/test/java/blocks/DataTableTest.java b/block-kit/src/test/java/blocks/DataTableTest.java new file mode 100644 index 0000000..58eb528 --- /dev/null +++ b/block-kit/src/test/java/blocks/DataTableTest.java @@ -0,0 +1,39 @@ +package blocks; + +import static org.junit.jupiter.api.Assertions.assertEquals; + +import com.google.gson.JsonParser; +import com.slack.api.model.block.DataTableBlock; +import com.slack.api.util.json.GsonFactory; +import org.junit.jupiter.api.Test; + +public class DataTableTest { + @Test + public void testExample01() { + DataTableBlock block = DataTable.example01(); + String actual = GsonFactory.createSnakeCase().toJson(block); + String expected = """ + { + "type": "data_table", + "rows": [ + [ + { "type": "raw_text", "text": "Item" }, + { "type": "raw_text", "text": "Count" } + ], + [ + { "type": "raw_text", "text": "Widgets" }, + { "type": "raw_number", "value": 42.0, "text": "42" } + ], + [ + { "type": "raw_text", "text": "Gadgets" }, + { "type": "raw_number", "value": 7.0, "text": "7" } + ] + ], + "caption": "Quarterly widget report", + "page_size": 10, + "row_header_column_index": 0 + } + """; + assertEquals(JsonParser.parseString(expected), JsonParser.parseString(actual)); + } +} From 6c10e36ac513735aca23e006a3b7380b0444f3e2 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Tue, 8 Sep 2026 20:51:36 -0700 Subject: [PATCH 2/6] fix(block-kit): match the data_table example to the docs reference MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The initial example was an invented Widgets/Gadgets table. Replace it with the docs reference example verbatim — the Name/Department/Badge table with raw_text cells and rich_text badge cells (Blue bold, Green + italic review, Limited bold) — matching how the sibling examples mirror docs.slack.dev. Expand the test's expected JSON one field per line with full rich_text style objects, matching RichTextTest. Co-Authored-By: Claude --- block-kit/src/main/java/blocks/DataTable.java | 60 +++++++-- .../src/test/java/blocks/DataTableTest.java | 126 ++++++++++++++++-- 2 files changed, 165 insertions(+), 21 deletions(-) diff --git a/block-kit/src/main/java/blocks/DataTable.java b/block-kit/src/main/java/blocks/DataTable.java index babf86d..0ad24a4 100644 --- a/block-kit/src/main/java/blocks/DataTable.java +++ b/block-kit/src/main/java/blocks/DataTable.java @@ -2,8 +2,9 @@ import com.slack.api.model.block.Blocks; import com.slack.api.model.block.DataTableBlock; -import com.slack.api.model.block.composition.RawNumberObject; import com.slack.api.model.block.composition.RawTextObject; +import com.slack.api.model.block.element.RichTextSectionElement; +import com.slack.api.model.block.element.RichTextSectionElement.TextStyle; import java.util.List; /** @@ -12,22 +13,59 @@ */ public class DataTable { /** - * A data table pairing text labels with numeric values. + * A data table of departments with rich text badge cells. */ public static DataTableBlock example01() { - DataTableBlock block = Blocks.dataTable(t -> t.caption("Quarterly widget report") - .pageSize(10) - .rowHeaderColumnIndex(0) + DataTableBlock block = Blocks.dataTable(t -> t.caption("A Fabulous Table") .rows(List.of( List.of( - RawTextObject.builder().text("Item").build(), - RawTextObject.builder().text("Count").build()), + RawTextObject.builder().text("Name").build(), + RawTextObject.builder().text("Department").build(), + RawTextObject.builder().text("Badge").build()), List.of( - RawTextObject.builder().text("Widgets").build(), - RawNumberObject.builder().value(42.0).text("42").build()), + RawTextObject.builder() + .text("Data Refinement Department") + .build(), + RawTextObject.builder().text("MDR").build(), + Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() + .elements(List.of(RichTextSectionElement.Text.builder() + .text("Blue") + .style(TextStyle.builder() + .bold(true) + .build()) + .build())) + .build())))), List.of( - RawTextObject.builder().text("Gadgets").build(), - RawNumberObject.builder().value(7.0).text("7").build())))); + RawTextObject.builder() + .text("Art Sourcing Department") + .build(), + RawTextObject.builder().text("O&D").build(), + Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() + .elements(List.of( + RichTextSectionElement.Text.builder() + .text("Green") + .build(), + RichTextSectionElement.Text.builder() + .text("review") + .style( + TextStyle.builder() + .italic(true) + .build()) + .build())) + .build())))), + List.of( + RawTextObject.builder() + .text("Wellness Department") + .build(), + RawTextObject.builder().text("Wellness Center").build(), + Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() + .elements(List.of(RichTextSectionElement.Text.builder() + .text("Limited") + .style(TextStyle.builder() + .bold(true) + .build()) + .build())) + .build()))))))); return block; } } diff --git a/block-kit/src/test/java/blocks/DataTableTest.java b/block-kit/src/test/java/blocks/DataTableTest.java index 58eb528..31e2cce 100644 --- a/block-kit/src/test/java/blocks/DataTableTest.java +++ b/block-kit/src/test/java/blocks/DataTableTest.java @@ -15,23 +15,129 @@ public void testExample01() { String expected = """ { "type": "data_table", + "caption": "A Fabulous Table", "rows": [ [ - { "type": "raw_text", "text": "Item" }, - { "type": "raw_text", "text": "Count" } + { + "type": "raw_text", + "text": "Name" + }, + { + "type": "raw_text", + "text": "Department" + }, + { + "type": "raw_text", + "text": "Badge" + } ], [ - { "type": "raw_text", "text": "Widgets" }, - { "type": "raw_number", "value": 42.0, "text": "42" } + { + "type": "raw_text", + "text": "Data Refinement Department" + }, + { + "type": "raw_text", + "text": "MDR" + }, + { + "type": "rich_text", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "Blue", + "style": { + "bold": true, + "italic": false, + "strike": false, + "highlight": false, + "client_highlight": false, + "underline": false, + "unlink": false, + "code": false + } + } + ] + } + ] + } ], [ - { "type": "raw_text", "text": "Gadgets" }, - { "type": "raw_number", "value": 7.0, "text": "7" } + { + "type": "raw_text", + "text": "Art Sourcing Department" + }, + { + "type": "raw_text", + "text": "O&D" + }, + { + "type": "rich_text", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "Green" + }, + { + "type": "text", + "text": "review", + "style": { + "bold": false, + "italic": true, + "strike": false, + "highlight": false, + "client_highlight": false, + "underline": false, + "unlink": false, + "code": false + } + } + ] + } + ] + } + ], + [ + { + "type": "raw_text", + "text": "Wellness Department" + }, + { + "type": "raw_text", + "text": "Wellness Center" + }, + { + "type": "rich_text", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "Limited", + "style": { + "bold": true, + "italic": false, + "strike": false, + "highlight": false, + "client_highlight": false, + "underline": false, + "unlink": false, + "code": false + } + } + ] + } + ] + } ] - ], - "caption": "Quarterly widget report", - "page_size": 10, - "row_header_column_index": 0 + ] } """; assertEquals(JsonParser.parseString(expected), JsonParser.parseString(actual)); From baaddb78001ea45d4526f7c11f425e371f45feb6 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Tue, 8 Sep 2026 21:01:18 -0700 Subject: [PATCH 3/6] refactor(block-kit): build data_table cells via BlockCompositions.rawText Use the BlockCompositions.rawText(...) helper for the raw_text cells instead of RawTextObject.builder(), per the block-kit AGENTS.md guidance to build composition objects through BlockCompositions.* rather than raw builders. Depends on the rawText/rawNumber helpers added in slackapi/java-slack-sdk#1613. Co-Authored-By: Claude --- block-kit/src/main/java/blocks/DataTable.java | 26 +++++++------------ 1 file changed, 10 insertions(+), 16 deletions(-) diff --git a/block-kit/src/main/java/blocks/DataTable.java b/block-kit/src/main/java/blocks/DataTable.java index 0ad24a4..d049d09 100644 --- a/block-kit/src/main/java/blocks/DataTable.java +++ b/block-kit/src/main/java/blocks/DataTable.java @@ -2,7 +2,7 @@ import com.slack.api.model.block.Blocks; import com.slack.api.model.block.DataTableBlock; -import com.slack.api.model.block.composition.RawTextObject; +import com.slack.api.model.block.composition.BlockCompositions; import com.slack.api.model.block.element.RichTextSectionElement; import com.slack.api.model.block.element.RichTextSectionElement.TextStyle; import java.util.List; @@ -19,14 +19,12 @@ public static DataTableBlock example01() { DataTableBlock block = Blocks.dataTable(t -> t.caption("A Fabulous Table") .rows(List.of( List.of( - RawTextObject.builder().text("Name").build(), - RawTextObject.builder().text("Department").build(), - RawTextObject.builder().text("Badge").build()), + BlockCompositions.rawText("Name"), + BlockCompositions.rawText("Department"), + BlockCompositions.rawText("Badge")), List.of( - RawTextObject.builder() - .text("Data Refinement Department") - .build(), - RawTextObject.builder().text("MDR").build(), + BlockCompositions.rawText("Data Refinement Department"), + BlockCompositions.rawText("MDR"), Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() .elements(List.of(RichTextSectionElement.Text.builder() .text("Blue") @@ -36,10 +34,8 @@ public static DataTableBlock example01() { .build())) .build())))), List.of( - RawTextObject.builder() - .text("Art Sourcing Department") - .build(), - RawTextObject.builder().text("O&D").build(), + BlockCompositions.rawText("Art Sourcing Department"), + BlockCompositions.rawText("O&D"), Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() .elements(List.of( RichTextSectionElement.Text.builder() @@ -54,10 +50,8 @@ public static DataTableBlock example01() { .build())) .build())))), List.of( - RawTextObject.builder() - .text("Wellness Department") - .build(), - RawTextObject.builder().text("Wellness Center").build(), + BlockCompositions.rawText("Wellness Department"), + BlockCompositions.rawText("Wellness Center"), Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() .elements(List.of(RichTextSectionElement.Text.builder() .text("Limited") From 91e8c167e127b78b53493257c44ffd8b6bce2ea2 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Tue, 8 Sep 2026 21:15:45 -0700 Subject: [PATCH 4/6] refactor(block-kit): align the data_table example with the node SDK MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Use the node @slack/types data_table example (slackapi/node-slack-sdk#2638) — caption "A list of fruit and their quantities", a Fruit/Quantity header with an Apples/raw_number(12) data row — so the SDKs demonstrate the same payload. This also exercises the raw_number cell (and BlockCompositions. rawNumber), which the prior docs-derived example did not. Co-Authored-By: Claude --- block-kit/src/main/java/blocks/DataTable.java | 50 +------- .../src/test/java/blocks/DataTableTest.java | 113 ++---------------- 2 files changed, 11 insertions(+), 152 deletions(-) diff --git a/block-kit/src/main/java/blocks/DataTable.java b/block-kit/src/main/java/blocks/DataTable.java index d049d09..63c781e 100644 --- a/block-kit/src/main/java/blocks/DataTable.java +++ b/block-kit/src/main/java/blocks/DataTable.java @@ -3,8 +3,6 @@ import com.slack.api.model.block.Blocks; import com.slack.api.model.block.DataTableBlock; import com.slack.api.model.block.composition.BlockCompositions; -import com.slack.api.model.block.element.RichTextSectionElement; -import com.slack.api.model.block.element.RichTextSectionElement.TextStyle; import java.util.List; /** @@ -13,53 +11,13 @@ */ public class DataTable { /** - * A data table of departments with rich text badge cells. + * A list of fruit and their quantities. */ public static DataTableBlock example01() { - DataTableBlock block = Blocks.dataTable(t -> t.caption("A Fabulous Table") + DataTableBlock block = Blocks.dataTable(t -> t.caption("A list of fruit and their quantities") .rows(List.of( - List.of( - BlockCompositions.rawText("Name"), - BlockCompositions.rawText("Department"), - BlockCompositions.rawText("Badge")), - List.of( - BlockCompositions.rawText("Data Refinement Department"), - BlockCompositions.rawText("MDR"), - Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() - .elements(List.of(RichTextSectionElement.Text.builder() - .text("Blue") - .style(TextStyle.builder() - .bold(true) - .build()) - .build())) - .build())))), - List.of( - BlockCompositions.rawText("Art Sourcing Department"), - BlockCompositions.rawText("O&D"), - Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() - .elements(List.of( - RichTextSectionElement.Text.builder() - .text("Green") - .build(), - RichTextSectionElement.Text.builder() - .text("review") - .style( - TextStyle.builder() - .italic(true) - .build()) - .build())) - .build())))), - List.of( - BlockCompositions.rawText("Wellness Department"), - BlockCompositions.rawText("Wellness Center"), - Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() - .elements(List.of(RichTextSectionElement.Text.builder() - .text("Limited") - .style(TextStyle.builder() - .bold(true) - .build()) - .build())) - .build()))))))); + List.of(BlockCompositions.rawText("Fruit"), BlockCompositions.rawText("Quantity")), + List.of(BlockCompositions.rawText("Apples"), BlockCompositions.rawNumber(12.0, "12"))))); return block; } } diff --git a/block-kit/src/test/java/blocks/DataTableTest.java b/block-kit/src/test/java/blocks/DataTableTest.java index 31e2cce..7a3d728 100644 --- a/block-kit/src/test/java/blocks/DataTableTest.java +++ b/block-kit/src/test/java/blocks/DataTableTest.java @@ -15,126 +15,27 @@ public void testExample01() { String expected = """ { "type": "data_table", - "caption": "A Fabulous Table", + "caption": "A list of fruit and their quantities", "rows": [ [ { "type": "raw_text", - "text": "Name" + "text": "Fruit" }, { "type": "raw_text", - "text": "Department" - }, - { - "type": "raw_text", - "text": "Badge" - } - ], - [ - { - "type": "raw_text", - "text": "Data Refinement Department" - }, - { - "type": "raw_text", - "text": "MDR" - }, - { - "type": "rich_text", - "elements": [ - { - "type": "rich_text_section", - "elements": [ - { - "type": "text", - "text": "Blue", - "style": { - "bold": true, - "italic": false, - "strike": false, - "highlight": false, - "client_highlight": false, - "underline": false, - "unlink": false, - "code": false - } - } - ] - } - ] + "text": "Quantity" } ], [ { "type": "raw_text", - "text": "Art Sourcing Department" - }, - { - "type": "raw_text", - "text": "O&D" - }, - { - "type": "rich_text", - "elements": [ - { - "type": "rich_text_section", - "elements": [ - { - "type": "text", - "text": "Green" - }, - { - "type": "text", - "text": "review", - "style": { - "bold": false, - "italic": true, - "strike": false, - "highlight": false, - "client_highlight": false, - "underline": false, - "unlink": false, - "code": false - } - } - ] - } - ] - } - ], - [ - { - "type": "raw_text", - "text": "Wellness Department" - }, - { - "type": "raw_text", - "text": "Wellness Center" + "text": "Apples" }, { - "type": "rich_text", - "elements": [ - { - "type": "rich_text_section", - "elements": [ - { - "type": "text", - "text": "Limited", - "style": { - "bold": true, - "italic": false, - "strike": false, - "highlight": false, - "client_highlight": false, - "underline": false, - "unlink": false, - "code": false - } - } - ] - } - ] + "type": "raw_number", + "value": 12.0, + "text": "12" } ] ] From 1068b9d40c992bd90fa1b1a61dd2e7e0cb536cb3 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Tue, 8 Sep 2026 21:16:48 -0700 Subject: [PATCH 5/6] Revert "refactor(block-kit): align the data_table example with the node SDK" This reverts commit 91e8c167e127b78b53493257c44ffd8b6bce2ea2. --- block-kit/src/main/java/blocks/DataTable.java | 50 +++++++- .../src/test/java/blocks/DataTableTest.java | 113 ++++++++++++++++-- 2 files changed, 152 insertions(+), 11 deletions(-) diff --git a/block-kit/src/main/java/blocks/DataTable.java b/block-kit/src/main/java/blocks/DataTable.java index 63c781e..d049d09 100644 --- a/block-kit/src/main/java/blocks/DataTable.java +++ b/block-kit/src/main/java/blocks/DataTable.java @@ -3,6 +3,8 @@ import com.slack.api.model.block.Blocks; import com.slack.api.model.block.DataTableBlock; import com.slack.api.model.block.composition.BlockCompositions; +import com.slack.api.model.block.element.RichTextSectionElement; +import com.slack.api.model.block.element.RichTextSectionElement.TextStyle; import java.util.List; /** @@ -11,13 +13,53 @@ */ public class DataTable { /** - * A list of fruit and their quantities. + * A data table of departments with rich text badge cells. */ public static DataTableBlock example01() { - DataTableBlock block = Blocks.dataTable(t -> t.caption("A list of fruit and their quantities") + DataTableBlock block = Blocks.dataTable(t -> t.caption("A Fabulous Table") .rows(List.of( - List.of(BlockCompositions.rawText("Fruit"), BlockCompositions.rawText("Quantity")), - List.of(BlockCompositions.rawText("Apples"), BlockCompositions.rawNumber(12.0, "12"))))); + List.of( + BlockCompositions.rawText("Name"), + BlockCompositions.rawText("Department"), + BlockCompositions.rawText("Badge")), + List.of( + BlockCompositions.rawText("Data Refinement Department"), + BlockCompositions.rawText("MDR"), + Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() + .elements(List.of(RichTextSectionElement.Text.builder() + .text("Blue") + .style(TextStyle.builder() + .bold(true) + .build()) + .build())) + .build())))), + List.of( + BlockCompositions.rawText("Art Sourcing Department"), + BlockCompositions.rawText("O&D"), + Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() + .elements(List.of( + RichTextSectionElement.Text.builder() + .text("Green") + .build(), + RichTextSectionElement.Text.builder() + .text("review") + .style( + TextStyle.builder() + .italic(true) + .build()) + .build())) + .build())))), + List.of( + BlockCompositions.rawText("Wellness Department"), + BlockCompositions.rawText("Wellness Center"), + Blocks.richText(rt -> rt.elements(List.of(RichTextSectionElement.builder() + .elements(List.of(RichTextSectionElement.Text.builder() + .text("Limited") + .style(TextStyle.builder() + .bold(true) + .build()) + .build())) + .build()))))))); return block; } } diff --git a/block-kit/src/test/java/blocks/DataTableTest.java b/block-kit/src/test/java/blocks/DataTableTest.java index 7a3d728..31e2cce 100644 --- a/block-kit/src/test/java/blocks/DataTableTest.java +++ b/block-kit/src/test/java/blocks/DataTableTest.java @@ -15,27 +15,126 @@ public void testExample01() { String expected = """ { "type": "data_table", - "caption": "A list of fruit and their quantities", + "caption": "A Fabulous Table", "rows": [ [ { "type": "raw_text", - "text": "Fruit" + "text": "Name" }, { "type": "raw_text", - "text": "Quantity" + "text": "Department" + }, + { + "type": "raw_text", + "text": "Badge" + } + ], + [ + { + "type": "raw_text", + "text": "Data Refinement Department" + }, + { + "type": "raw_text", + "text": "MDR" + }, + { + "type": "rich_text", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "Blue", + "style": { + "bold": true, + "italic": false, + "strike": false, + "highlight": false, + "client_highlight": false, + "underline": false, + "unlink": false, + "code": false + } + } + ] + } + ] } ], [ { "type": "raw_text", - "text": "Apples" + "text": "Art Sourcing Department" + }, + { + "type": "raw_text", + "text": "O&D" + }, + { + "type": "rich_text", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "Green" + }, + { + "type": "text", + "text": "review", + "style": { + "bold": false, + "italic": true, + "strike": false, + "highlight": false, + "client_highlight": false, + "underline": false, + "unlink": false, + "code": false + } + } + ] + } + ] + } + ], + [ + { + "type": "raw_text", + "text": "Wellness Department" + }, + { + "type": "raw_text", + "text": "Wellness Center" }, { - "type": "raw_number", - "value": 12.0, - "text": "12" + "type": "rich_text", + "elements": [ + { + "type": "rich_text_section", + "elements": [ + { + "type": "text", + "text": "Limited", + "style": { + "bold": true, + "italic": false, + "strike": false, + "highlight": false, + "client_highlight": false, + "underline": false, + "unlink": false, + "code": false + } + } + ] + } + ] } ] ] From 755e61d14ce84330e4f989c86a9e89571c8b8eb9 Mon Sep 17 00:00:00 2001 From: Eden Zimbelman Date: Tue, 8 Sep 2026 21:20:19 -0700 Subject: [PATCH 6/6] docs(block-kit): simplify the DataTable example docstring Co-Authored-By: Claude --- block-kit/src/main/java/blocks/DataTable.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/block-kit/src/main/java/blocks/DataTable.java b/block-kit/src/main/java/blocks/DataTable.java index d049d09..3e8825a 100644 --- a/block-kit/src/main/java/blocks/DataTable.java +++ b/block-kit/src/main/java/blocks/DataTable.java @@ -13,7 +13,7 @@ */ public class DataTable { /** - * A data table of departments with rich text badge cells. + * A sample data table block. */ public static DataTableBlock example01() { DataTableBlock block = Blocks.dataTable(t -> t.caption("A Fabulous Table")