refactor(block-kit): inline BlockCompositions calls in element examples - #75
Merged
Conversation
These examples are surfaced in docs.slack.dev as focused snippets — only the exampleNN() body is shown, so the static imports at the top of the file are invisible to the reader and a bare plainText(...)/markdownText(...) reads as an unattributed free function. Drop the static imports and qualify every call (BlockCompositions.plainText, BlockCompositions.markdownText) so each helper in the surfaced range names its class, consistent with the sibling Blocks.*/BlockElements.* calls. Co-Authored-By: Claude <svc-devxp-claude@slack-corp.com>
zimeg
marked this pull request as ready for review
September 1, 2026 09:05
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.
What
Inline the
BlockCompositionshelper calls across all 18 block-element examples inelements/— drop theimport static ...BlockCompositions.{markdownText,plainText};lines and qualify every call asBlockCompositions.markdownText(...)/BlockCompositions.plainText(...).Why
These examples are surfaced on docs.slack.dev as focused snippets — the docs
referenceblock pins only theexampleNN()body, so the static imports at the top of the file are never shown to the reader. A bareplainText(...)/markdownText(...)in the surfaced range reads as an unattributed free function.Qualifying the calls makes each surfaced snippet self-attributing, consistent with how the sibling
Blocks.*/BlockElements.*calls already name their class.Purely cosmetic — no payload or behavior change.
Scope
The 18 element example files: Button, DatePicker, DatetimePicker, EmailInput, FeedbackButtons, FileInput, IconButton, Image, MultiSelectMenu, NumberInput, OverflowMenu, PlainTextInput, RadioButtons, RichTextInput, SelectMenu, TimePicker, UrlInput, WorkflowButton.
Kept separate from the actions-block (#74) and composition-object (#70) example inlining so each is a small, reviewable diff.
Verified
import static ...BlockCompositions; zero remaining baremarkdownText(/plainText(calls; exactly one non-staticimport ...BlockCompositions;per file.mvn spotless:check compile→ BUILD SUCCESS (spotless reflowed 6 files where the longer qualified names crossed the 120-col limit — whitespace only).elements/*.javafiles (+123 / −143).🤖 Generated with Claude Code