Skip to content

Commit dd3a10b

Browse files
zimegClaudeclaude
authored
fix(block-kit): set verbatim false on the carousel block example text (#103)
Co-authored-by: Claude <svc-devxp-claude@slack-corp.com> Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
1 parent 480f800 commit dd3a10b

2 files changed

Lines changed: 38 additions & 18 deletions

File tree

‎block-kit/src/main/java/blocks/Carousel.java‎

Lines changed: 20 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,33 +19,44 @@ public static CarouselBlock example01() {
1919
Blocks.card(card -> card.blockId("carousel-card-1")
2020
.icon(BlockElements.imageElement(
2121
i -> i.imageUrl("https://picsum.photos/36/36").altText("Icon")))
22-
.title(BlockCompositions.markdownText("MDR"))
23-
.subtitle(BlockCompositions.markdownText("Refining data files"))
22+
.title(BlockCompositions.markdownText(
23+
mt -> mt.text("MDR").verbatim(false)))
24+
.subtitle(BlockCompositions.markdownText(
25+
mt -> mt.text("Refining data files").verbatim(false)))
2426
.heroImage(BlockElements.imageElement(
2527
i -> i.imageUrl("https://picsum.photos/400/300").altText("Sample hero image")))
26-
.body(BlockCompositions.markdownText("Blue badge required to gain access."))
28+
.body(BlockCompositions.markdownText(mt ->
29+
mt.text("Blue badge required to gain access.").verbatim(false)))
2730
.actions(List.of(BlockElements.button(b -> b.text(BlockCompositions.plainText(
2831
pt -> pt.text("Action Button").emoji(false)))
2932
.actionId("button_action_1"))))),
3033
Blocks.card(card -> card.blockId("carousel-card-2")
3134
.icon(BlockElements.imageElement(
3235
i -> i.imageUrl("https://picsum.photos/36/36").altText("Icon")))
33-
.title(BlockCompositions.markdownText("O&D"))
34-
.subtitle(BlockCompositions.markdownText("Storage, maintenance, and rotation of art pieces"))
36+
.title(BlockCompositions.markdownText(
37+
mt -> mt.text("O&D").verbatim(false)))
38+
.subtitle(BlockCompositions.markdownText(
39+
mt -> mt.text("Storage, maintenance, and rotation of art pieces")
40+
.verbatim(false)))
3541
.heroImage(BlockElements.imageElement(
3642
i -> i.imageUrl("https://picsum.photos/400/300").altText("Sample hero image")))
37-
.body(BlockCompositions.markdownText("Green badge required to gain access."))
43+
.body(BlockCompositions.markdownText(mt ->
44+
mt.text("Green badge required to gain access.").verbatim(false)))
3845
.actions(List.of(BlockElements.button(b -> b.text(BlockCompositions.plainText(
3946
pt -> pt.text("Action Button").emoji(false)))
4047
.actionId("button_action_2"))))),
4148
Blocks.card(card -> card.blockId("carousel-card-3")
4249
.icon(BlockElements.imageElement(
4350
i -> i.imageUrl("https://picsum.photos/36/36").altText("Icon")))
44-
.title(BlockCompositions.markdownText("Wellness Center"))
45-
.subtitle(BlockCompositions.markdownText("Wellness sessions"))
51+
.title(BlockCompositions.markdownText(
52+
mt -> mt.text("Wellness Center").verbatim(false)))
53+
.subtitle(BlockCompositions.markdownText(
54+
mt -> mt.text("Wellness sessions").verbatim(false)))
4655
.heroImage(BlockElements.imageElement(
4756
i -> i.imageUrl("https://picsum.photos/400/300").altText("Sample hero image")))
48-
.body(BlockCompositions.markdownText("Please take a seat in the waiting room until called."))
57+
.body(BlockCompositions.markdownText(
58+
mt -> mt.text("Please take a seat in the waiting room until called.")
59+
.verbatim(false)))
4960
.actions(List.of(BlockElements.button(b -> b.text(BlockCompositions.plainText(
5061
pt -> pt.text("Action Button").emoji(false)))
5162
.actionId("button_action_3"))))))));

‎block-kit/src/test/java/blocks/CarouselTest.java‎

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,13 @@ public void testExample01() {
2626
},
2727
"title": {
2828
"type": "mrkdwn",
29-
"text": "MDR"
29+
"text": "MDR",
30+
"verbatim": false
3031
},
3132
"subtitle": {
3233
"type": "mrkdwn",
33-
"text": "Refining data files"
34+
"text": "Refining data files",
35+
"verbatim": false
3436
},
3537
"hero_image": {
3638
"type": "image",
@@ -39,7 +41,8 @@ public void testExample01() {
3941
},
4042
"body": {
4143
"type": "mrkdwn",
42-
"text": "Blue badge required to gain access."
44+
"text": "Blue badge required to gain access.",
45+
"verbatim": false
4346
},
4447
"actions": [
4548
{
@@ -63,11 +66,13 @@ public void testExample01() {
6366
},
6467
"title": {
6568
"type": "mrkdwn",
66-
"text": "O&D"
69+
"text": "O&D",
70+
"verbatim": false
6771
},
6872
"subtitle": {
6973
"type": "mrkdwn",
70-
"text": "Storage, maintenance, and rotation of art pieces"
74+
"text": "Storage, maintenance, and rotation of art pieces",
75+
"verbatim": false
7176
},
7277
"hero_image": {
7378
"type": "image",
@@ -76,7 +81,8 @@ public void testExample01() {
7681
},
7782
"body": {
7883
"type": "mrkdwn",
79-
"text": "Green badge required to gain access."
84+
"text": "Green badge required to gain access.",
85+
"verbatim": false
8086
},
8187
"actions": [
8288
{
@@ -100,11 +106,13 @@ public void testExample01() {
100106
},
101107
"title": {
102108
"type": "mrkdwn",
103-
"text": "Wellness Center"
109+
"text": "Wellness Center",
110+
"verbatim": false
104111
},
105112
"subtitle": {
106113
"type": "mrkdwn",
107-
"text": "Wellness sessions"
114+
"text": "Wellness sessions",
115+
"verbatim": false
108116
},
109117
"hero_image": {
110118
"type": "image",
@@ -113,7 +121,8 @@ public void testExample01() {
113121
},
114122
"body": {
115123
"type": "mrkdwn",
116-
"text": "Please take a seat in the waiting room until called."
124+
"text": "Please take a seat in the waiting room until called.",
125+
"verbatim": false
117126
},
118127
"actions": [
119128
{

0 commit comments

Comments
 (0)