Skip to content

feat(block-kit): add url_source element example - #127

Merged
mwbrooks merged 1 commit into
mainfrom
feat-block-kit-url-source
Nov 13, 2026
Merged

mwbrooks merged 1 commit into
mainfrom
feat-block-kit-url-source

Conversation

@zimeg

@zimeg zimeg commented Nov 13, 2026 •

Copy link
Copy Markdown
Member

Summary

This pull request adds a url_source element example that matches the URL source element docs payloads.

  • UrlSource.java builds example01() as a single UrlSourceElement and example02() as a task card block with two URL sources, mirroring the Python and JS examples.
  • UrlSourceTest.java asserts the serialized JSON for both examples.
  • README entry under Block elements.

The docs page frontmatter still reads "Displays a URL source with optional icon.", left over from before icon_url was removed. The Javadoc and README use "Displays a URL source for referencing within a task card block." to match the Python and JS examples.

Testing

  1. Run mvn test -Dtest=elements.UrlSourceTest in block-kit.
  2. Optionally post UrlSource.example02() with chat.postMessage and confirm both sources render as links on the task card.

🤖 Generated with Claude Code

Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
@zimeg
zimeg requested a review from a team as a code owner November 13, 2026 22:52
@zimeg zimeg added the enhancement New feature or request label Nov 13, 2026
@zimeg zimeg self-assigned this Nov 13, 2026

@mwbrooks mwbrooks left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Thanks @zimeg, the tests pin both docs payloads exactly, which makes this one easy to trust.

import java.util.List;

/**
* Displays a URL source for referencing within a task card block.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (non-blocking): Since icon_url is gone, could we update the summary in the docs page frontmatter too? Then this Javadoc, the README, and the Python and JS examples all match the docs again, the way AGENTS.md asks.

@zimeg zimeg Nov 13, 2026 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

📚 thanks @mwbrooks, agreed! the docs page summary is the source of truth, so we'll fix it there and drop the stale icon mention. the new summary matches what this Javadoc, the README line, and the Python and JS examples already say:

Displays a URL source for referencing within a task card block.

so once that lands, everything matches the docs again with no example changes needed.

@mwbrooks
mwbrooks merged commit d31a9c3 into main Nov 13, 2026
4 checks passed
@mwbrooks
mwbrooks deleted the feat-block-kit-url-source branch November 13, 2026 22:57
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.

2 participants