feat(block-kit): add table block example#100
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
Add a Bolt for Python Block Kit example for the table block, mirroring the official docs example. Imports TableBlock from slack_sdk and renders a header row plus two data rows with raw_text and rich_text link cells. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
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 a Bolt for Python Block Kit example for the table block, mirroring the official docs example.
block-kit/src/blocks/table.pywithexample01()returning aTableBlockimported fromslack_sdk.models.blocks.raw_textcells (wrapped), column 2 usesrich_textlink cells (right-aligned), matching the docs JSON exactly.block-kit/tests/blocks/test_table.pyasserts the produced block deep-equals the expected literal.Docs reference: https://docs.slack.dev/reference/block-kit/blocks/table-block
Validation
Run in
block-kit/with the repo.venv:pytest tests/blocks/test_table.py— PASS (1 passed)ruff check src/blocks/table.py tests/blocks/test_table.py— PASS (all checks passed)ruff format --check ...— PASS (already formatted)mypy src/blocks/table.py— PASS (no issues)TableBlockis already shipped in the pinnedslack_sdk==3.42.0, so no SDK dependency is pending. This examples repo does not use changesets, so none was added.Co-Authored-By: Claude svc-devxp-claude@slack-corp.com