Description
Evaluated implementations (implementations written in one of the supported programming languages, such as JavaScript or Python) can generate tracing strings for debugging purposes. To increase awareness of this feature, and to be helpful to our contributors, add the following context-appropriate guidance in Wikifunctions' UI:
- When a call to an evaluated function returns an error, add a banner like this at the top of the Details (metadata) dialog: Something not working? Try Wikifunctions.Debug to trace your code. Ideally, this would also be linked to appropriate documentation. See the attached image.
- When Wikifunctions.Debug output appears in the Details dialog, and no errors are returned, either suggest or require (TBD) that it should be removed from the code. If it's a requirement, it could appear as in the attached image (and additional code will be needed to enforce the requirement). If a suggestion, the wording could be Consider removing Wikifunctions.Debug before publishing
These are just 2 possibilities; there are others that can be considered. For example, guidance could be provided next to the code editor, or next to "Results" in the function evaluator widget.
Thanks to Amin Al Hazwani for these ideas and for the images!
For more info about Wikifunctions.Debug, see https://meta.wikimedia.org/wiki/Abstract_Wikipedia/Updates/2024-01-25.
Devices and Design (URLs or screenshots)
- Desktop:
Completion checklist
- Before closing this task, review one by one the checklist available here: https://www.mediawiki.org/wiki/Abstract_Wikipedia_team/Definition_of_Done#Front-end_Task/Bug_Completion_Checklist



