Simpler array input #2176
Labels
discussion required
requires a discussion before moving forward
help wanted
Intended for internal use for student workers
recordedit
Description
As a temporary solution to support arrays, we decided to show a textarea for them a long time ago. With this textarea, users would have to write the whole raw value of the array. This means users would have to write
[
and]
and wrap texts in"
.For example, assume the user wants to create an array of two string values. Then they would have to write the following:
As you can see, this is not user-friendly, and normal users would probably forget to wrap the texts. Therefore, we were thinking about relaxing this syntax and adding a transformation layer between what users write and what we send to the users. We need to write the relaxation rules and make sure they are backward compatible (users can continue to write arrays the old way as well as the new simpler method).
Details
To do this, we would have to change the
array
validator and thepopulateSubmissionRow
logic.We had a conversation about this, and the following are the changes that we would like to make:
[
,]
, and any extra space around the values.,
in it, you could wrap it in quotes, e.g."value1, value"
should be treated as an array of length one.val\"ue
can be valid or invalid depending on how we want to handle this. But"val\"ue"
should be considered valid regardless.P.S. I should mention that the described change is just a temporary solution to make the current implementation easier. And we should eventually add proper array support in recordedit
The text was updated successfully, but these errors were encountered: