You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Link to gist with saved setup that reproduces the issue:
Description
The Marlowe text-based language requires certain values to be strings. For example, roles, parameters, and choices are all input as strings. The issue with this is that it makes it easy for users to make typos that change the meaning of their contract. I don't think there's any way to improve this situtation in the text editor, but it may be possible to improve in the blocks editor.
Blockly provides a special field called a variable field, which is normally used to represent variables, but what it actually is is a powerful way to allow the user to define identifiers.
They act like dropdowns, so it is impossible for the user to make typos when selecting identifiers.
But they differ from dropdowns in that all of the options are dynamically defined by the user (the variables page documents the common way of doing this).
They also support very powerful renaming and collision handling:
And they have a "type" property which can be used to create namespaces (eg separating role identifiers from choice identifiers).
I think that moving from text input fields to variable fields would make working with Marlowe a smoother, more intuitive, and less typo-prone experience.
Possible Problem
The issue with moving to variable fields is that Blockly does not provide a versioning system. So if you do things like change the name of an input, and try to deserialize XML including the old name, Blockly will fail (afaik unrecoverably). However, it seems like you peoples aren't actually storing the XML, you're storing the Marlowe representation, which means this is not a problem.
The text was updated successfully, but these errors were encountered:
Diagnostic info:
Description
The Marlowe text-based language requires certain values to be strings. For example, roles, parameters, and choices are all input as strings. The issue with this is that it makes it easy for users to make typos that change the meaning of their contract. I don't think there's any way to improve this situtation in the text editor, but it may be possible to improve in the blocks editor.
Blockly provides a special field called a variable field, which is normally used to represent variables, but what it actually is is a powerful way to allow the user to define identifiers.
They act like dropdowns, so it is impossible for the user to make typos when selecting identifiers.
But they differ from dropdowns in that all of the options are dynamically defined by the user (the variables page documents the common way of doing this).
They also support very powerful renaming and collision handling:
And they have a "type" property which can be used to create namespaces (eg separating role identifiers from choice identifiers).
I think that moving from text input fields to variable fields would make working with Marlowe a smoother, more intuitive, and less typo-prone experience.
Possible Problem
The issue with moving to variable fields is that Blockly does not provide a versioning system. So if you do things like change the name of an input, and try to deserialize XML including the old name, Blockly will fail (afaik unrecoverably). However, it seems like you peoples aren't actually storing the XML, you're storing the Marlowe representation, which means this is not a problem.
The text was updated successfully, but these errors were encountered: