enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 323 forks source link

Entering `'` in a numeric input widget breaks the node #9838

Closed radeusgd closed 2 months ago

radeusgd commented 5 months ago

By accident I typed 8' in a number input widget and pressed enter.

https://github.com/enso-org/enso/assets/1436948/10c1862b-7264-49d5-9ccb-2d96e204fea9

Actual behaviour

operator3158.filter 'Grade' ( ( (Filter_Condition.Equal) ( 8 ( '))))

image

This led to the node becoming unparseable and display wrongly in the GUI.

Expected behaviour

The value should not be submitted, I probably should get some warning that ' is not a valid character in the numeric input.

Definitely the node should not become unparseable.

farmaazon commented 3 months ago

Refinement notes:

So, the first two points should be done as a part of code widget. For this task, we should disallow number widget setting anything other than a number (at least until widget picker will be implemented - then we might be more flexible). Non-number values should be discarded.