feat(block-kit): add attachment_mention block element example - #226
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
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>
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 the first Block Kit element example, in its own
block-kit/src/block_elements/path (kept separate fromsrc/blocks/):attachment_mention, which renders as a rich app attachment or entity reference inside arich_textblock.src/block_elements/attachment_mention.py—example01()builds the url-only payload from the docs example.tests/block_elements/test_attachment_mention.py— assertsto_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.AttachmentMentionbuilder from slackapi/python-slack-sdk#1948, which is not yet released. Against the pinnedslack_sdkinrequirements.txt, the test andmypyfail withRichTextElementParts 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