Skip to content

feat(block-kit): add card block example - #67

Open
srtaalej wants to merge 2 commits into
mainfrom
ale-docs-add-cardblock
Open

feat(block-kit): add card block example#67
srtaalej wants to merge 2 commits into
mainfrom
ale-docs-add-cardblock

Conversation

@srtaalej

Copy link
Copy Markdown

Adds Card.java with a full card example matching the docs JSON.

@srtaalej srtaalej self-assigned this Aug 27, 2026
@srtaalej srtaalej added the documentation Improvements or additions to documentation label Aug 27, 2026
@srtaalej
srtaalej marked this pull request as ready for review August 27, 2026 20:19
@srtaalej
srtaalej requested a review from a team as a code owner August 27, 2026 20:19
@srtaalej
srtaalej requested a review from zimeg August 28, 2026 19:20
@zimeg zimeg changed the title feat: add card block example feat(block-kit): add card block example Sep 1, 2026
@zimeg zimeg added enhancement New feature or request java Pull requests that update java code labels Sep 1, 2026

@zimeg zimeg 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.

@srtaalej Praises thanks for bringing this implementation to soon reference! I rambled excitements so please merge soon or whenever convenient.

CardBlock block = Blocks.card(c -> c.icon(BlockElements.imageElement(
i -> i.imageUrl("https://picsum.photos/36/36").altText("Icon")))
.title(BlockCompositions.markdownText("Lumon Industries"))
.subtitle(BlockCompositions.markdownText("Committed to work-life balance"))

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.

🏆 praise: Thanks for inlining this instead of using static imports! I find it much more clear for focused snippets because it removes magic of where that markdownText is from!

🐐 ramble: I opened adjacent PR for the action block and elements and am including similar for composition objects also. The "static" import pattern is not so familiar to me but I understand it's common to use in development.

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.

📝 note: I have follow up planned to mirror this in other examples with
#74 and #75 and I notice it's in #71 too bless.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request java Pull requests that update java code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants