enso-org / enso

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

Confusing visualization for functions with missing arguments #11143

Open kazcw opened 3 weeks ago

kazcw commented 3 weeks ago

When a function is missing required arguments (e.g. when we are previewing a CB component without defaults for all arguments), we currently display this (in the default, JSON visualization):

Screenshot 2024-09-20 at 09 23 44
### Tasks
- [ ] Viz: When `_js_to_object_error_` occurs, we should display the error, not the JSON of the error
- [ ] Libs: Since this is a common case it would be nice to show a message like "Provide values for the required arguments to view results (missing: path)"--Would it be possible for the libs to make this the error message when trying to convert a function to a visualization representation? Otherwise, we could handle it specially in the GUI
GregoryTravis commented 1 week ago

We will use a Missing Argument throw expression for every user-facing argument without a default; this ticket is just for fixing the JSON output for this case.