Using `bool` parameter values not intuitive
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 35/100
Research direction
Start with the coder_parameter handling for type "bool" and reproduce the Terraform example using data.coder_parameter.ai.value. Determine whether string values such as "true" should become booleans or produce a warning; done means the behavior is consistent with the documented expectation and covered by a regression test.
Written by the indexing model from the issue text.
Description
This does not behave as expected because the value is the string literal"true", not the boolean value true. This should be made more intuitive, or throw a warning?
data "coder_parameter" "ai" {
name = "ai"
display_name = "Use AI?"
description = "Do you want to use AI for this workspace?"
type = "bool"
form_type = "checkbox"
default = false
order = 0
}
data "coder_parameter" "ai_prompt" {
count = data.coder_parameter.ai.value == true ? 1 : 0
name = "prompt"
display_name = "Prompt"
description = ""
type = "string"
form_type = "textarea"
default = ""
styling = jsonencode({
placeholder = "hello world"
})
}
- Dominant language
- Go
- Stars
- 9
- Forks
- 5
- Avg merge
- 5d 17h
- Merged PRs (30d)
- 5
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from coder/preview
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
bug
-
Difficulty 3/5 1-2 days Newbie friendliness 35/100
-
upstream
Similar issues
-
feature-request helm
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
gravitational/teleport#69785 ·
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 92/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 84/100
-
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
crossplane/crossplane#7859 ·
-
Difficulty 1/5 Under an hour Newbie friendliness 90/100