Skip to content

feat(block-kit): add attachment_mention block element example - #226

Draft
zimeg wants to merge 1 commit into
mainfrom
attachment-mention-element
Draft

feat(block-kit): add attachment_mention block element example#226
zimeg wants to merge 1 commit into
mainfrom
attachment-mention-element

Conversation

@zimeg

@zimeg zimeg commented Aug 28, 2026

Copy link
Copy Markdown
Member

Summary

Adds the first Block Kit element example, in its own block-kit/src/block_elements/ path (kept separate from src/blocks/): attachment_mention, which renders as a rich app attachment or entity reference inside a rich_text block.

  • src/block_elements/attachment_mention.pyexample01() builds the url-only payload from the docs example.
  • tests/block_elements/test_attachment_mention.py — asserts to_dict() equals the docs JSON.
  • README.md — new Block elements section registering it.

Heads up: intentionally red until the SDK builder ships

The example uses the typed RichTextElementParts.AttachmentMention builder from slackapi/python-slack-sdk#1948, which is not yet released. Against the pinned slack_sdk in requirements.txt, the test and mypy fail with RichTextElementParts has no attribute "AttachmentMention"by design. The example asserts the expected released shape so a reviewer of the SDK PR can test the builder against it. CI goes green (verified locally) once the builder releases and the pin bumps.

Related

Draft until this and the SDK builder land together.

Co-Authored-By: Claude svc-devxp-claude@slack-corp.com

Splits Block Kit element examples into their own `src/block_elements/`
path (mirroring the docs' block-elements reference section) and adds the
first one: `attachment_mention`, which renders as a rich app attachment
or entity reference within a rich_text block.

https://docs.slack.dev/reference/block-kit/block-elements/attachment-mention-element/

The example uses the typed `RichTextElementParts.AttachmentMention`
builder from python-slack-sdk#1948. That builder is not yet released, so
this example's test/typecheck fail against the pinned slack_sdk until it
ships — the example intentionally asserts the expected released shape so
reviewers can test the builder PR against it.

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg zimeg changed the title Add the attachment_mention block element example feat(block-kit): add attachment_mention block element example Aug 28, 2026
@zimeg zimeg added the enhancement New feature or request label Aug 28, 2026
@zimeg zimeg self-assigned this Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant