feat(block-kit): add block element examples - #69
Draft
zimeg wants to merge 2 commits into
Draft
Conversation
Add dedicated block-element examples under the block-kit project, mirroring the reference payloads on the docs.slack.dev block-elements reference pages, with tests asserting the complete serialized JSON. Elements: button, select menu (5 variants), multi-select menu (5 variants), radio buttons, date picker, time picker, datetime picker, email input, URL input, number input, file input, overflow menu, plain-text input, image (3 variants), workflow button. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
…and team elements Adds the remaining documented block elements that the Java SDK models and serializes to the exact reference payload: - feedback_buttons and icon_button, each inside a context_actions block - rich_text_input, inside an input block - the team rich text element, added to the existing rich text block example Each example ships a test asserting the complete reference JSON, and every new element is listed in the README with its docs.slack.dev reference and tagline. Deferred: url_source is not modeled by the Java SDK (no url source object or task card block), so it is omitted rather than approximated. 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.
Adds dedicated block-element examples under the
block-kitproject, mirroring the reference payloads shown on the Block Kit block-elements reference pages on docs.slack.dev. Each documented reference payload becomes oneexampleNN(), and every example ships a test asserting the complete serialized JSON (compared as parsed JSON trees, so key order does not matter), following the existingblocks/convention.This is the home for all implemented block elements; anything not yet covered is left as follow-up.
Elements added
New package
blockelementsunderblock-kit/src/main/java(+ matching tests):image_url,slack_fileby url,slack_fileby idThe
block-kit/README.mdgains a "Block elements" section listing each element with its docs link, tagline, and a link to the implementation.Notes on hosting
Elements are shown inside their host block exactly as the reference pages present them: selects, radio buttons, overflow, image, and workflow button as a
sectionaccessory; date/time/datetime/email/url/number/file/plain-text inputs inside aninputblock. Where the docs present an element inside a modal view, the element is hosted in its natural block so the test can assert the full block payload.Deferred (SDK gaps)
descriptiontyped asmrkdwn. The current model serializes an option description asplain_text, so the reference payload cannot be reproduced faithfully. Deferred until the description can carry a markdown text object.agent_promptvariant — not represented in the current button model, so it is omitted from the button examples.Testing
mvn spotless:checkandmvn testboth pass for theblock-kitproject (all example tests green).