enso-org / enso

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

Connecting to gray ports should add parentheses if necessary #6776

Closed farmaazon closed 7 months ago

farmaazon commented 1 year ago

Follow-up task of the discussion starting at https://github.com/enso-org/enso/issues/5925#issuecomment-1468791835

Once the new design will be applied to nodes, we should fix the operation of connecting to some placeholders.

When the node is edited manually to operator2.take Index_Sub_Range.First, the placeholder count will show up, and connecting a node to it will not insert parentheses, so it will be interpreted as an argument of take method, not First constructor.

The connecting should add parentheses in that case. The parentheses should be not visible, as the separators from the new design are sufficient.

farmaazon commented 1 year ago

See #7627 for another case where changing widget value requires adding parentheses - in that case in a different widget!

farmaazon commented 7 months ago

implemented in GUI2