Skip to content

feat(block-kit): add carousel block example#97

Draft
zimeg wants to merge 1 commit into
mainfrom
feat/block-kit-carousel-example
Draft

feat(block-kit): add carousel block example#97
zimeg wants to merge 1 commit into
mainfrom
feat/block-kit-carousel-example

Conversation

@zimeg

@zimeg zimeg commented Jun 26, 2026

Copy link
Copy Markdown
Member

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.pyexample01() returning a CarouselBlock of CardBlocks
  • block-kit/tests/blocks/test_carousel.py — asserts the produced block deep-equals the expected payload
  • block-kit/README.md — adds the Carousel bullet (alphabetical) with docs + implementation links

Docs: https://docs.slack.dev/reference/block-kit/blocks/carousel-block

Validation

Run in block-kit/ against the pinned slack_sdk==3.42.0 / pytest==9.1.1 / ruff==0.15.20:

  • pytest -q — 33 passed (full suite, including new test_carousel.py)
  • ruff check src/blocks/carousel.py tests/blocks/test_carousel.py — all checks passed
  • ruff format --check ... — 2 files already formatted

Note: 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

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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant