Repository navigation
feat: Support booleans for parameters input - #3437
Conversation
| import { MONOSPACE_FONT_FAMILY } from "../../theme/constants" | ||
|
|
||
| const isBoolean = (schema: ParameterSchema) => { | ||
| return schema.validation_value_type === "bool" |
There was a problem hiding this comment.
would be nice to have an enum for this
There was a problem hiding this comment.
That is true, but I would wait until we use it more often or with different values.
| name: "disable_docker", | ||
| description: "Disable Docker?", | ||
| validation_value_type: "bool", | ||
| default_source_value: "false", |
There was a problem hiding this comment.
Do we have testing entities for these objects?
There was a problem hiding this comment.
No, we don't. Do you think it would be interesting to have?
There was a problem hiding this comment.
I don't know! I haven't worked extensively with these inputs. If you think it will be used in other stories, great. If not, no worries.
Kira-Pilot
left a comment
There was a problem hiding this comment.
I didn't have time to pull down but the code looks good!
…ries.tsx Co-authored-by: Kira Pilot <kira@coder.com>
|
Can the display names be more human-friendly.? |
I think this is a good suggestion. We already have a description so I think what we can do is if there is a description, display it as a label, if not, display the variable name. What do you think? Also, I think this work could be in a diff PR, so I'm going to merge this one, but feel free to keep the discussion here if you want to. |
|
Seem's like a good idea. |
|
@matifali sure thing, here is coder/site/src/components/ParameterInput/ParameterInput.tsx Lines 15 to 24 in 758eb21 |
Any plans for to this? |
Closes #2659
Preview:
PS: I tried with
Checkboxbut for the current design, having a Radio Group fits better when together with other fields, but I'm open. Here is what the checkbox looks like: