Repository navigation
Add expand to the section block - #480
Conversation
Slack collapses long section text behind "Show more" unless the block sets expand: true. slack-integration needs this so the Breeze workflow plan card always shows every step, as the web app does. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
yyakhnytsia
left a comment
There was a problem hiding this comment.
reviewed, left small comment for improvement.
|
|
||
| Optional<BlockElement> getAccessory(); | ||
|
|
||
| Optional<Boolean> getExpand(); |
There was a problem hiding this comment.
Could you please leave the link to Slack API documentation about this element: https://docs.slack.dev/reference/block-kit/blocks/section-block?
Like it's done for the other elements, like TaskCardBlockIF, MarkdownBlockIF, this makes it easier to check the parameters and structure.
There was a problem hiding this comment.
Added the link to the section block docs on SectionIF in 834446b, following the same pattern as TaskCardBlockIF and MarkdownBlockIF.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
| } | ||
|
|
||
| @Test | ||
| public void itDeserializesExpand() throws IOException { |
There was a problem hiding this comment.
doesn't cover expand(false). Optional.of(false) should serialize as "expand": false, not be dropped, but nothing asserts it.
There was a problem hiding this comment.
Added itSerializesExpandFalseWhenSet in 2d8d54a. It builds a section with expand(false) and asserts that the JSON has an expand key set to the boolean false, so an explicit false isn't dropped.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Why
Slack collapses long
sectiontext behind "Show more" unless the block setsexpand: true.Sectiondoesn't have this field yet, so callers can't turn the collapse off. In slack-integration, a Breeze workflow plan card puts its steps in a section, and Slack cuts the list off partway through. The web app always shows the whole plan.What
Adds an optional
expandfield toSectionIF. It is left out of the JSON when not set, so existing sections serialize exactly as before.Tests
New
SectionBlockTest:expand: trueis serialized when setexpandis left out when not setexpanddeserializes from JSONThe full
slack-basesuite passes locally.🤖 Generated with Claude Code