ankha icon indicating copy to clipboard operation
ankha copied to clipboard

Editors ignore all but the first form, which surprises and potentially disappoints the user

Open travis opened this issue 11 years ago • 2 comments
trafficstars

Right now the editor ignores everything but the first form in an editing box when it saves, which is probably surprising. This should maybe raise an error? Alternatively we could implement undo functionality so that the user can recover from this surprise. Also open to other ideas

travis avatar Jun 25 '14 01:06 travis

Isn't that the behavior of cljs.reader/read-string though? Accepting only one form is reasonable. If someone needed to input more than one form I would assume they're working with a data structure which should be fine. Can you share your thoughts on where being able to have more than one form is useful?

noprompt avatar Jun 25 '14 23:06 noprompt

oh - definitely don't think more than one form is useful, this is more of a user experience question - @sgrove's original comments were:

Right now it looks like the reader only take the first token in the text box, e.g. edit #{"a" "b" "c"} edit => 1 #{"a" "b" "c"} confirm => 1. There's no way to undo by default either, so perhaps it's better to catch it as another error?

this is really a user experience issue - ideally we'd either prevent users from entering multiple forms or raise an error when they do. I'm not really sure what the best solution to this is, just feels worth noting in an issue in case anyone has some time to explore.

travis avatar Jun 26 '14 02:06 travis