Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 29 additions & 1 deletion app/lib/slack_client/views/puzzle_form.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,16 @@ def create
end

blocks.input label: "What is the Puzzle question?", block_id: "question" do |input|
input.plain_text_input action_id: "question", multiline: true
input.plain_text_input(
action_id: "question",
multiline: true,
placeholder: "See template below"
)
end

blocks.context do |context|
context.mrkdwn text: "*Puzzle Examples*"
context.plain_text text: placeholder_text
end

blocks.input label: "Answer", block_id: "answer" do |input|
Expand Down Expand Up @@ -42,6 +51,25 @@ def intro_text
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.
TEXT
end

def placeholder_text
<<~TEXT

Example: Multi-line Snippet

In this snippet:

```
Time.current.strftime("%Y-%m-%dT%H:%M:%S%z")
```

Is the `current` method a Ruby or Rails method?

Example: Single Sentence Snippet

When you have a line like this `hash = { a: 1, b: 2, c: 3 }` and later you call this method `hash.transform_keys(&:to_s)` -- is `transform_keys` a Ruby or Rails method?
TEXT
end
end
end
end