feat(models): add ContainerBlock for block kit - #1949
Open
srtaalej wants to merge 2 commits into
Open
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1949 +/- ##
==========================================
+ Coverage 84.06% 84.08% +0.02%
==========================================
Files 118 118
Lines 13506 13550 +44
==========================================
+ Hits 11354 11394 +40
- Misses 2152 2156 +4 ☔ View full report in Codecov by Harness. |
srtaalej
marked this pull request as ready for review
August 31, 2026 16:27
zimeg
approved these changes
Sep 2, 2026
Comment on lines
+1096
to
+1098
| @JsonValidator("width must be a valid value (narrow, standard, wide, full)") | ||
| def _validate_width(self): | ||
| return self.width is None or self.width in self.valid_widths |
Member
There was a problem hiding this comment.
🌊 note: These validation patterns sometimes concern me if the API changes what's accepted but no blocker for the current patterns available.
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.
Summary
ContainerBlock(type: "container") to the Block Kit models per https://docs.slack.dev/reference/block-kit/blocks/container-block/title,rich_text_title,subtitle,child_blocks,width,icon,is_collapsible,default_collapsed,has_header_divideris_collapsible+has_header_dividerTest plan
Example Bolt test app (app.py)
Register a
/container-blockslash command in your test app and use the text argument to test different property combinations:/container-block— base (title + child_blocks)/container-block width— addswidth: "wide"/container-block mrkdwn-subtitle— subtitle withmrkdwntype/container-block has-header-divider— addshas_header_divider: true/container-block default-collapsed— addsis_collapsible+default_collapsed/container-block icon— addsiconimage element/container-block rich-text-title— usesrich_text_titleinstead oftitle/container-block all— all compatible properties together