feat(block-kit): add container block example - #161
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
Add a container block example (example01) modeled on the container block reference page: a collapsible bulk-update summary grouping section, divider, context, and actions child blocks (all built with slack_sdk model classes). slack_sdk does not yet export ContainerBlock, so mypy and pytest (collection) fail by design on the missing import — the honest signal that the block is not yet available, unblocking when the SDK ships it. Ruff and formatting pass. Mirrors the JS container example (slack-samples/bolt-js-examples#165). 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
containerBlock Kit example to theblock-kitcollection, closing the last block-coverage gap for Python (the JS collection already has one via slack-samples/bolt-js-examples#165).example01models the container block reference page: a collapsible bulk update container groupingsection,divider,context, andactionschild blocks (all built with slack_sdk model classes).block-kit/src/blocks/container.py—example01()returns aContainerBlock.block-kit/tests/blocks/test_container.py—to_dict()assertion.slack_sdkdoes not yet exportContainerBlock(verified againstslack_sdk==3.42.0), so:Module "slack_sdk.models.blocks" has no attribute "ContainerBlock"ImportErroron collectionThis is intentional — the example imports the real (unshipped) block class rather than hand-rolling one, so the red CI is an honest signal the SDK is missing the type. The child blocks (section/divider/context/actions) all use real slack_sdk model classes. Ruff check + format pass. Unblocks once
slack_sdkshipsContainerBlock.Related
slack_sdkexportingContainerBlock.🤖 Generated with Claude Code