feat(block-kit): add composition object examples - #70
Draft
zimeg wants to merge 1 commit into
Draft
Conversation
Add composition object examples to the block-kit showcase, mirroring the block element examples: one exampleNN() per documented reference payload, each returning the full host block/view so the reference JSON round-trips verbatim, with tests asserting the complete serialized payload. Ships 9 of the 10 documented composition objects (text, option, option-group, confirmation-dialog, dispatch-action-configuration, conversation-filter, slack-file, trigger, workflow). The slack-icon object is deferred: it is a card-block sub-object and the card block is absent from the SDK, so no example payload can be produced. 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 composition object examples to the
block-kitshowcase, the third Block Kit category after blocks and block elements. Mirrors the block element examples: oneexampleNN()per documented reference payload, each returning the full host block or view so the reference JSON round-trips verbatim, with tests asserting the complete serialized payload viaGsonFactory.createSnakeCase().What's on display
compositionobjects/Text.javacompositionobjects/Option.javacompositionobjects/OptionGroup.javacompositionobjects/ConfirmationDialog.javacompositionobjects/DispatchActionConfiguration.javacompositionobjects/ConversationFilter.javacompositionobjects/SlackFile.javacompositionobjects/Trigger.javacompositionobjects/Workflow.javaEvery reference payload documented on each page becomes one
exampleNN(), and each test asserts the full hosted payload exactly as the docs page shows it. Input-block examples additionally assert the SDK's default-emitted fields (for exampleoptional: false), matching the existingblocks/InputTestconvention in this repo.Deferred
com.slack.api.model.blockpackage. Its docs page ships no standalone JSON example, so there is no reference payload to reproduce. Deferred until the card block lands in the SDK.Testing
Ran the CI gate locally from
block-kit/exactly as.github/workflows/test.ymldefines:mvn --batch-mode spotless:check— passesmvn --batch-mode test -Dspotless.apply.skip— passes (39 tests, 0 failures)