Schema: Support multi-line text inputs
It would be nice to support / differentiate text variables between simple one-line inputs and multi-line textareas in the schema. (See original request for support in Seqera Platform launch page).
Need to figure out what the best JSON schema syntax is first. Suggestions from Slack discussion:
-
minLength - New
formattypetextarea - Using a
patternthat includes zero or more\nnewlines
Once we agree on such a flag we can detect it in the launch form and have an option / docs for it in the schema builder.
It would be great if the schema included an optional configuration to specify the desired height of the box (like rows) when defining multi-line text areas.
I can see a number of use cases where the text area can be small and others where it should be bigger for it to be useful.
Ok, suggestion then is to use rows:[integer] in that case. For example:
"my_parameter": {
"type": "string",
"description": "This parameter should be a super long string.",
"fa_icon": "fas fa-file-signature",
"rows": 4
}
This would be ignored if other things such as format are set to file-path and so on.
After some nice discussion in slack, consensus is forming around a more future-proof ui_hint syntax. For example:
"my_parameter": {
"type": "string",
"description": "This parameter should be a super long string.",
"fa_icon": "fas fa-file-signature",
"ui_hint": {
"type": "textarea",
"rows": 4
}
}
If anyone would like an array of dicts for ui_hint then speak now!
moved to https://github.com/nextflow-io/schema-spec/issues/4