Skip to content

Commit 56fe03c

Browse files
committed
IIRR-25: add instructions to puzzle form.
1 parent 5387b82 commit 56fe03c

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

app/lib/slack_client/views/puzzle_form.rb

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,10 @@ module Views
33
class PuzzleForm
44
def create
55
blocks = Slack::BlockKit.blocks do |blocks|
6+
blocks.section do |section|
7+
section.mrkdwn text: intro_text
8+
end
9+
610
blocks.input label: "What is the Puzzle question?", block_id: "question" do |input|
711
input.plain_text_input action_id: "question", multiline: true
812
end
@@ -28,6 +32,16 @@ def create
2832
modal.close text: "Close"
2933
end.as_json
3034
end
35+
36+
private
37+
38+
def intro_text
39+
<<~TEXT
40+
Please provide a puzzle question, the answer, an explanation of the answer, and a link to documentation if applicable.
41+
42+
When providing the question, please provide ONLY the question text, without any additional introduction (for example, do not include "Is this ruby or rails?"). The bot will add that automatically.
43+
TEXT
44+
end
3145
end
3246
end
3347
end

0 commit comments

Comments
 (0)