Skip to content

refactor(block-kit): inline BlockCompositions calls in element examples - #75

Merged
zimeg merged 1 commit into
mainfrom
inline-blockcompositions-elements
Sep 1, 2026
Merged

refactor(block-kit): inline BlockCompositions calls in element examples#75
zimeg merged 1 commit into
mainfrom
inline-blockcompositions-elements

Conversation

@zimeg

@zimeg zimeg commented Sep 1, 2026

Copy link
Copy Markdown
Member

What

Inline the BlockCompositions helper calls across all 18 block-element examples in elements/ — drop the import static ...BlockCompositions.{markdownText,plainText}; lines and qualify every call as BlockCompositions.markdownText(...) / BlockCompositions.plainText(...).

Why

These examples are surfaced on docs.slack.dev as focused snippets — the docs reference block pins only the exampleNN() body, so the static imports at the top of the file are never shown to the reader. A bare plainText(...) / 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

  • Zero remaining import static ...BlockCompositions; zero remaining bare markdownText(/plainText( calls; exactly one non-static import ...BlockCompositions; per file.
  • mvn spotless:check compileBUILD SUCCESS (spotless reflowed 6 files where the longer qualified names crossed the 120-col limit — whitespace only).
  • Diff touches only the 18 elements/*.java files (+123 / −143).

🤖 Generated with Claude Code

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 zimeg added update PR only - an update or maintenance is being made to an existing app java Pull requests that update java code labels Sep 1, 2026
@zimeg zimeg self-assigned this Sep 1, 2026
@zimeg
zimeg marked this pull request as ready for review September 1, 2026 09:05
@zimeg
zimeg requested a review from a team as a code owner September 1, 2026 09:05

@zimeg zimeg left a comment

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.

🤖 Will fast merge to align with #71 before surfacing in reference!

@zimeg
zimeg merged commit e16b87e into main Sep 1, 2026
4 checks passed
@zimeg
zimeg deleted the inline-blockcompositions-elements branch September 1, 2026 09:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

java Pull requests that update java code update PR only - an update or maintenance is being made to an existing app

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant