feat(block-kit): add carousel block example#97
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
Add a Python Block Kit example for the carousel block, mirroring the official docs example: a carousel of three cards, each with an icon, title, subtitle, hero image, body, and an action button. Includes a test asserting the produced block matches the expected payload, and a README bullet linking the reference and implementation. Ref: https://docs.slack.dev/reference/block-kit/blocks/carousel-block 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 Python Block Kit example for the carousel block, mirroring the official docs example.
example01()builds a carousel of three cards, each with an icon, title, subtitle, hero image, body, and an action button — matching the reference JSON exactly.block-kit/src/blocks/carousel.py—example01()returning aCarouselBlockofCardBlocksblock-kit/tests/blocks/test_carousel.py— asserts the produced block deep-equals the expected payloadblock-kit/README.md— adds the Carousel bullet (alphabetical) with docs + implementation linksDocs: https://docs.slack.dev/reference/block-kit/blocks/carousel-block
Validation
Run in
block-kit/against the pinnedslack_sdk==3.42.0/pytest==9.1.1/ruff==0.15.20:pytest -q— 33 passed (full suite, including newtest_carousel.py)ruff check src/blocks/carousel.py tests/blocks/test_carousel.py— all checks passedruff format --check ...— 2 files already formattedNote: this is a sample app repo with no
.changeset/, so no changeset was added.Co-Authored-By: Claude svc-devxp-claude@slack-corp.com
🤖 Generated with Claude Code