feat(model): add TaskCardBlock and UrlSourceElement - #1638
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1638 +/- ##
=========================================
Coverage 72.84% 72.84%
- Complexity 4533 4535 +2
=========================================
Files 482 482
Lines 14423 14425 +2
Branches 1512 1512
=========================================
+ Hits 10506 10508 +2
Misses 3022 3022
Partials 895 895
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. |
zimeg
left a comment
There was a problem hiding this comment.
@srtaalej LGTM 🌞 Before merging it'd be nice to compile against a changeset in slack-samples/bolt-java-examples to exercise publishing steps onward! I suggest this to build confidence against odd edges that a packaged version sometimes bring. 🎁
🧮 Other comments I leave are around unordered entries but this isn't introduced in this PR so please feel free to ignore rambles.
| @Test | ||
| public void testTaskCard() { | ||
| assertThat(taskCard(t -> t.taskId("task_1").title("Do thing").status("complete")), is(notNullValue())); | ||
| } |
There was a problem hiding this comment.
🧮 suggestion: Can we move this toward alphabetical order? A follow up change can reorganize the file but I hope to steer this toward a standard now!
| case TaskCardBlock.TYPE: | ||
| return TaskCardBlock.class; |
There was a problem hiding this comment.
🎲 note: Similar suggestion to alphabetical ordering but no blocker if this is a significant change!
| private RichTextBlock details; | ||
| private RichTextBlock output; |
…ckKitTest.java Co-authored-by: Eden Zimbelman <eden.zimbelman@salesforce.com>
|
update ⏰ ! changes have been validated against bolt-java-examples and work 😸 merging now 🚀 |
Summary
TaskCardBlocklayout block (task_cardtype) with all fields from docsUrlSourceElementfor thesourcesfieldGsonLayoutBlockFactory, addsBlocks.taskCard()helperBlockKitTestandBlocksTestFields
type"task_card"task_idtitlestatusin_progress,complete,error)detailsoutputsourcesblock_idiconhide_titleExample usage
Test plan
parseTaskCardBlock— deserializes JSON from docs examplebuildTaskCardBlock— constructs viaBlocks.taskCard()helpertestTaskCard— static helper test inBlocksTestchatPostMessage